Component Object Model
Adversaries abuse the Windows Component Object Model (COM) to execute arbitrary code locally. COM is a binary interface standard enabling inter-process communication between software objects through defined interfaces. Threat actors leverage COM by instantiating known objects (WScript.Shell, Shell.Application, MMC20.Application, Schedule.Service) via scripting hosts, hijacking COM object registrations in HKCU to redirect execution to malicious DLLs, or using elevated COM interfaces (CMLuaUtil) to bypass User Account Control. Real-world use includes TrickBot and Latrodectus creating scheduled tasks via ITaskService, MuddyWater executing payloads via DCOM loopback, Gamaredon injecting macros via Microsoft.Office.Interop objects, and Raspberry Robin abusing CMLuaUtil for UAC bypass. Unlike DCOM (T1021.003), this technique focuses on local COM execution rather than remote lateral movement.
let SuspiciousCOMObjects = dynamic([
"MMC20.Application", "ShellWindows", "ShellBrowserWindow",
"WScript.Shell", "Shell.Application", "Schedule.Service",
"CMLuaUtil", "InternetExplorer.Application",
"Microsoft.Office.Interop",
"49B2791A-B1AE-4C90-9B8E-E860BA07F889",
"9BA05972-F6A8-11CF-A442-00A0C91F3880",
"C08AFD90-F2A1-11D1-8455-00A0C91F3880",
"6EDD6D74-C007-4E75-B76A-E5740995E24C",
"0F87369F-A4E5-4CFC-BD3E-73E6154572DD"
]);
// Branch 1: Script host COM object instantiation
let ScriptCOMAbuse = DeviceProcessEvents
| where Timestamp > ago(24h)
| where FileName in~ ("powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe", "mshta.exe")
| where ProcessCommandLine has_any (SuspiciousCOMObjects)
or ProcessCommandLine has "-ComObject"
or ProcessCommandLine has "CreateObject("
or ProcessCommandLine has "GetTypeFromCLSID"
or (ProcessCommandLine has "activator" and ProcessCommandLine has "CreateInstance")
| extend DetectionSource = "ScriptCOMAbuse"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionSource;
// Branch 2: COM surrogate (dllhost.exe) spawning unexpected child processes
let DllHostChildren = DeviceProcessEvents
| where Timestamp > ago(24h)
| where InitiatingProcessFileName =~ "dllhost.exe"
| where FileName in~ ("cmd.exe", "powershell.exe", "pwsh.exe", "wscript.exe", "cscript.exe",
"mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe",
"net.exe", "net1.exe", "whoami.exe", "ipconfig.exe",
"curl.exe", "wget.exe", "bitsadmin.exe")
| extend DetectionSource = "DllHostSurrogate"
| project Timestamp, DeviceName, AccountName, FileName, ProcessCommandLine,
InitiatingProcessFileName, InitiatingProcessCommandLine, DetectionSource;
// Branch 3: COM hijacking via HKCU CLSID registry modification
let COMHijacking = DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey contains @"HKEY_CURRENT_USER\Software\Classes\CLSID"
| where RegistryValueName in~ ("InProcServer32", "LocalServer32", "InProcServer")
| where RegistryValueData !has @"C:\Windows\System32"
and RegistryValueData !has @"C:\Program Files"
and RegistryValueData !has @"C:\Program Files (x86)"
| extend DetectionSource = "COMHijacking"
| project Timestamp, DeviceName,
AccountName = InitiatingProcessAccountName,
FileName = InitiatingProcessFileName,
ProcessCommandLine = strcat("Registry: ", RegistryKey, " -> ", RegistryValueData),
InitiatingProcessFileName,
InitiatingProcessCommandLine,
DetectionSource;
// Union all detection branches
ScriptCOMAbuse
| union DllHostChildren
| union COMHijacking
| sort by Timestamp desc Data Sources
Required Tables
False Positives
- IT administration scripts using New-Object -ComObject Shell.Application or WScript.Shell for legitimate file operations and system management
- Software installers and MSI packages that use COM objects during installation (WScript.Shell to write registry keys, Shell.Application to extract files)
- Legitimate user-space COM registration by applications such as Python pywin32, LibreOffice, or other third-party software that registers DLLs under HKCU\Software\Classes\CLSID
- Monitoring agents and RMM tools (SolarWinds, ConnectWise, Datto) that use COM interfaces for system inventory or remote management
- Development environments (Visual Studio, Python, Node.js) that routinely invoke COM interfaces for IDE features or build automation
References (10)
- https://attack.mitre.org/techniques/T1559/001/
- https://www.fireeye.com/blog/threat-research/2019/06/hunting-com-objects.html
- https://msdn.microsoft.com/library/windows/desktop/ms680573.aspx
- https://enigma0x3.net/2017/01/05/lateral-movement-using-the-mmc20-application-com-object/
- https://googleprojectzero.blogspot.com/2018/04/windows-exploitation-tricks-exploiting.html
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1559.001/T1559.001.md
- https://learn.microsoft.com/en-us/windows/win32/com/com-technical-overview
- https://learn.microsoft.com/en-us/defender-endpoint/advanced-hunting-deviceregistryevents-table
- https://www.elastic.co/security-labs/exploring-the-latrodectus-payload
- https://www.welivesecurity.com/2020/10/02/eset-discovers-trickbot-new-module-targeting/
Unlock Pro Content
Get the full detection package for T1559.001 including response playbook, investigation guide, and atomic red team tests.