HackBlue

Labs / YARA triage

Sweep a web root for a PHP web shell

Run two YARA rules over a WordPress-style web root. The broad one finds every eval, the strict one finds the shell. Learn why both results matter before you trust a rule.

  • Terminal mission
  • Intermediate
  • 4 objectives
  • 0 of 4 solved

What you’re looking at

Run two YARA rules over a WordPress-style web root. The broad one finds every eval, the strict one finds the shell. Learn why both results matter before you trust a rule.

Your goal: Run a broad and a strict YARA rule over a web root and explain the difference.

Briefing
the story: what happened and what evidence you were handed.
Terminal
the dark box. It is a pretend Linux shell that runs in your browser. Type a command and press Enter. Nothing you type touches a real system.
Walkthrough
the numbered path. Each step says what to type and what you should see. Hints open one at a time.
Answer boxes
under each question step. Type what you found and press Check.

Words you will meet

PHP
a language many web servers run
YARA
a rule language for finding patterns in files
WAF
web application firewall

Start with step 1 in the walkthrough. Every step says what to do and what you should see. The whole thing takes about 2 min to talk through.

Briefing

A WAF alert showed a POST to /wp-content/uploads/2026/03/thumb.php. You have a read-only copy of the web root at /srv/www and two rules in ~/rules.

yara RULES TARGET scans a file. -r walks a directory. -s prints each matched string with its offset, which shows why a rule fired.

analyst@ir-ws

ir-ws · YARA triage

Type help for the command list and objectives for your tasks. Everything runs in this browser.

Up and down arrows walk your history. Ctrl+L clears the screen. Try help, ls, and objectives.

The whole walkthrough

Every step in order, written to be read aloud: 282 words, about 2 min. It gives away every answer, so try the steps first.