Component Object Model (COM) Hijacking via Registry Modification
Adversaries may establish persistence by executing malicious content triggered by hijacked references to COM objects through Component Object Model (COM) hijacking via registry modification on Windows systems.
Component Object Model (COM) hijacking is a persistence and privilege escalation technique used by adversaries to execute malicious code by hijacking references to COM objects. This involves modifying specific registry keys to redirect COM object instantiation to attacker-controlled DLLs or executables. The technique is difficult to detect due to the legitimate use of COM objects by various applications and the operating system itself. This brief focuses on identifying suspicious registry modifications indicative of COM hijacking, while excluding known legitimate processes to minimize false positives. The original Elastic detection rule was published in November 2020 and last updated in May 2026, showcasing its continued relevance. This activity matters to defenders because successful COM hijacking allows attackers to execute arbitrary code with the privileges of the user or service that instantiates the hijacked COM object.
Attack Chain
- The attacker gains initial access to the system (e.g., through phishing or exploiting a vulnerability).
- The attacker identifies a target COM object to hijack by enumerating COM object entries in the registry.
- The attacker modifies the
InprocServer32orLocalServer32registry keys associated with the target COM object to point to a malicious DLL or executable. - The attacker may also modify the
DelegateExecuteregistry key to control how the COM object is executed. - A legitimate application or service attempts to instantiate the original COM object.
- Due to the registry modifications, the malicious DLL or executable is loaded and executed instead.
- The malicious code performs its intended actions, such as establishing persistence, escalating privileges, or executing arbitrary commands.
- The attacker maintains persistent access to the system and potentially gains elevated privileges through the hijacked COM object.
Impact
Successful COM hijacking enables attackers to establish persistent access to compromised systems and potentially escalate privileges. The impact can range from executing arbitrary code with user privileges to gaining system-level access, depending on the context in which the hijacked COM object is used. The Elastic detection rule aims to identify and prevent such attacks by detecting suspicious registry modifications, but the overall number of affected systems or specific sectors targeted by this technique are not specified in the original source.
Recommendation
- Enable Windows Registry auditing to capture registry modification events and activate the Sigma rule
Suspicious COM Hijack Registry Modificationto detect potential COM hijacking attempts. - Investigate any alerts generated by the Sigma rule, focusing on processes modifying COM-related registry keys and their associated executables.
- Implement code signing validation and monitor for unsigned or unexpected DLLs being loaded by legitimate processes, as indicated in the rule’s description.
- Regularly review and update the list of excluded processes and trusted code signers in the Sigma rule to minimize false positives.
- Deploy the EQL rule provided by Elastic, adjusting the
fromandindexfields to match your environment, and tune the process and signature exclusions for your environment. - Monitor for registry changes in
HKEY_USERShive related to COM objects, as these are considered less common and potentially malicious.
Detection coverage 2
Suspicious COM Hijack Registry Modification
mediumDetects suspicious modifications to COM object registry keys that may indicate COM hijacking attempts.
Suspicious COM Hijack Registry Modification - User Hive
mediumDetects suspicious modifications to COM object registry keys under the HKEY_USERS hive.
Detection queries are kept inside the platform. Get full rules →