Yara規則學習


01 定義

官網:

YARA is a tool aimed at (but not limited to) helping malware researchers to identify and classify malware samples. With YARA you can create descriptions of malware families (or whatever you want to describe) based on textual or binary patterns. Each description, a.k.a. rule, consists of a set of strings and a boolean expression which determine its logic. 

理解:

YARA是一款幫助惡意軟件研究員鑒別和分類惡意樣本的工具,但它的功能不僅限於此。

YARA可以用基於文本或二進制的模式來創建對惡意軟件家族的描述(或你想描述的任何事物),而每個描述或者說是一種規則,均由一組字符串和一個布爾表達式組成,這些字符串和布爾表達式決定了其邏輯。

02 例子

rule silent_banker : banker { meta: description = "This is just an example" threat_level = 3 in_the_wild = true strings: $a = {6A 40 68 00 30 00 00 6A 14 8D 91} $b = {8D 4D B0 2B C1 83 C0 27 99 6A 4E 59 F7 F9} $c = "UVODFRYSIHLNWPEJXQZAKCBGMT" condition: $a or $b or $c }

上述例子是說,任意一個YARA文件,只要包含了三個字符串如a、b、c之一的文件都必須報告為silent_banker。

其中:meta 后面的是一些描述信息,比如規則說明、作者信息等

通過使用通配符,不區分大小寫的字符串,正則表達式,特殊運算符以及你在YARA文檔中找到的許多其他的功能,都可以創建更復雜而強大的規則。

YARA可以跨平台在Windows,Linux和Mac OS X上運行,也可通過其命令行界面使用,或從帶有yara-python擴展名的Python腳本中使用。

03 學習資源

https://www.yuque.com/p1ut0/qtmgyx/min0bf

看完官方文檔,找到一篇不錯的博客,可以參考一下

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM