{"id":4050,"date":"2016-02-09T04:17:34","date_gmt":"2016-02-08T20:17:34","guid":{"rendered":"https:\/\/www.darknet.org.uk\/?p=4050"},"modified":"2017-04-14T11:05:37","modified_gmt":"2017-04-14T03:05:37","slug":"yara-pattern-matching-tool-malware-analysis","status":"publish","type":"post","link":"https:\/\/www.darknet.org.uk\/2016\/02\/yara-pattern-matching-tool-malware-analysis\/","title":{"rendered":"YARA – Pattern Matching Tool For Malware Analysis"},"content":{"rendered":"

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.<\/p>\n

\"YARA<\/p>\n

YARA is multi-platform, running on Windows, Linux and Mac OS X, and can be used through its command-line interface or from your own Python scripts with the yara-python extension.<\/p>\n

Quite a few tools related to intrusion detection, malware analysis and compromise detection tools utilise YARA rules during the scanning phase. LOKI<\/a> and FastIR<\/a> being two recent examples.<\/p>\n

Sample Rule<\/h3>\n

Let’s see an example:<\/p>\n

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

The above rule is telling YARA that any file containing one of the three strings must be reported as silent_banker. This is just a simple example, more complex and powerful rules can be created by using wild-cards, case-insensitive strings, regular expressions, special operators and many other features that you’ll find explained in YARA’s documentation<\/a>.<\/p>\n

You can also find some cool YARA rules at this project: https:\/\/github.com\/Yara-Rules\/rules\/<\/a><\/p>\n

You can download YARA here:<\/p>\n

yara-v3.4.0.zip<\/a><\/p>\n

Or read more here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"

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 […]<\/p>\n","protected":false},"author":25,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[7,29],"tags":[5627],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Darknet","author_link":"https:\/\/www.darknet.org.uk\/author\/darknet\/"},"_links":{"self":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts\/4050"}],"collection":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/comments?post=4050"}],"version-history":[{"count":0,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/posts\/4050\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/media?parent=4050"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/categories?post=4050"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.darknet.org.uk\/wp-json\/wp\/v2\/tags?post=4050"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}