ATTACHMENTS
PARENT-CHILD
OFFICE
OUTLOOK CACHE
DetectionBlue TeamSOCOctober 12, 2026•9 min read

Detecting Malicious Attachment Execution

An attachment is only dangerous once something runs. The execution tree is where you catch it, whatever the file type was.

Scroll

Attackers rotate attachment formats constantly — macro documents, ISO files, shortcuts, PDFs, archives — but the moment of execution looks much the same. A document viewer or mail client becomes the parent of a shell, script host or LOLBin. This pack puts the parent-child logic first and adds gateway context so you can judge the result.

Signals at a Glance

SignalWhereATT&CK
Office application spawning cmd, powershell, wscript, cscript or mshtaSysmon 1, EDRT1204.002
PDF reader spawning a shell or script hostSysmon 1, EDRT1204.002
Process image path under the Outlook attachment cache (Content.Outlook)Sysmon 1, EDRT1566.001
Double extension or archive-in-archive attachmentEmail gatewayT1036.007
Attachment type rare for the recipient from a first-contact senderMessage traceT1566.001

Parent-Child Logic

Legitimate Office and PDF workflows almost never launch a command interpreter. Alert on the relationship rather than the file name, and keep the parent list broad enough to cover the mail client itself:

title: Document Viewer or Mail Client Spawns Shell or Script Host
logsource:
  product: windows
  category: process_creation
detection:
  parent:
    ParentImage|endswith:
      - '\winword.exe'
      - '\excel.exe'
      - '\powerpnt.exe'
      - '\outlook.exe'
      - '\acrord32.exe'
      - '\acrobat.exe'
      - '\foxitreader.exe'
  child:
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\wscript.exe'
      - '\cscript.exe'
      - '\mshta.exe'
      - '\rundll32.exe'
      - '\regsvr32.exe'
  condition: parent and child
level: high
# tune/validate: some add-ins and DRM or signing plugins launch helpers; exclude by full command line, not by parent.

Outlook Cache and Message Trace

When a user opens an attachment directly from the mail client, Outlook writes it to a randomised folder under its secure temp location. Code that runs from there was opened without being saved first, which is rare for anything legitimate beyond documents and images:

index=endpoint sourcetype=XmlWinEventLog:Microsoft-Windows-Sysmon/Operational EventCode=1
  Image="*\\Content.Outlook\\*"
  NOT (Image="*.pdf" OR Image="*.docx" OR Image="*.xlsx")
| stats count min(_time) as first_seen values(CommandLine) as cmd values(ParentImage) as parent by host, User, Image
| sort - count
# tune/validate: Image is the executable, so any hit here is code, not a document. Confirm the field mapping in your Sysmon TA.
Vetted sources

Start from SigmaHQ Office and PDF child-process rules, Elastic's Office application child-process detections and the Splunk ESCU Office-spawn analytics, then add your gateway’s message-trace fields. Baseline your own environment first — line-of-business add-ins are the usual false-positive source.

Build Detections That Fire

Mjolnir Security helps blue teams turn threat intelligence into high-fidelity detections across endpoint, network, identity and cloud telemetry.

Detection EngineeringManaged Detection & ResponseThreat HuntingIncident ResponsePurple Teaming
  • Detection Engineering We build and tune detections mapped to ATT&CK from your own telemetry.
  • Threat Hunting as a Service Hypothesis-driven hunts for the behaviours on this page.
  • 24/7 Incident Response Containment when a detection fires. Call +1 833 403 5875.
Written by: Mjolnir Threat Research (MTAC)  |  Published: October 12, 2026  |  Last reviewed: October 12, 2026