CobaltStrike Named Pipe
Detects the creation of a named pipe as used by CobaltStrike
Sigma rule (View on GitHub)
1title: CobaltStrike Named Pipe
2id: d5601f8c-b26f-4ab0-9035-69e11a8d4ad2
3related:
4 - id: 85adeb13-4fc9-4e68-8a4a-c7cb2c336eb7 # Patterns
5 type: similar
6 - id: 0e7163d4-9e19-4fa7-9be6-000c61aad77a # Regex
7 type: similar
8status: test
9description: Detects the creation of a named pipe as used by CobaltStrike
10references:
11 - https://twitter.com/d4rksystem/status/1357010969264873472
12 - https://labs.f-secure.com/blog/detecting-cobalt-strike-default-modules-via-named-pipe-analysis/
13 - https://github.com/SigmaHQ/sigma/issues/253
14 - https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/
15 - https://redcanary.com/threat-detection-report/threats/cobalt-strike/
16author: Florian Roth (Nextron Systems), Wojciech Lesicki
17date: 2021-05-25
18modified: 2022-10-31
19tags:
20 - attack.defense-evasion
21 - attack.privilege-escalation
22 - attack.t1055
23logsource:
24 product: windows
25 category: pipe_created
26 definition: 'Note that you have to configure logging for Named Pipe Events in Sysmon config (Event ID 17 and Event ID 18). The basic configuration is in popular sysmon configuration (https://github.com/SwiftOnSecurity/sysmon-config), but it is worth verifying. You can also use other repo, e.g. https://github.com/Neo23x0/sysmon-config, https://github.com/olafhartong/sysmon-modular. How to test detection? You can always use Cobalt Strike, but also you can check powershell script from this site https://svch0st.medium.com/guide-to-named-pipes-and-hunting-for-cobalt-strike-pipes-dc46b2c5f575'
27detection:
28 selection_MSSE:
29 PipeName|contains|all:
30 - '\MSSE-'
31 - '-server'
32 selection_postex:
33 PipeName|startswith: '\postex_' # Also include the pipe "\postex_ssh_"
34 selection_status:
35 PipeName|startswith: '\status_'
36 selection_msagent:
37 PipeName|startswith: '\msagent_'
38 selection_mojo:
39 PipeName|startswith: '\mojo_'
40 selection_interprocess:
41 PipeName|startswith: '\interprocess_'
42 selection_samr:
43 PipeName|startswith: '\samr_'
44 selection_netlogon:
45 PipeName|startswith: '\netlogon_'
46 selection_srvsvc:
47 PipeName|startswith: '\srvsvc_'
48 selection_lsarpc:
49 PipeName|startswith: '\lsarpc_'
50 selection_wkssvc:
51 PipeName|startswith: '\wkssvc_'
52 condition: 1 of selection*
53falsepositives:
54 - Unknown
55level: critical
References
Related rules
- APT PRIVATELOG Image Load Pattern
- CobaltStrike Named Pipe Pattern Regex
- CobaltStrike Named Pipe Patterns
- HackTool - CoercedPotato Execution
- Malicious Named Pipe Created