Detection rules › Sigma
SPN added to an account by command line
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
| Tactic | Techniques |
|---|---|
| Persistence |
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
| Security-Auditing | Event ID 4688: A new process has been created. |
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
selectionStage 1: selection
selection:
NewProcessName|endswith: '\setspn.exe'
CommandLine|contains:
- '/a '
- '-a '
- '/s '
- '-s '
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
CommandLine | match |
| field:"CommandLine" kind:match |
NewProcessName | ends_with |
| field:"Image" kind:ends_with value:"\setspn.exe" |