Files
splunk-security_content/detections/endpoint/powershell_execute_com_object.yml
2024-06-26 14:41:53 +00:00

66 lines
2.5 KiB
YAML

name: Powershell Execute COM Object
id: 65711630-f9bf-11eb-8d72-acde48001122
version: 3
date: '2024-05-09'
author: Teoderick Contreras, Splunk
status: production
type: TTP
description: The following analytic detects the execution of a COM CLSID through PowerShell.
It leverages EventCode 4104 and searches for specific script block text indicating
the creation of a COM object. This activity is significant as it is commonly used
by adversaries and malware, such as the Conti ransomware, to execute commands, potentially
for privilege escalation or bypassing User Account Control (UAC). If confirmed malicious,
this technique could allow attackers to gain elevated privileges or persist within
the environment, posing a significant security risk.
data_source:
- Powershell Script Block Logging 4104
search: '`powershell` EventCode=4104 ScriptBlockText = "*CreateInstance([type]::GetTypeFromCLSID*"
| stats count min(_time) as firstTime max(_time) as lastTime by EventCode ScriptBlockText
Computer UserID | rename Computer as dest | rename UserID as user | `security_content_ctime(firstTime)`
| `security_content_ctime(lastTime)` | `powershell_execute_com_object_filter`'
how_to_implement: To successfully implement this search, you need to be ingesting
logs with the process name, parent process, and command-line executions from your
endpoints. If you are using Sysmon, you must have at least version 6.0.4 of the
Sysmon TA.
known_false_positives: network operrator may use this command.
references:
- https://threadreaderapp.com/thread/1423361119926816776.html
- https://www.splunk.com/en_us/blog/security/hunting-for-malicious-powershell-using-script-block-logging.html
tags:
analytic_story:
- Ransomware
- Malicious PowerShell
- Hermetic Wiper
- Data Destruction
asset_type: Endpoint
confidence: 50
impact: 10
message: A suspicious powershell script contains COM CLSID command on host $dest$
mitre_attack_id:
- T1546.015
- T1546
- T1059.001
observable:
- name: dest
type: Hostname
role:
- Victim
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
required_fields:
- _time
- ScriptBlockText
- Computer
- EventCode
risk_score: 5
security_domain: endpoint
tests:
- name: True Positive Test
attack_data:
- data:
https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1546.015/pwh_com_object/windows-powershell-xml.log
source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
sourcetype: xmlwineventlog