- Machine Learning for Cybersecurity Cookbook
- Emmanuel Tsukerman
- 104字
- 2021-06-24 12:29:03
How to do it…
In the following steps, we show you how to create YARA rules and test them against a file:
- Copy your rules, as seen here, into a text file and name it rules.yara:
rule is_a_pdf
{
strings:
$pdf_magic = {25 50 44 46}
condition:
$pdf_magic at 0
}
rule dummy_rule1
{
condition:
false
}
rule dummy_rule2
{
condition:
true
}
- Next, select a file you would like to check your rules against. Call it target_file. In a terminal, execute Yara rules.yara target_file as follows:
Yara rule.yara PythonBrochure
The result should be as follows:
is_a_pdf target_file
dummy_rule2 target_rule
推薦閱讀
- 傳感器技術(shù)實(shí)驗(yàn)教程
- Photoshop CS4經(jīng)典380例
- 精通Windows Vista必讀
- 深度學(xué)習(xí)中的圖像分類與對抗技術(shù)
- iClone 4.31 3D Animation Beginner's Guide
- 網(wǎng)絡(luò)化分布式系統(tǒng)預(yù)測控制
- Enterprise PowerShell Scripting Bootcamp
- 從零開始學(xué)SQL Server
- Visual C++項(xiàng)目開發(fā)案例精粹
- 電腦故障排除與維護(hù)終極技巧金典
- PHP求職寶典
- Hands-On Agile Software Development with JIRA
- CPLD/FPGA技術(shù)應(yīng)用
- 電機(jī)與電力拖動(dòng)
- Spark Streaming實(shí)時(shí)流式大數(shù)據(jù)處理實(shí)戰(zhàn)