Detection rules › Sigma

Potential CobaltStrike Service Installations - Registry

Status
test
Severity
high
Log source
product windows, category registry_set
Author
Wojciech Lesicki
Source
github.com/SigmaHQ/sigma

Detects known malicious service installs that appear in cases in which a Cobalt Strike beacon elevates privileges or lateral movement.

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 13RegistryEvent (Value Set)

Rule body yaml

title: Potential CobaltStrike Service Installations - Registry
id: 61a7697c-cb79-42a8-a2ff-5f0cdfae0130
status: test
description: |
    Detects known malicious service installs that appear in cases in which a Cobalt Strike beacon elevates privileges or lateral movement.
references:
    - https://www.sans.org/webcasts/tech-tuesday-workshop-cobalt-strike-detection-log-analysis-119395
author: Wojciech Lesicki
date: 2021-06-29
modified: 2024-03-25
tags:
    - attack.persistence
    - attack.execution
    - attack.privilege-escalation
    - attack.lateral-movement
    - attack.t1021.002
    - attack.t1543.003
    - attack.t1569.002
logsource:
    category: registry_set
    product: windows
detection:
    selection_key:
        - TargetObject|contains: '\System\CurrentControlSet\Services'
        - TargetObject|contains|all:
              - '\System\ControlSet'
              - '\Services'
    selection_details:
        - Details|contains|all:
              - 'ADMIN$'
              - '.exe'
        - Details|contains|all:
              - '%COMSPEC%'
              - 'start'
              - 'powershell'
    condition: all of selection_*
falsepositives:
    - Unlikely
level: high

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_key

selection_key:
    - TargetObject|contains: '\System\CurrentControlSet\Services'
    - TargetObject|contains|all:
          - '\System\ControlSet'
          - '\Services'

Stage 2: selection_details

selection_details:
    - Details|contains|all:
          - 'ADMIN$'
          - '.exe'
    - Details|contains|all:
          - '%COMSPEC%'
          - 'start'
          - 'powershell'

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
Detailsmatch
  • %COMSPEC% corpus 3 (sigma 3)
  • .exe corpus 4 (sigma 3, splunk 1)
  • ADMIN$
  • powershell corpus 10 (sigma 9, chronicle 1)
  • start
TargetObjectmatch
  • \Services
  • \System\ControlSet
  • \System\CurrentControlSet\Services