Component Object Model and Distributed COM
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.
let COMShells = dynamic(["cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe"]);
let OfficeApps = dynamic(["excel.exe", "outlook.exe", "winword.exe", "powerpnt.exe", "onenote.exe"]);
DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ (COMShells)
| where (
// COM Surrogate (dllhost.exe /Processid:) spawning shells — primary DCOM remote activation indicator
(InitiatingProcessFileName =~ "dllhost.exe" and InitiatingProcessCommandLine has "/Processid:")
// MMC20.Application abuse — classic DCOM lateral movement vector documented by enigma0x3
or (InitiatingProcessFileName =~ "mmc.exe" and FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe"))
// Office application DCOM — Excel, Outlook, or Word spawning shells via COM interfaces
or (InitiatingProcessFileName in~ (OfficeApps) and FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe"))
)
| extend COMVector = case(
InitiatingProcessFileName =~ "dllhost.exe", "COM_Surrogate_Activation",
InitiatingProcessFileName =~ "mmc.exe", "MMC20_Application_DCOM",
InitiatingProcessFileName in~ (OfficeApps), "Office_Application_DCOM",
"Unknown_COM"
)
| extend DCOMIndicator = InitiatingProcessCommandLine has_any ("/Processid:", "-Embedding")
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine,
InitiatingProcessParentFileName, COMVector, DCOMIndicator
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- Legitimate IT administration tools using MMC snap-ins that internally spawn helper processes for managed operations (disk management, event viewer, device manager)
- Software installation packages activating COM servers via dllhost.exe as part of normal registration workflows (MSI installers, COM+ application setup)
- Microsoft Office macros performing legitimate document automation that spawn helper processes such as mail merge or report generation scripts
- Remote management products (RMM tools, monitoring agents) that use DCOM as a transport mechanism for legitimate administrative operations on managed endpoints
- COM+ application servers hosting business line applications that legitimately spawn worker processes via dllhost.exe as part of their normal operation
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.