- 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
推薦閱讀
- 亮劍.NET:.NET深入體驗(yàn)與實(shí)戰(zhàn)精要
- 后稀缺:自動(dòng)化與未來(lái)工作
- Instant Raspberry Pi Gaming
- 基于LabWindows/CVI的虛擬儀器設(shè)計(jì)與應(yīng)用
- Linux Mint System Administrator’s Beginner's Guide
- 手把手教你學(xué)AutoCAD 2010
- MCSA Windows Server 2016 Certification Guide:Exam 70-741
- 電腦上網(wǎng)直通車(chē)
- 21天學(xué)通C++
- 大數(shù)據(jù)平臺(tái)異常檢測(cè)分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- Arduino &樂(lè)高創(chuàng)意機(jī)器人制作教程
- 可編程序控制器應(yīng)用實(shí)訓(xùn)(三菱機(jī)型)
- 典型Hadoop云計(jì)算
- Appcelerator Titanium Smartphone App Development Cookbook(Second Edition)
- ASP.NET學(xué)習(xí)手冊(cè)