T1566.001 IBM QRadar · QRadar

Detect Spearphishing Attachment in IBM QRadar

Adversaries send targeted spearphishing emails with malicious attachments to gain initial access. Attachments may include Microsoft Office documents with macros, PDFs exploiting reader vulnerabilities, executables disguised with document icons, archive files (ZIP, ISO, IMG) containing LNK or script files, or RTF files exploiting equation editor vulnerabilities. Upon opening the attachment, the adversary's payload exploits a vulnerability or executes directly, typically spawning a child process from the email client or document handler. Common threat actors using this technique include APT28, Lazarus Group, FIN6, Cobalt Group, and Tropic Trooper.

MITRE ATT&CK

Tactic
Initial Access
Technique
T1566 Phishing
Sub-technique
T1566.001 Spearphishing Attachment
Canonical reference
https://attack.mitre.org/techniques/T1566/001/

QRadar Detection Query

IBM QRadar (QRadar)
sql
SELECT
  DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
  logsourcename(logsourceid) AS log_source,
  "username",
  "sourceip",
  QIDNAME(qid) AS event_name,
  "Payload"
FROM events
WHERE LOGSOURCETYPENAME(devicetype) ILIKE '%sysmon%'
  AND QIDNAME(qid) ILIKE '%process create%'
  AND LOWER("Payload") MATCHES '(?i)ParentImage.*\\\\(winword|excel|powerpnt|outlook|mspub|msaccess|onenote|visio|eqnedt32)\.exe'
  AND LOWER("Payload") MATCHES '(?i)Image.*\\\\(cmd|powershell|pwsh|wscript|cscript|mshta|regsvr32|rundll32|certutil|bitsadmin|msbuild|installutil|wmic|odbcconf|cmstp|msiexec|schtasks|hh)\.exe'
  AND starttime > NOW() - 86400000
ORDER BY starttime DESC
LIMIT 1000

-- Alternative using Windows Security Event 4688 with process creation audit enabled:
-- SELECT
--   DATEFORMAT(starttime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
--   logsourcename(logsourceid) AS log_source,
--   "username",
--   "sourceip",
--   "ProcessName",
--   "ParentProcessName",
--   "CommandLine"
-- FROM events
-- WHERE LOGSOURCETYPENAME(devicetype) ILIKE '%windows%'
--   AND deviceEventId = 4688
--   AND LOWER("ParentProcessName") MATCHES '(?i)(winword|excel|powerpnt|outlook|mspub|msaccess|onenote|visio|eqnedt32)\.exe$'
--   AND LOWER("ProcessName") MATCHES '(?i)(cmd|powershell|pwsh|wscript|cscript|mshta|regsvr32|rundll32|certutil|bitsadmin|msbuild|installutil|wmic|odbcconf|cmstp|msiexec|schtasks|hh)\.exe$'
--   AND starttime > NOW() - 86400000
-- ORDER BY starttime DESC
critical severity medium confidence

Detects spearphishing attachment execution via Office parent process spawning suspicious LOLBin child processes. Primary query parses Sysmon EventID 1 (Process Create) logs ingested into QRadar, matching ParentImage (Office apps) against Image (suspicious children). Commented-out secondary query uses Windows Security EventID 4688 as an alternative data source when Sysmon is unavailable.

Data Sources

Microsoft Windows Sysmon (via QRadar DSM)Windows Security Event Log (EventID 4688)

Required Tables

events

False Positives & Tuning

  • Macro-enabled workbooks used by IT automation teams that legitimately invoke PowerShell or cmd.exe for scripted workflows such as pulling data from internal APIs.
  • Managed software deployment tools that use Outlook-triggered automations calling msiexec.exe or rundll32.exe for sanctioned software installs.
  • Pen testing or red team exercises where simulated phishing attachments are detonated in a test environment connected to production SIEM.
Download portable Sigma rule (.yml)

Other platforms for T1566.001


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Word Macro Spawning PowerShell (VBA Simulation)

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe. If run from within a Word VBA macro (Tools > Macro > Run), the ParentImage will be winword.exe. Security Event ID 4688 (if command line auditing enabled) will capture the full command line.

  2. Test 2LNK File Execution Simulating ISO-Delivered Spearphishing

    Expected signal: Sysmon Event ID 11: File Created for InvoiceDocument.lnk in %TEMP%. Sysmon Event ID 1: Process Create with Image=cmd.exe, ParentImage=explorer.exe (or the process that invoked Start-Process). The LNK file path in temp directory is a key indicator. Sysmon Event ID 1 will show target command line '/c whoami'.

  3. Test 3Excel Macro Dropping Script to Disk (Dropper Pattern)

    Expected signal: Sysmon Event ID 11: File Created for update_helper.ps1 in %TEMP%. Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing '-ExecutionPolicy Bypass -File' and the temp path. DeviceFileEvents ActionType=FileCreated for the .ps1 file. The combination of file drop to temp + immediate execution is a high-fidelity pattern.

  4. Test 4Equation Editor Exploitation Simulation (CVE-2017-11882 Pattern)

    Expected signal: Sysmon Event ID 1: Process Create with Image=cmd.exe. In real exploitation, ParentImage=eqnedt32.exe (C:\Program Files (x86)\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform\OSPPSVC.EXE launching eqnedt32.exe which spawns cmd.exe). Security Event ID 4688 with cmd.exe command line. For authentic testing, embed this command in an RTF file using a hex editor to trigger via eqnedt32.exe.

Unlock Pro Content

Get the full detection package for T1566.001 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections