Try in Splunk Security Cloud


The following analytic detects attempts to modify or add a Component Object Model (COM) entry to the InProcServer32 path within the registry using PowerShell. It leverages PowerShell ScriptBlock Logging (EventCode 4104) to identify suspicious script blocks that target the InProcServer32 registry path. This activity is significant because modifying COM objects can be used for persistence or privilege escalation by attackers. If confirmed malicious, this could allow an attacker to execute arbitrary code or maintain persistent access to the compromised system, posing a severe security risk.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2024-05-21
  • Author: Michael Haag, Splunk
  • ID: ea61e291-af05-4716-932a-67faddb6ae6f




ID Technique Tactic
T1546.015 Component Object Model Hijacking Privilege Escalation, Persistence
T1059 Command and Scripting Interpreter Execution
T1059.001 PowerShell Execution
Kill Chain Phase
  • Exploitation
  • Installation
  • DE.CM
  • CIS 10
`powershell` EventCode=4104 ScriptBlockText = "*Software\\Classes\\CLSID\\*\\InProcServer32*" 
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText Computer UserID 
| `security_content_ctime(firstTime)` 
| `security_content_ctime(lastTime)` 
| `powershell_com_hijacking_inprocserver32_modification_filter`


The SPL above uses the following Macros:

:information_source: powershell_com_hijacking_inprocserver32_modification_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Required fields

List of fields required to use this analytic.

  • _time
  • ScriptBlockText
  • Opcode
  • Computer
  • UserID
  • EventCode

How To Implement

The following analytic requires PowerShell operational logs to be imported. Modify the PowerShell macro as needed to match the sourcetype or add index. This analytic is specific to 4104, or PowerShell Script Block Logging.

Known False Positives

False positives will be present if any scripts are adding to inprocserver32. Filter as needed.

Associated Analytic Story


Risk Score Impact Confidence Message
64.0 80 80 A PowerShell script has been identified with InProcServer32 within the script code on $Computer$.

:information_source: The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.


Test Dataset

Replay any dataset to Splunk Enterprise by using our tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range

source | version: 2