Detect Component Object Model in Splunk
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.
MITRE ATT&CK
- Tactic
- Execution
- Technique
- T1559 Inter-Process Communication
- Sub-technique
- T1559.001 Component Object Model
- Canonical reference
- https://attack.mitre.org/techniques/T1559/001/
SPL Detection Query
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational"
(EventCode=1 OR EventCode=12 OR EventCode=13)
| eval is_script_host=if(EventCode=1 AND match(Image, "(?i)\\\\(powershell|pwsh|wscript|cscript|mshta)\\.exe$"), 1, 0)
| eval is_com_pattern=if(
is_script_host=1 AND match(CommandLine,
"(?i)(-ComObject|CreateObject\\(|GetTypeFromCLSID|activator.*CreateInstance|MMC20\\.Application|ShellWindows|ShellBrowserWindow|Schedule\\.Service|WScript\\.Shell|Shell\\.Application|CMLuaUtil|49B2791A|9BA05972|C08AFD90|6EDD6D74|0F87369F|Microsoft\\.Office\\.Interop)"),
1, 0)
| eval is_dllhost_child=if(
EventCode=1
AND match(ParentImage, "(?i)\\\\dllhost\\.exe$")
AND match(Image, "(?i)\\\\(cmd|powershell|pwsh|wscript|cscript|mshta|rundll32|regsvr32|certutil|net|net1|whoami|curl|wget|bitsadmin)\\.exe$"),
1, 0)
| eval is_com_hijack=if(
(EventCode=12 OR EventCode=13)
AND match(TargetObject, "(?i)HKCU\\\\Software\\\\Classes\\\\CLSID")
AND match(TargetObject, "(?i)(InProcServer32|LocalServer32|InProcServer)")
AND NOT match(Details, "(?i)(C:\\\\Windows\\\\System32|C:\\\\Program Files)"),
1, 0)
| where is_com_pattern=1 OR is_dllhost_child=1 OR is_com_hijack=1
| eval DetectionSource=case(
is_com_hijack=1, "COMHijacking",
is_dllhost_child=1, "DllHostSurrogate",
is_com_pattern=1, "ScriptCOMAbuse",
true(), "Unknown")
| eval ProcessPath=coalesce(Image, "N/A")
| eval CmdLine=coalesce(CommandLine, Details, "N/A")
| eval ParentProc=coalesce(ParentImage, "N/A")
| eval RegistryKey=coalesce(TargetObject, "N/A")
| table _time, host, User, ProcessPath, CmdLine, ParentProc, ParentCommandLine, RegistryKey, DetectionSource
| sort - _time Detects COM abuse using Sysmon Event ID 1 (Process Creation) and Event IDs 12/13 (Registry Object Create/Set Value). Evaluates three detection branches: (1) scripting hosts (PowerShell, WScript, CScript, MSHTA) executing known COM ProgIDs or CLSIDs including Schedule.Service, WScript.Shell, MMC20.Application, and CMLuaUtil; (2) dllhost.exe COM surrogate spawning suspicious child processes; (3) registry writes under HKCU\Software\Classes\CLSID pointing to non-standard DLL paths, indicating COM hijacking. The DetectionSource field indicates which branch triggered.
Data Sources
Required Sourcetypes
False Positives & Tuning
- 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
- Legitimate user-space COM registration by applications such as Python pywin32, LibreOffice, or third-party software registering DLLs under HKCU\Software\Classes\CLSID
- Monitoring agents and RMM tools that use COM interfaces for system inventory or remote management
- Development environments that routinely invoke COM interfaces for IDE features or build automation
Other platforms for T1559.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.
- Test 1Scheduled Task Creation via ITaskService COM Interface
Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Schedule.Service' and 'ITaskService'. Windows Task Scheduler Operational log Event ID 106 (task registered) for 'df00tech-COM-test'. Security Event ID 4698 (scheduled task created) if task auditing is enabled. PowerShell Script Block Log Event ID 4104 with the full COM invocation code.
- Test 2Shell.Application COM Object Code Execution
Expected signal: Sysmon Event ID 1: Process Create for powershell.exe with CommandLine containing 'Shell.Application' and 'ShellExecute'. Second Sysmon Event ID 1 for calc.exe with ParentImage=explorer.exe or svchost.exe (the COM process host — ShellExecute routes through explorer.exe's COM server). Security Event ID 4688 for calc.exe process creation. PowerShell Script Block Log Event ID 4104.
- Test 3WScript.Shell COM Execution with Run Method
Expected signal: Sysmon Event ID 1: powershell.exe with 'WScript.Shell' in CommandLine. Sysmon Event ID 1: cmd.exe spawned (parent will be wscript.exe or svchost.exe depending on activation context, NOT powershell.exe). Sysmon Event ID 11: file create for df00tech-com-test.txt. PowerShell Script Block Log Event ID 4104.
- Test 4COM Hijacking via HKCU CLSID Registration
Expected signal: Sysmon Event ID 12 (Registry Object Create): TargetObject=HKCU\Software\Classes\CLSID\{DF000001-...}\InProcServer32. Sysmon Event ID 13 (Registry Value Set): TargetObject containing InProcServer32 with Details=%APPDATA%\df00tech-evil.dll. Security Event ID 4657 (registry value modified) if object access auditing is enabled. The ThreadingModel value is a hallmark of legitimate InProcServer32 registrations that malware mimics.
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.