Room: Phishing chain
Room scenario. A company employee received an email about an "urgent invoice"; he opened the attachment in a browser and afterwards his computer began behaving strangely. 3 emails were taken from the employee's mailbox in .eml form. You are a malware analyst — everything is static analysis: you run nothing.
phish_case.zip contains inbox/*.eml (3 emails) and notes.txt. The scripts in the emails refer only to .invalid domains (a simulation).
Tasks (answers are not submitted, each builds on the result of the previous one):
- Task 1. Which of the three emails is phishing? Compare the
Authentication-Results,Return-Path,FromandReply-Toheaders (what do the SPF/DKIM/DMARC results say?). - Task 2. What is the attachment in the phishing email and how does it deliver the malicious payload? HTML smuggling: in what order are the JS array fragments assembled, and what file (
.hta) is produced afteratob? - Task 3. How is the PowerShell command assembled inside
.hta(VBScript)? The joining order of the fragments of the-encargument (they are declared in a different order). Decode it (-EncodedCommand— UTF-16LE base64). - Task 4. The PowerShell script contains the second-stage address and the
X-Authheader. The token is hidden with XOR: in the header, watch for the variable that is actually used (the token from an old campaign is also in the script). Reveal the token — it is the flag.
Flag format BAYROQ{...} (the last 16 characters are lowercase hexadecimal). The attachment in the legitimate partner's email looks similar — solve the first task correctly.