Try in Splunk Security Cloud

Description

The following analytic utilizes PowerShell ScriptBlock Logging to identify a script that is attempting to modify or add a component object model to inprocserver32 path within the registry.

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

  • Last Updated: 2022-09-26
  • Author: Michael Haag, Splunk
  • ID: ea61e291-af05-4716-932a-67faddb6ae6f

Annotations

ATT&CK

ATT&CK

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
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
`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`

Macros

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

RBA

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.

Reference

Test Dataset

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

source | version: 1