Cybrary ForgeCYBRARY / FORGE

YARA

v4.5.1VirusTotal

Rule language that combines strings, hex patterns and conditions. Used to hunt across files, memory and process dumps. The range compiles rules and scans authored artifact fixtures.

Category
Digital forensics & reverse engineering
Package
yara
Runs on
Linux · Windows
Commands
yara, yarac

Rules are parsed and matched against authored artifact content. Nothing scans a real filesystem.

Install it

The scripts below install the real VirusTotal package on your own machine — read them first, and run them somewhere you are allowed to change. Inside the range, one press puts the simulated package on your next machine.

Linux installer (shell script)
install-yara.sh
Windows installer (PowerShell)
Install-yara.ps1
On a range machine
Add it to your kit and every machine you launch comes with it.

On Linux

Debian, Ubuntu, Kali (apt)

  1. Refresh the package lists
    sudo apt update
  2. Install YARA
    sudo apt install -y yara

RHEL, Fedora (dnf)

  1. Install YARA
    sudo dnf install -y yara

    Package names drift between distributions; search first if this one misses.

Arch (pacman)

  1. Install YARA
    sudo pacman -S --noconfirm yara

Alpine (apk)

  1. Install YARA
    sudo apk add yara

    Package names drift between distributions; search first if this one misses.

Check it worked

  1. Confirm it landed on PATH
    which yara
  2. Check the version
    yara --version

    The range reports 4.5.1.

Remove it

  1. Take it off again
    sudo apt remove --purge yara

On Windows

Windows Package Manager (winget)

  1. Search the catalog
    winget search yara
  2. Install YARA
    winget install --id yara -e

    Package names drift between distributions; search first if this one misses.

Chocolatey (choco)

  1. Install YARA
    choco install yara -y

    Run the shell as administrator.

Check it worked

  1. Confirm it resolves
    where yara
  2. Check the version
    yara --version

    The range reports 4.5.1.

Remove it

  1. Take it off again
    winget uninstall --id yara

Inside the range

  1. Tick it on the launch screen

    Under YARA's category on the advanced tool shelf. A lab that depends on it locks the toggle on and says why.

  2. Or install it from a range terminal
    sudo apt install -y yara

    The simulated package manager seeds the same binaries, config and receipt the shelf toggle does.

  3. Everything here is simulated

    No software is downloaded and nothing executes — the range answers from authored fixtures.

Labs that use YARA

  • Reps: Triage the DropperFive files, one intrusion. Hash and type each artifact, carve its strings, run the YARA starter pack, and write a rule that catches the packed dropper without flagging the two known-good controls.
  • Reps: Dead Box and Live RAMOne sample, one memory capture, one report. Hash and scan the dropper with real YARA, then run upstream Volatility 3 locally against a selected dump to find what pslist will not show you — and submit the findings.
  • Reps: Seeded Payload DropBreak into the Tomcat panel with Metasploit, drop the seeded payload, then take the artifact into Forge Triage. Grade on SHA-256, imphash and a YARA rule that fires on this sample.
  • Reps: Read the Output (Run the Tool, Justify the Flag)Install nmap, tcpdump and YARA from the catalog on a Linux box, run each one properly, then explain the output line by line — which flag produced it, what the range actually reported, and what you would have missed with the defaults.