name: Powershell COM Hijacking InprocServer32 Modification id: ea61e291-af05-4716-932a-67faddb6ae6f version: 1 date: '2022-09-26' author: Michael Haag, Splunk type: TTP datamodel: - Endpoint 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. search: '`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`' 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. references: - https://attack.mitre.org/techniques/T1546/015/ - https://www.splunk.com/en_us/blog/security/hunting-for-malicious-powershell-using-script-block-logging.html - https://blog.cluster25.duskrise.com/2022/09/23/in-the-footsteps-of-the-fancy-bear-powerpoint-graphite/ - https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1546.015/T1546.015.md tags: analytic_story: - Malicious PowerShell asset_type: Endpoint cis20: - CIS 3 - CIS 5 - CIS 16 confidence: 80 context: - Source:Endpoint - Stage:Defense Evasion dataset: - https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.015/atomic_red_team/windows-powershell.log impact: 80 kill_chain_phases: - Exploitation - Installation message: A PowerShell script has been identified with InProcServer32 within the script code on $Computer$. mitre_attack_id: - T1546.015 - T1059 - T1059.001 nist: - DE.CM observable: - name: Computer type: Hostname role: - Victim product: - Splunk Enterprise - Splunk Enterprise Security - Splunk Cloud required_fields: - _time - ScriptBlockText - Opcode - Computer - UserID - EventCode risk_score: 64 security_domain: endpoint