Detection rules › Splunk

Windows AD Short Lived Domain Account ServicePrincipalName

Author
Mauricio Velazco, Splunk
Source
upstream

The following analytic identifies the addition and quick deletion of a Service Principal Name (SPN) to a domain account within 5 minutes. This detection leverages EventCode 5136 from the Windows Security Event Log, focusing on changes to the servicePrincipalName attribute. This activity is significant as it may indicate an attempt to perform Kerberoasting, a technique used to crack the cleartext password of a domain account offline. If confirmed malicious, this could allow an attacker to gain unauthorized access to sensitive information or escalate privileges within the domain environment.

MITRE ATT&CK coverage

TacticTechniques
PersistenceT1098 Account Manipulation
Privilege EscalationT1098 Account Manipulation

Event coverage

ProviderEvent IDTitle
Security-Auditing5136A directory service object was modified.

Stages and Predicates

Stage 1: search

search AttributeLDAPDisplayName="servicePrincipalName" EventCode=5136

Stage 2: transaction

transaction ObjectDN, AttributeValue endswith=EventCode = 5136 OperationType = "%%14675" startswith=EventCode = 5136 OperationType = "%%14674"

Stage 3: eval

eval ... using (duration)

Stage 4: search

search short_lived=TRUE

Stage 5: rename

rename

Stage 6: rename

rename

Stage 7: search

search `macro`

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
AttributeLDAPDisplayNameeq
  • servicePrincipalName corpus 6 (splunk 3, sigma 2, elastic 1)
EventCodeeq
  • 5136 corpus 22 (splunk 22)
short_livedeq
  • TRUE corpus 4 (splunk 4)

Neighbors

Stricter alternatives (narrower than this rule)

The rules below may be useful if you find the current rule is too noisy / lacks specificity.

Broader alternatives (more inclusive than this rule)

These rules match a superset of what this rule catches. They cover the same events plus more. Use them if you want wider coverage and can absorb more false positives.