- 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
推薦閱讀
- Hands-On Graph Analytics with Neo4j
- 玩轉智能機器人程小奔
- 我的J2EE成功之路
- 火格局的時空變異及其在電網防火中的應用
- Mastering Spark for Data Science
- Mastercam 2017數控加工自動編程經典實例(第4版)
- PHP開發手冊
- CompTIA Network+ Certification Guide
- Implementing Splunk 7(Third Edition)
- Ruby on Rails敏捷開發最佳實踐
- 算法設計與分析
- Windows 7故障與技巧200例
- Mastering MongoDB 4.x
- 分布式Java應用
- 互聯網單元測試及實踐