Detection rules › Sigma

Operator Bloopers Cobalt Strike Commands

Status
test
Severity
high
Log source
product windows, category process_creation
Author
_pete_0, TheDFIRReport
Source
github.com/SigmaHQ/sigma

Detects use of Cobalt Strike commands accidentally entered in the CMD shell

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Operator Bloopers Cobalt Strike Commands
id: 647c7b9e-d784-4fda-b9a0-45c565a7b729
related:
    - id: 4f154fb6-27d1-4813-a759-78b93e0b9c48
      type: similar
status: test
description: Detects use of Cobalt Strike commands accidentally entered in the CMD shell
references:
    - https://hstechdocs.helpsystems.com/manuals/cobaltstrike/current/userguide/content/cobalt-4-5-user-guide.pdf
    - https://thedfirreport.com/2021/10/04/bazarloader-and-the-conti-leaks/
    - https://thedfirreport.com/2022/06/16/sans-ransomware-summit-2022-can-you-detect-this/
author: _pete_0, TheDFIRReport
date: 2022-05-06
modified: 2023-01-30
tags:
    - attack.execution
    - attack.t1059.003
    - stp.1u
logsource:
    category: process_creation
    product: windows
detection:
    selection_img:
        - OriginalFileName: 'Cmd.Exe'
        - Image|endswith: '\cmd.exe'
    selection_cli:
        CommandLine|startswith:
            - 'cmd '
            - 'cmd.exe'
            - 'c:\windows\system32\cmd.exe'
        CommandLine|contains:
            - 'psinject'
            - 'spawnas'
            - 'make_token'
            - 'remote-exec'
            - 'rev2self'
            - 'dcsync'
            - 'logonpasswords'
            - 'execute-assembly'
            - 'getsystem'
    condition: all of selection_*
falsepositives:
    - Unknown
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - OriginalFileName: 'Cmd.Exe'
    - Image|endswith: '\cmd.exe'

Stage 2: selection_cli

selection_cli:
    CommandLine|startswith:
        - 'cmd '
        - 'cmd.exe'
        - 'c:\windows\system32\cmd.exe'
    CommandLine|contains:
        - 'psinject'
        - 'spawnas'
        - 'make_token'
        - 'remote-exec'
        - 'rev2self'
        - 'dcsync'
        - 'logonpasswords'
        - 'execute-assembly'
        - 'getsystem'

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
CommandLinematch
  • dcsync
  • execute-assembly
  • getsystem
  • logonpasswords
  • make_token
  • psinject
  • remote-exec
  • rev2self
  • spawnas
CommandLinestarts_with
  • c:\windows\system32\cmd.exe
  • cmd
  • cmd.exe
Imageends_with
  • \cmd.exe corpus 130 (sigma 130)
OriginalFileNameeq
  • Cmd.Exe corpus 65 (sigma 43, splunk 17, elastic 5)