Recipe Difficulty: Medium
Python Version: 3.5
Operating System: Any
As a bonus section, we will leverage the powerful Yet Another Recursive Algorithm (YARA) regular-expression engine to scan for files of interest and indicators of compromise. YARA is a pattern-matching utility designed for use in malware identification and incident response. Many tools use this engine as the backbone for identification of likely malicious files. Through this recipe, we learn how to take YARA rules, compile them, and match them across one or more folders or files. While we will not cover the steps required to form a YARA rule, one can learn more about the process from their documentation at http://yara.readthedocs.io/en/latest/writingrules.html.