Which attachment is the dropper
Four files were pulled from a phishing campaign. Use file, strings, and a YARA rule that checks the MZ header to find the Windows dropper and the URL it fetches.
What you’re looking at
Four files were pulled from a phishing campaign. Use file, strings, and a YARA rule that checks the MZ header to find the Windows dropper and the URL it fetches.
Your goal: Find which quarantined attachment is really a Windows program, and what it downloads.
- 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
- YARA
- a rule language for finding patterns in files
- URL
- web address
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
The mail gateway quarantined four attachments from the same campaign. They are in /srv/quarantine with neutral names.
Extensions lie, headers do not. Windows executables start with the bytes MZ, which YARA reads as uint16(0) == 0x5A4D. Checking the header first stops a rule from firing on text files that merely mention a URL.
malware-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: 294 words, about 2 min. It gives away every answer, so try the steps first.