Detection rules › Sigma

Potential CobaltStrike Process Patterns

Status
test
Severity
high
Log source
product windows, category process_creation
Author
Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects potential process patterns related to Cobalt Strike beacon activity

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Potential CobaltStrike Process Patterns
id: f35c5d71-b489-4e22-a115-f003df287317
status: test
description: Detects potential process patterns related to Cobalt Strike beacon activity
references:
    - https://hausec.com/2021/07/26/cobalt-strike-and-tradecraft/
    - https://thedfirreport.com/2021/08/29/cobalt-strike-a-defenders-guide/
author: Florian Roth (Nextron Systems), Nasreddine Bencherchali (Nextron Systems)
date: 2021-07-27
modified: 2023-03-29
tags:
    - attack.execution
    - attack.t1059
logsource:
    category: process_creation
    product: windows
detection:
    selection_generic_1:
        CommandLine|endswith: 'cmd.exe /C whoami'
        ParentImage|startswith: 'C:\Temp\'
    selection_generic_2:
        ParentImage|endswith:
            - '\runonce.exe'
            - '\dllhost.exe'
        CommandLine|contains|all:
            - 'cmd.exe /c echo'
            - '> \\\\.\\pipe'
    selection_conhost_1:
        ParentCommandLine|contains|all:
            - 'cmd.exe /C echo'
            - ' > \\\\.\\pipe'
        CommandLine|endswith: 'conhost.exe 0xffffffff -ForceV1'
    selection_conhost_2:
        ParentCommandLine|endswith: '/C whoami'
        CommandLine|endswith: 'conhost.exe 0xffffffff -ForceV1'
    condition: 1 of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

1 of selection_*

Stage 1: selection_generic_1

selection_generic_1:
    CommandLine|endswith: 'cmd.exe /C whoami'
    ParentImage|startswith: 'C:\Temp\'

Stage 2: selection_generic_2

selection_generic_2:
    ParentImage|endswith:
        - '\runonce.exe'
        - '\dllhost.exe'
    CommandLine|contains|all:
        - 'cmd.exe /c echo'
        - '> \\\\.\\pipe'

Stage 3: selection_conhost_1

selection_conhost_1:
    ParentCommandLine|contains|all:
        - 'cmd.exe /C echo'
        - ' > \\\\.\\pipe'
    CommandLine|endswith: 'conhost.exe 0xffffffff -ForceV1'

Stage 4: selection_conhost_2

selection_conhost_2:
    ParentCommandLine|endswith: '/C whoami'
    CommandLine|endswith: 'conhost.exe 0xffffffff -ForceV1'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLineends_with
  • cmd.exe /C whoami
  • conhost.exe 0xffffffff -ForceV1
CommandLinematch
  • > \\\\.\\pipe
  • cmd.exe /c echo
ParentCommandLineends_with
  • /C whoami
ParentCommandLinematch
  • > \\\\.\\pipe
  • cmd.exe /C echo
ParentImageends_with
  • \dllhost.exe corpus 7 (sigma 7)
  • \runonce.exe
ParentImagestarts_with
  • C:\Temp\