Component Object Model Hijacking
Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by executing malicious content triggered by hijacked references to COM objects.
Elastic rule (View on GitHub)
1[metadata]
2creation_date = "2020/11/18"
3integration = ["endpoint"]
4maturity = "production"
5updated_date = "2026/09/18"
6
7[rule]
8author = ["Elastic"]
9description = """
10Identifies Component Object Model (COM) hijacking via registry modification. Adversaries may establish persistence by
11executing malicious content triggered by hijacked references to COM objects.
12"""
13from = "now-9m"
14index = ["logs-endpoint.events.registry-*"]
15language = "eql"
16license = "Elastic License v2"
17name = "Component Object Model Hijacking"
18note = """## Triage and analysis
19
20### Investigating Component Object Model Hijacking
21
22Adversaries can insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means of persistence.
23
24#### Possible investigation steps
25
26- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
27- Identify the user account that performed the action and whether it should perform this kind of action.
28- Investigate other alerts associated with the user/host during the past 48 hours.
29- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
30- Retrieve the file referenced in the registry and determine if it is malicious:
31 - Use a private sandboxed malware analysis system to perform analysis.
32 - Observe and collect information about the following activities:
33 - Attempts to contact external domains and addresses.
34 - File and registry access, modification, and creation activities.
35 - Service creation and launch activities.
36 - Scheduled task creation.
37 - Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.
38 - Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
39
40### False positive analysis
41
42- Some Microsoft executables will reference the LocalServer32 registry key value for the location of external COM objects.
43
44### Response and remediation
45
46- Initiate the incident response process based on the outcome of the triage.
47- Isolate the involved host to prevent further post-compromise behavior.
48- If the triage identified malware, search the environment for additional compromised hosts.
49 - Implement temporary network rules, procedures, and segmentation to contain the malware.
50 - Stop suspicious processes.
51 - Immediately block the identified indicators of compromise (IoCs).
52 - Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
53- Remove and block malicious artifacts identified during triage.
54- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
55- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
56- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
57- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
58"""
59
60setup = """## Setup
61
62This rule is designed for data generated by [Elastic Defend](https://www.elastic.co/security/endpoint-security), which provides native endpoint detection and response, along with event enrichments designed to work with our detection rules.
63
64Setup instructions: https://ela.st/install-elastic-defend
65"""
66
67references = [
68 "https://bohops.com/2018/08/18/abusing-the-com-registry-structure-part-2-loading-techniques-for-evasion-and-persistence/",
69]
70risk_score = 21
71rule_id = "16a52c14-7883-47af-8745-9357803f0d4c"
72severity = "low"
73tags = [
74 "Domain: Endpoint",
75 "OS: Windows",
76 "Use Case: Threat Detection",
77 "Tactic: Persistence",
78 "Tactic: Defense Evasion",
79 "Tactic: Privilege Escalation",
80 "Resources: Investigation Guide",
81 "Data Source: Elastic Defend",
82 "Noise: High",
83 "Performance: Normal",
84 "Profile: Aggressive",
85 "Rule Type: Event Correlation (EQL)",
86 "Platform: Windows",
87]
88timestamp_override = "event.ingested"
89type = "eql"
90
91query = '''
92registry where host.os.type == "windows" and event.type == "change" and
93 /* not necessary but good for filtering privileged installations */
94 user.domain != "NT AUTHORITY" and process.executable != null and
95 (
96 (
97 registry.path : "HK*\\InprocServer32\\" and
98 registry.data.strings: ("scrobj.dll", "?:\\*\\scrobj.dll") and
99 not registry.path : "*\\{06290BD*-48AA-11D2-8432-006008C3FBFC}\\*"
100 ) or
101
102 (
103 registry.path : "HKLM\\*\\InProcServer32\\*" and
104 registry.data.strings : ("*\\Users\\*", "*\\ProgramData\\*")
105 ) or
106
107 /* in general COM Registry changes on Users Hive is less noisy and worth alerting */
108 (
109 registry.path : (
110 "HKEY_USERS\\*\\InprocServer32\\",
111 "HKEY_USERS\\*\\LocalServer32\\",
112 "HKEY_USERS\\*\\DelegateExecute",
113 "HKEY_USERS\\*\\TreatAs\\",
114 "HKEY_USERS\\*\\ScriptletURL*",
115 "HKEY_USERS\\*\\TypeLib*\\Win*"
116 ) and
117 not registry.data.strings : (
118 /* COM related to Windows Spotlight feature */
119 "{4813071a-41ad-44a2-9835-886d2f63ca30}",
120
121 /* AppX/MSIX DelegateExecute handlers: execute, protocol, file */
122 "{A56A841F-E974-45C1-8001-7E3F8A085917}",
123 "{4ED3A719-CEA8-4BD9-910D-E252F997AFC2}",
124 "{BFEC0C93-0B7D-4F2C-B09C-AFFFC4BDAE78}"
125 )
126 )
127 ) and
128
129 not (
130 process.code_signature.trusted == true and
131 process.code_signature.subject_name in (
132 "Island Technology Inc.", "Google LLC", "Grammarly, Inc.", "Dropbox, Inc", "REFINITIV US LLC", "HP Inc.", "Adobe Inc.",
133 "Citrix Systems, Inc.", "Veeam Software Group GmbH", "Zhuhai Kingsoft Office Software Co., Ltd.", "Oracle America, Inc.",
134 "Brave Software, Inc.", "DeepL SE", "Opera Norway AS", "Thomas Braun", "Slack Technologies, LLC", "Spotify AB",
135 "Vivaldi Technologies AS"
136 )
137 ) and
138
139 /* excludes trusted applications registering their own COM components */
140 not (
141 process.code_signature.trusted == true and
142 (
143 (
144 process.name : "OneDrive.Sync.Service.exe" and
145 process.code_signature.subject_name == "Microsoft Corporation" and
146 registry.data.strings : (
147 "*\\Microsoft\\OneDrive\\*\\OneDrive.Sync.Service.exe*",
148 "*\\Microsoft\\OneDrive\\*\\OneDrive.Sync.Service.dll*"
149 )
150 ) or
151 (
152 process.executable : "?:\\Users\\*\\AppData\\Local\\Kingsoft\\WPS Office\\*\\office6\\ksomisc.exe" and
153 process.code_signature.subject_name == "WPS SOFTWARE PTE. LTD." and
154 registry.data.strings : "*\\Kingsoft\\WPS Office\\*"
155 ) or
156 (
157 process.name : "claude.exe" and
158 process.code_signature.subject_name == "Anthropic, PBC" and
159 registry.data.strings : (
160 "*\\Users\\*\\AppData\\Local\\AnthropicClaude\\app-*\\claude.exe*",
161 "*\\ProgramData\\*\\AnthropicClaude\\app-*\\claude.exe*"
162 )
163 )
164 )
165 ) and
166
167 /* excludes Microsoft signed noisy processes */
168 not
169 (
170 process.name : (
171 "OneDrive.exe", "OneDriveSetup.exe", "FileSyncConfig.exe", "Teams.exe", "MicrosoftEdgeUpdate.exe", "msrdcw.exe",
172 "MicrosoftEdgeUpdateComRegisterShell64.exe", "setup.exe", "PowerToys.PowerLauncher.exe"
173 ) and
174 process.code_signature.trusted == true and process.code_signature.subject_name in ("Microsoft Windows", "Microsoft Corporation")
175 ) and
176
177 not process.executable : (
178 "?:\\$WINDOWS.~BT\\Sources\\SetupHost.exe",
179 "?:\\Program Files (x86)\\*.exe",
180 "?:\\Program Files\\*.exe",
181 "?:\\ProgramData\\4Team\\4Team-Updater\\4Team-Updater-Helper.exe",
182 "?:\\ProgramData\\Lenovo\\Udc\\Hosts\\x64\\MessagingPlugin.exe",
183 "?:\\ProgramData\\Microsoft\\Windows Defender\\Platform\\*\\MsMpEng.exe",
184 "?:\\Users\\*\\AppData\\Local\\Wondershare\\Wondershare NativePush\\WsToastNotification.exe",
185 "?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe",
186 "?:\\Windows\\System32\\FMToastNotification.exe",
187 "?:\\Windows\\System32\\msiexec.exe",
188 "?:\\Windows\\System32\\svchost.exe",
189 "?:\\Windows\\SysWOW64\\regsvr32.exe",
190 "?:\\Windows\\System32\\regsvr32.exe",
191 "\\Device\\Mup\\*\\Kufer\\KuferSQL\\BasysSQL.exe"
192 )
193'''
194
195
196[[rule.threat]]
197framework = "MITRE ATT&CK"
198[[rule.threat.technique]]
199id = "T1546"
200name = "Event Triggered Execution"
201reference = "https://attack.mitre.org/techniques/T1546/"
202[[rule.threat.technique.subtechnique]]
203id = "T1546.015"
204name = "Component Object Model Hijacking"
205reference = "https://attack.mitre.org/techniques/T1546/015/"
206
207
208
209[rule.threat.tactic]
210id = "TA0003"
211name = "Persistence"
212reference = "https://attack.mitre.org/tactics/TA0003/"
213[[rule.threat]]
214framework = "MITRE ATT&CK"
215[[rule.threat.technique]]
216id = "T1546"
217name = "Event Triggered Execution"
218reference = "https://attack.mitre.org/techniques/T1546/"
219[[rule.threat.technique.subtechnique]]
220id = "T1546.015"
221name = "Component Object Model Hijacking"
222reference = "https://attack.mitre.org/techniques/T1546/015/"
223
224
225
226[rule.threat.tactic]
227id = "TA0004"
228name = "Privilege Escalation"
229reference = "https://attack.mitre.org/tactics/TA0004/"
230[[rule.threat]]
231framework = "MITRE ATT&CK"
232[[rule.threat.technique]]
233id = "T1112"
234name = "Modify Registry"
235reference = "https://attack.mitre.org/techniques/T1112/"
236
237
238[rule.threat.tactic]
239id = "TA0005"
240name = "Defense Evasion"
241reference = "https://attack.mitre.org/tactics/TA0005/"
Triage and analysis
Investigating Component Object Model Hijacking
Adversaries can insert malicious code that can be executed in place of legitimate software through hijacking the COM references and relationships as a means of persistence.
Possible investigation steps
- Investigate the process execution chain (parent process tree) for unknown processes. Examine their executable files for prevalence, whether they are located in expected locations, and if they are signed with valid digital signatures.
- Identify the user account that performed the action and whether it should perform this kind of action.
- Investigate other alerts associated with the user/host during the past 48 hours.
- Assess whether this behavior is prevalent in the environment by looking for similar occurrences across hosts.
- Retrieve the file referenced in the registry and determine if it is malicious:
- Use a private sandboxed malware analysis system to perform analysis.
- Observe and collect information about the following activities:
- Attempts to contact external domains and addresses.
- File and registry access, modification, and creation activities.
- Service creation and launch activities.
- Scheduled task creation.
- Observe and collect information about the following activities:
- Use the PowerShell Get-FileHash cmdlet to get the files' SHA-256 hash values.
- Search for the existence and reputation of the hashes in resources like VirusTotal, Hybrid-Analysis, CISCO Talos, Any.run, etc.
- Use a private sandboxed malware analysis system to perform analysis.
False positive analysis
- Some Microsoft executables will reference the LocalServer32 registry key value for the location of external COM objects.
Response and remediation
- Initiate the incident response process based on the outcome of the triage.
- Isolate the involved host to prevent further post-compromise behavior.
- If the triage identified malware, search the environment for additional compromised hosts.
- Implement temporary network rules, procedures, and segmentation to contain the malware.
- Stop suspicious processes.
- Immediately block the identified indicators of compromise (IoCs).
- Inspect the affected systems for additional malware backdoors like reverse shells, reverse proxies, or droppers that attackers could use to reinfect the system.
- Remove and block malicious artifacts identified during triage.
- Investigate credential exposure on systems compromised or used by the attacker to ensure all compromised accounts are identified. Reset passwords for these accounts and other potentially compromised credentials, such as email, business systems, and web services.
- Run a full antimalware scan. This may reveal additional artifacts left in the system, persistence mechanisms, and malware components.
- Determine the initial vector abused by the attacker and take action to prevent reinfection through the same vector.
- Using the incident response data, update logging and audit policies to improve the mean time to detect (MTTD) and the mean time to respond (MTTR).
References
Related rules
- Account Discovery Command via SYSTEM Account
- Clearing Windows Event Logs
- Code Signing Policy Modification Through Registry
- Disabling Lsa Protection via Registry Modification
- Disabling User Account Control via Registry Modification