From 38552e98cf850ee52ff77a03033ba30c81413fc7 Mon Sep 17 00:00:00 2001 From: WojciechLesicki Date: Tue, 25 May 2021 15:47:34 +0200 Subject: [PATCH 1/3] Adding some pipes --- rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml index 958bb676a..32d6de754 100644 --- a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml +++ b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml @@ -17,13 +17,15 @@ logsource: category: pipe_created definition: 'Note that you have to configure logging for Named Pipe Events in Sysmon config (Event ID 17)' detection: - selection_start: + selection_MSSE_start: PipeName|startswith: '\MSSE-' - selection_end: + selection_MSSE_end: PipeName|endswith: '-server' - selection_others: + selection_postex: + PipeName|startswith: '\postex_' + selection_msagent: PipeName|startswith: '\msagent_' - condition: selection_start and selection_end + condition: selection_MSSE_start and selection_MSSE_end or selection_postex or selection_msagent falsepositives: - Unknown level: critical From f1a0308e730c1cd9c9cb66aec5a35b541ee8aeb7 Mon Sep 17 00:00:00 2001 From: WojciechLesicki Date: Tue, 25 May 2021 21:07:23 +0200 Subject: [PATCH 2/3] Add one more pipe, references etc. --- .../windows/pipe_created/sysmon_mal_cobaltstrike.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml index 32d6de754..f07798711 100644 --- a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml +++ b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml @@ -6,8 +6,9 @@ references: - https://twitter.com/d4rksystem/status/1357010969264873472 - https://labs.f-secure.com/blog/detecting-cobalt-strike-default-modules-via-named-pipe-analysis/ - https://github.com/Neo23x0/sigma/issues/253 -date: 2021/04/23 -author: Florian Roth + - https://blog.cobaltstrike.com/2021/02/09/learn-pipe-fitting-for-all-of-your-offense-projects/ +date: 2021/05/25 +author: Florian Roth, Wojciech Lesicki tags: - attack.defense_evasion - attack.privilege_escalation @@ -15,7 +16,7 @@ tags: logsource: product: windows category: pipe_created - definition: 'Note that you have to configure logging for Named Pipe Events in Sysmon config (Event ID 17)' + definition: 'Note that you have to configure logging for Named Pipe Events in Sysmon config (Event ID 17 and Event ID 18). In the current popular sysmon configuration (https://github.com/SwiftOnSecurity/sysmon-config) this is not there, you have to add it yourself.' detection: selection_MSSE_start: PipeName|startswith: '\MSSE-' @@ -23,9 +24,11 @@ detection: PipeName|endswith: '-server' selection_postex: PipeName|startswith: '\postex_' + selection_postex_ssh: + PipeName|startswith: '\postex_ssh_' selection_msagent: PipeName|startswith: '\msagent_' - condition: selection_MSSE_start and selection_MSSE_end or selection_postex or selection_msagent + condition: selection_MSSE_start and selection_MSSE_end or selection_postex or or selection_postex_ssh or selection_msagent falsepositives: - Unknown level: critical From 8b707bc94821879f9aee2f16a59acae86f975578 Mon Sep 17 00:00:00 2001 From: WojciechLesicki Date: Tue, 25 May 2021 21:58:22 +0200 Subject: [PATCH 3/3] Added also \status_ pipe. --- rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml index f07798711..5ce5b4f3d 100644 --- a/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml +++ b/rules/windows/pipe_created/sysmon_mal_cobaltstrike.yml @@ -26,9 +26,11 @@ detection: PipeName|startswith: '\postex_' selection_postex_ssh: PipeName|startswith: '\postex_ssh_' + selection_status: + PipeName|startswith: '\status_' selection_msagent: PipeName|startswith: '\msagent_' - condition: selection_MSSE_start and selection_MSSE_end or selection_postex or or selection_postex_ssh or selection_msagent + condition: selection_MSSE_start and selection_MSSE_end or selection_postex or selection_postex_ssh or selection_status or selection_msagent falsepositives: - Unknown level: critical