name: CMD Echo Pipe - Escalation id: eb277ba0-b96b-11eb-b00e-acde48001122 version: 2 date: '2021-05-20' author: Michael Haag, Splunk status: production type: TTP description: This analytic identifies a common behavior by Cobalt Strike and other frameworks where the adversary will escalate privileges, either via `jump` (Cobalt Strike PTH) or `getsystem`, using named-pipe impersonation. A suspicious event will look like `cmd.exe /c echo 4sgryt3436 > \\.\Pipe\5erg53`. data_source: - Sysmon Event ID 1 search: selection1: OriginalFileName: Cmd.Exe selection2: Image|endswith: cmd.exe selection3: CommandLine: '*%comspec%*' selection4: CommandLine: '*pipe*' selection5: CommandLine: '*echo*' condition: (selection1 or selection2) or selection3 or selection4 or selection5 how_to_implement: To successfully implement this search you need to be ingesting information on process that include the name of the process responsible for the changes from your endpoints into the `Endpoint` datamodel in the `Processes` node. In addition, confirm the latest CIM App 4.20 or higher is installed and the latest TA for the endpoint product. known_false_positives: Unknown. It is possible filtering may be required to ensure fidelity. references: - https://redcanary.com/threat-detection-report/threats/cobalt-strike/ - https://github.com/rapid7/meterpreter/blob/master/source/extensions/priv/server/elevate/namedpipe.c tags: analytic_story: - Cobalt Strike asset_type: Endpoint confidence: 80 impact: 80 message: An instance of $parent_process_name$ spawning $process_name$ was identified on endpoint $dest$ by user $user$ potentially performing privilege escalation using named pipes related to Cobalt Strike and other frameworks. mitre_attack_id: - T1059 - T1059.003 - T1543.003 - T1543 observable: - name: user type: User role: - Victim - name: dest type: Hostname role: - Victim - name: parent_process_name type: Process role: - Parent Process - name: process_name type: Process role: - Child Process product: - Splunk Enterprise - Splunk Enterprise Security - Splunk Cloud risk_score: 64 security_domain: endpoint tests: - name: True Positive Test attack_data: - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1055/cobalt_strike/windows-sysmon.log source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational sourcetype: xmlwineventlog