Detection rules › Sigma

SPN added to an account by command line

Status
experimental
Severity
high
Log source
category process_creation, product windows
Author
mdecrevoisier
Source
github.com/mdecrevoisier/SIGMA-detection-rules

Detects scenarios where an attacker adds a SPN to an account in order to perform different type of abuse (Kerberoast, delegation abuse, ...)

Known false positives

  • Administrators adding SPN
  • SPN linked to a load balancer

MITRE ATT&CK coverage

TacticTechniques
Persistence

Telemetry coverage

Rule body

title: SPN added to an account by command line
description: Detects scenarios where an attacker adds a SPN to an account in order to perform different type of abuse (Kerberoast, delegation abuse, ...)
references:
- https://github.com/mdecrevoisier/EVTX-to-MITRE-Attack/tree/master/TA0003-Persistence/T1098.xxx-Account%20manipulation
- https://petri.com/how-to-use-setspn-to-set-active-directory-service-principal-names-2
tags:
- attack.persistence
- attack.t1098
author: mdecrevoisier
status: experimental
logsource:
  product: windows
  category: process_creation
detection: # SetSPN -a MSSQLSvc/srv01.demo.lan demo\srv01
  selection:
    NewProcessName|endswith: '\setspn.exe'
    CommandLine|contains:
      - '/a ' # in 2012: Replaced references to using the –A parameter with reference to use –S instead.
      - '-a '
      - '/s ' # -S will verify that there are no duplicate SPNs
      - '-s '
  condition: selection
falsepositives:
- Administrators adding SPN
- SPN linked to a load balancer
level: high

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
  NewProcessName|endswith: '\setspn.exe'
  CommandLine|contains:
    - '/a '
    - '-a '
    - '/s '
    - '-s '

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • -a corpus 3 (sigma 3)
  • -s corpus 6 (sigma 6)
  • /a
  • /s corpus 3 (sigma 2, splunk 1)
field:"CommandLine" kind:match
NewProcessNameends_with
  • \setspn.exe corpus 3 (sigma 3)
field:"Image" kind:ends_with value:"\setspn.exe"