Read 31 401 - jserpa-p/lisbon-ops-301n1_Reading GitHub Wiki

YARA

YARA is a tool to track down malware. You create YARA rules in order to find what you want After big cyberattacks or during cyberattack campaigns, experts may send out YARA rules to help cyber defenders look for the potencial poinson in their systems. YARA rules are only as good as the information they are based on. They depend on threat actors, if they change their code, defenders have also to create new rules.

Threat Hunting using YARA

Threat hunting is a proactive aproach to identify and mitigate cyber threats that have already entered an organization network

It envolves actively searching for indicators of compromise (IOC)

Types of YARA rules

  • String-based rules

  • File metadata-based rules

  • Hash-based rules

  • Network based rules

Questions

1. What is the main goal of Threat Hunting and how is it different from traditional threat monitoring?

Threat hunting is a proactive approach, while threat detection is an active approach. That means threat hunters do not rely on already-known attack patterns or wait until a security alert on a potential data breach occurs. Rather, they seek out threat patterns not usually caught by normal security tools.

2. What are the four types of YARA rules and what does each one of them use to identify and classify malicious software?

Firstly you have string-based rules that rely on specific strings or sequences of characters commonly found in malware. Then you have File metadata-based rules, these rules examine the metadata associated with a file, such as the file name, size, creation date, or file extension. After that you have Hash-based rules, these rules analyze the binary structure of files by searching for specific byte sequences or patterns. They allow YARA to detect the presence of certain file formats or the usage of particular file formats in suspicious ways. And finally the Network based rules, you need to specify the network traffic characteristics of the malware that you are trying to detect.

3. How are YARA rules similar to how Anti-Virus programs detect malicious software?

YARA rules and antivirus programs have similarities in how they detect malicious software:

  • Both use predefined patterns or signatures to identify known malware.
  • They scan files for specific strings or patterns associated with malware.
  • Both rely on indicators of compromise (IOCs) to flag potentially malicious content.
  • They can incorporate behavioral analysis to detect suspicious behaviors.
  • Regular updates are necessary to keep them effective against new threats.

YARA rules complement antivirus programs by providing targeted detections, while antivirus programs offer broader, real-time protection.