Case files / Case 003

CASE FILE 003 · INTERMEDIATE · FICTIONAL TRAINING SCENARIO

The invoice attachment.

At 10:05 the endpoint security tool on workstation WS-HR-14 alerts on an unknown program, odsync.exe, in a user's profile. Earlier that morning the user, m.khumalo, received an "overdue invoice" email. You have four excerpts. Follow the chain from inbox to persistence, and be careful about what each link proves.

  • HOST: WS-HR-14
  • TIME: UTC
  • EST. 40 MIN
  • SKILLS: EMAIL · PROCESS TREES · PERSISTENCE
CASE 003 / THE INVOICE ATTACHMENTFICTIONAL LAB · EXCERPTS · UTC
Which conclusion does the evidence best support?
THE WRITE-UP

How an analyst would report it.

Read this after you have tried the case. Each link in the chain is stated with the evidence behind it and what is still unconfirmed.

Summary

At 09:12 UTC m.khumalo received an email claiming to be an overdue invoice, with a macro-enabled Word attachment. The sender's domain failed SPF and DMARC checks. Two minutes later Word started PowerShell with an encoded command that downloads a script from 198.51.100.23, and PowerShell connected to that address. At 09:16 a scheduled task was created that runs odsync.exe from the user's profile at every logon. The sequence is consistent with a phishing attachment leading to code execution and persistence.

Timeline

Time (UTC)SourceEventDetail
09:12:31Mail gatewayMessage delivered"Invoice INV-20481 overdue", Invoice_20481.docm, SPF fail, DMARC fail
09:14:02SysmonEvent 1WINWORD.EXE starts powershell.exe with a hidden, encoded command
09:14:03SysmonEvent 3powershell.exe connects to 198.51.100.23:80
09:16:47Security4698Scheduled task \OneDriveSyncUpdate created, runs odsync.exe at logon

What the evidence supports

  • A message with a macro-enabled attachment reached the user from a domain that failed SPF and DMARC.
  • Word, not the user directly, started PowerShell with a hidden, encoded command that downloads a script.
  • PowerShell made a connection to the address in that command.
  • A logon-triggered scheduled task now runs an unknown program from the user's profile.

What it does not establish

  • That the attachment is what Word opened at 09:14: confirm with the file path in Word's recent files or the Office Trust Center records, and recover the file.
  • What was downloaded, or what odsync.exe does: a connection record does not contain content.
  • Whether data left the network: nothing here shows exfiltration. Check proxy, firewall and DNS logs.
  • Who sent the email: headers can be forged. The SPF and DMARC failures show it was not sent by the real domain's mail servers.

Next steps

  1. Contain: isolate WS-HR-14, disable the scheduled task and reset m.khumalo's password and sessions.
  2. Find other recipients: search the mail gateway for the sender, subject and attachment hash, and remove the message from every mailbox.
  3. Collect Invoice_20481.docm and odsync.exe, record their SHA-256 hashes and analyse them in a safe environment.
  4. Block 198.51.100.23 and hunt for it in proxy, firewall and DNS logs across the network.
  5. Prevent a repeat: block macros in files from the internet by policy and review mail filtering for SPF and DMARC failures.

Practise writing it yourself: use the DFIR report template.

MITRE ATT&CK mapping

  • T1566.001 Phishing: Spearphishing Attachment
  • T1204.002 User Execution: Malicious File
  • T1059.001 Command and Scripting Interpreter: PowerShell
  • T1105 Ingress Tool Transfer
  • T1053.005 Scheduled Task/Job: Scheduled Task
KEEP FOLLOWING THE EVIDENCE

Ready for the next case?

Go back to the case files, or follow the roadmap to see what to learn next.

All case files ↗