Detect Component Object Model and Distributed COM in IBM QRadar
Adversaries may abuse the Windows Component Object Model (COM) and Distributed Component Object Model (DCOM) for local code execution or to move laterally across a network. This deprecated technique encompasses both local COM abuse (now T1559.001) and DCOM-based lateral movement (now T1021.003). COM is a native Windows API component enabling interaction between software objects through well-defined interfaces; DCOM extends this functionality over a network via RPC. Adversaries exploit COM interfaces to invoke arbitrary code execution through C++, Java, VBScript, and PowerShell. For DCOM lateral movement, privileged users can remotely activate objects such as MMC20.Application (CLSID: 49B2791A-B1AE-4C90-9B8E-E860BA07F889), ShellWindows (CLSID: 9BA05972-F6A8-11CF-A442-00A0C90A8F39), and ShellBrowserWindow (CLSID: C08AFD90-F2A1-11D1-8455-00A0C91F3880) to execute commands on remote hosts. Microsoft Office application objects (Excel.Application, Outlook.Application) exposed via DCOM also permit remote code execution and macro invocation. COM surrogate processes (dllhost.exe /Processid:{CLSID}) serve as the activation vehicle for out-of-process COM servers, making dllhost.exe spawning unexpected child processes a high-fidelity indicator. DCOM lateral movement communicates over TCP 135 (RPC Endpoint Mapper) before negotiating an ephemeral high port, distinguishing it from WMI or SMB-based lateral movement.
MITRE ATT&CK
- Tactic
- Lateral Movement Execution
- Canonical reference
- https://attack.mitre.org/techniques/T1175/
QRadar Detection Query
SELECT
DATEFORMAT(devicetime, 'yyyy-MM-dd HH:mm:ss') AS event_time,
logsourcename(logsourceid) AS log_source,
username,
sourceip,
QIDNAME(qid) AS event_name,
"ParentImage",
"ParentCommandLine",
"Image",
"CommandLine",
CASE
WHEN LOWER("ParentImage") LIKE '%\dllhost.exe' AND "ParentCommandLine" ILIKE '%/Processid:%' THEN 'COM_Surrogate_Activation'
WHEN LOWER("ParentImage") LIKE '%\mmc.exe' THEN 'MMC20_Application_DCOM'
WHEN LOWER("ParentImage") LIKE '%\excel.exe'
OR LOWER("ParentImage") LIKE '%\outlook.exe'
OR LOWER("ParentImage") LIKE '%\winword.exe'
OR LOWER("ParentImage") LIKE '%\powerpnt.exe' THEN 'Office_Application_DCOM'
ELSE 'Unknown_COM'
END AS com_vector
FROM events
WHERE LOGSOURCETYPEID(logsourceid) IN (12, 119, 432)
AND CATEGORYNAME(category) ILIKE '%process%'
AND devicetime > NOW() - 1 DAYS
AND (
LOWER("Image") LIKE '%\cmd.exe'
OR LOWER("Image") LIKE '%\powershell.exe'
OR LOWER("Image") LIKE '%\pwsh.exe'
OR LOWER("Image") LIKE '%\wscript.exe'
OR LOWER("Image") LIKE '%\cscript.exe'
OR LOWER("Image") LIKE '%\mshta.exe'
OR LOWER("Image") LIKE '%\rundll32.exe'
OR LOWER("Image") LIKE '%\regsvr32.exe'
)
AND (
(LOWER("ParentImage") LIKE '%\dllhost.exe' AND "ParentCommandLine" ILIKE '%/Processid:%')
OR LOWER("ParentImage") LIKE '%\mmc.exe'
OR LOWER("ParentImage") LIKE '%\excel.exe'
OR LOWER("ParentImage") LIKE '%\outlook.exe'
OR LOWER("ParentImage") LIKE '%\winword.exe'
OR LOWER("ParentImage") LIKE '%\powerpnt.exe'
)
ORDER BY devicetime DESC AQL rule detecting COM/DCOM abuse by correlating Sysmon process creation events where shell interpreters are spawned by COM surrogate (dllhost.exe /Processid:), MMC20.Application, or Office applications via DCOM. Classifies the COM vector to distinguish local COM surrogate execution from DCOM lateral movement patterns.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise management platforms that use COM automation to drive Office applications for report generation or document conversion, legitimately spawning child processes
- Legitimate PowerShell scripts executed through scheduled tasks that use COM interop to interact with Office or MMC snap-ins during normal IT operations
- Software testing frameworks that invoke Office application COM interfaces (e.g., Selenium with Office interop, automated document processors) generating benign shell child processes
Other platforms for T1175
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.
- Test 1MMC20.Application DCOM Local Shell Execution
Expected signal: Sysmon Event ID 1: mmc.exe created (parent: powershell.exe), then cmd.exe spawned with ParentImage=mmc.exe, CommandLine='/c whoami > %TEMP%\dcom-mmc20-test.txt'. Sysmon Event ID 11: file created at %TEMP%\dcom-mmc20-test.txt. DeviceProcessEvents shows InitiatingProcessFileName='mmc.exe' spawning FileName='cmd.exe'. DCOM-Server/Operational may log the COM activation.
- Test 2ShellWindows COM Object Shell Execution via Shell.Application
Expected signal: Sysmon Event ID 1: cmd.exe spawned with ParentImage=explorer.exe or dllhost.exe depending on Windows version and COM activation path. File created at %TEMP%\shellapp-test.txt. PowerShell ScriptBlock Log Event ID 4104 captures 'New-Object -ComObject Shell.Application' and 'ShellExecute' calls. DeviceProcessEvents records the cmd.exe creation with its initiating process context.
- Test 3DCOM Remote Execution via MMC20.Application (Lab Environment — Requires Admin on Target)
Expected signal: SOURCE: Sysmon Event ID 3 — TCP connection to 192.168.1.100:135, then ephemeral port connection. Security Event ID 4648 if alternate credentials used. TARGET: Security Event ID 4624 Type 3 (network logon) from source IP. Sysmon Event ID 1: dllhost.exe /Processid:{49B2791A-B1AE-4C90-9B8E-E860BA07F889} created, then cmd.exe spawned with ParentImage=dllhost.exe. File created at C:\Windows\Temp\dcom-remote-test.txt.
- Test 4COM Object Scheduled Task Creation via Schedule.Service
Expected signal: Sysmon Event ID 12/13 (Registry): Task Scheduler registry key creation under HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\. Security Event ID 4698 (Scheduled task created) in Windows Security log. PowerShell ScriptBlock Log Event ID 4104 showing New-Object -ComObject Schedule.Service invocation. DeviceProcessEvents shows only powershell.exe (no schtasks.exe child process — the entire task creation happens via COM API).
References (12)
- https://attack.mitre.org/techniques/T1175/
- https://attack.mitre.org/techniques/T1021/003/
- https://attack.mitre.org/techniques/T1559/001/
- https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html
- https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/
- https://enigma0x3.net/2017/01/23/lateral-movement-via-dcom-round-2/
- https://enigma0x3.net/2017/09/11/lateral-movement-using-excel-application-and-dcom/
- https://enigma0x3.net/2017/11/16/lateral-movement-using-outlooks-createobject-method-and-dotnettojscript/
- https://www.cybereason.com/blog/leveraging-excel-dde-for-lateral-movement-via-dcom
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1175/T1175.md
- https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview
- https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html
Unlock Pro Content
Get the full detection package for T1175 including response playbook, investigation guide, and atomic red team tests.