T1559.002 Microsoft Sentinel · KQL

Detect Dynamic Data Exchange in Microsoft Sentinel

Adversaries may use Windows Dynamic Data Exchange (DDE) to execute arbitrary commands without relying on VBA macros. DDE is a legacy client-server IPC protocol supported in Microsoft Office applications that allows documents to request command execution from a server process. Attackers poison Word documents, Excel spreadsheets, Outlook emails, and CSV files with DDE fields (e.g., DDEAUTO cmd) that execute shell commands when the document is opened and field updates are accepted. DDE is also delivered via OLE-embedded Equation Editor objects (EQNEDT32.EXE) exploiting CVE-2017-11882. Threat actors including APT28, FIN7, MuddyWater, Cobalt Group, Gallmaker, APT37, Leviathan, and BITTER have leveraged DDE in targeted spearphishing campaigns to achieve initial code execution.

MITRE ATT&CK

Tactic
Execution
Technique
T1559 Inter-Process Communication
Sub-technique
T1559.002 Dynamic Data Exchange
Canonical reference
https://attack.mitre.org/techniques/T1559/002/

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let OfficeProcesses = dynamic(["winword.exe", "excel.exe", "outlook.exe", "onenote.exe", "powerpnt.exe", "msaccess.exe", "mspub.exe"]);
let SuspiciousChildren = dynamic(["cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe", "msiexec.exe", "wmic.exe", "schtasks.exe", "net.exe", "net1.exe", "curl.exe", "wget.exe", "forfiles.exe", "pcalua.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where (InitiatingProcessFileName has_any (OfficeProcesses) and FileName has_any (SuspiciousChildren))
    or InitiatingProcessFileName =~ "EQNEDT32.EXE"
| extend IsDDE_EquationEditor = (InitiatingProcessFileName =~ "EQNEDT32.EXE")
| extend IsOfficeSpawn = (InitiatingProcessFileName has_any (OfficeProcesses) and FileName has_any (SuspiciousChildren))
| extend SuspiciousArgs = ProcessCommandLine has_any ("http", "https", "-enc", "-EncodedCommand", "DownloadString", "WebClient", "iex(", "invoke-expression", "base64", "-bypass", "-hidden", "frombase64", "Start-BitsTransfer")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
         InitiatingProcessFileName, InitiatingProcessCommandLine, FolderPath,
         IsDDE_EquationEditor, IsOfficeSpawn, SuspiciousArgs
| sort by Timestamp desc
high severity high confidence

Detects DDE-based code execution by identifying Microsoft Office applications or Equation Editor (EQNEDT32.EXE) spawning suspicious child processes. EQNEDT32.EXE spawning any process is a near-certain indicator of CVE-2017-11882 Equation Editor RCE exploitation and should be treated as a zero-false-positive condition in patched environments. Office processes spawning shell interpreters or LOLBins (cmd.exe, PowerShell, wscript.exe, mshta.exe, certutil.exe, etc.) indicate DDE field execution, DDEAUTO triggers, or OLE-embedded payload delivery from phishing documents. The SuspiciousArgs flag identifies child processes with download cradle or obfuscation indicators, elevating priority.

Data Sources

Process: Process CreationCommand: Command ExecutionMicrosoft Defender for Endpoint

Required Tables

DeviceProcessEvents

False Positives & Tuning

  • Legitimate Office COM automation or VSTO add-ins that programmatically spawn cmd.exe or PowerShell for document post-processing (distinguish by correlating InitiatingProcessCommandLine with known automation tool paths)
  • Corporate IT tools using legacy DDE-based data integration with Excel, common in ERP environments where financial data is pushed via DDE links from mainframe or middleware systems
  • Developer workstations running Office interop test harnesses that invoke shell processes as part of automated document generation or conversion pipelines
  • Document management systems (e.g., OpenText, SharePoint integration tools) that open Office documents server-side and spawn helper processes for format conversion or indexing
Download portable Sigma rule (.yml)

Other platforms for T1559.002


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 1CSV DDE Injection via Excel

    Expected signal: Sysmon Event ID 1: Process Create for excel.exe with the CSV path as argument. If the DDE prompt is accepted: Sysmon Event ID 1 for cmd.exe with ParentImage=excel.exe and CommandLine='/c whoami > %TEMP%\dde_csv_out.txt'. Sysmon Event ID 11: File Create for dde_csv_out.txt in %TEMP%. Security Event ID 4688 (if command line auditing enabled) for the cmd.exe spawn.

  2. Test 2Word DDEAUTO Field Execution via RTF

    Expected signal: Sysmon Event ID 1: Process Create for winword.exe with the RTF file as argument. If DDE executes: Sysmon Event ID 1 for cmd.exe with ParentImage=winword.exe, CommandLine='/c whoami > %TEMP%\dde_word_out.txt'. Sysmon Event ID 11: File Create for dde_word_out.txt. Office telemetry logs the DDEAUTO field activation attempt. Security Event ID 4688 for the spawned cmd.exe.

  3. Test 3DDE via Outlook Email with Embedded OLE Object

    Expected signal: Sysmon Event ID 1: Process Create for outlook.exe with the .msg file path as argument. Outlook COM instantiation visible in Sysmon Event ID 1 for the PowerShell parent spawning outlook.exe. If OLE DDE executes: Sysmon Event ID 1 for cmd.exe with ParentImage=outlook.exe. Security Event ID 4688 for the spawned process.

  4. Test 4Equation Editor (EQNEDT32.EXE) Presence and Execution Check

    Expected signal: If EQNEDT32.EXE is found and executed: Sysmon Event ID 1 for EQNEDT32.EXE with Image=<office_path>\EQNEDT32.EXE. Prefetch file created at C:\Windows\Prefetch\EQNEDT32.EXE-*.pf. Security Event ID 4688 for EQNEDT32.EXE execution. In a real exploitation scenario: Sysmon Event ID 1 for a child process (cmd.exe, powershell.exe) with ParentImage=EQNEDT32.EXE would additionally fire.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections