Detection rules › Splunk
Windows AD Privileged Account SID History Addition
The following analytic identifies when the SID of a privileged user is added to the SID History attribute of another user. It leverages Windows Security Event Codes 4742 and 4738, combined with identity lookups, to detect this activity. This behavior is significant as it may indicate an attempt to abuse SID history for unauthorized access across multiple domains. If confirmed malicious, this activity could allow an attacker to escalate privileges or maintain persistent access within the environment, posing a significant security risk.
Known false positives
- Migration of privileged accounts.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Privilege Escalation | |
| Stealth |
Telemetry coverage
Rule body
name: Windows AD Privileged Account SID History Addition
id: 6b521149-b91c-43aa-ba97-c2cac59ec830
version: 13
creation_date: '2023-04-11'
modification_date: '2026-05-13'
author: Dean Luxton
status: production
type: TTP
description: The following analytic identifies when the SID of a privileged user is added to the SID History attribute of another user. It leverages Windows Security Event Codes 4742 and 4738, combined with identity lookups, to detect this activity. This behavior is significant as it may indicate an attempt to abuse SID history for unauthorized access across multiple domains. If confirmed malicious, this activity could allow an attacker to escalate privileges or maintain persistent access within the environment, posing a significant security risk.
data_source:
- Windows Event Log Security 4742
- Windows Event Log Security 4738
search: |-
`wineventlog_security`
EventCode IN (4742, 4738)
NOT SidHistory IN ("%%1793", -)
| rex field=SidHistory "(^%{|^)(?P<SidHistory>.*?)(}$|$)"
| eval category="privileged"
| lookup identity_lookup_expanded category, identity as SidHistory OUTPUT identity_tag as match
| where isnotnull(match)
| rename TargetSid as userSid
| table _time action status host user userSid SidHistory Logon_ID src_user dest
| `windows_ad_privileged_account_sid_history_addition_filter`
how_to_implement: Ensure you have objectSid and the Down Level Logon Name `DOMAIN\sAMACountName` added to the identity field of your Asset and Identities lookup, along with the category of privileged for the applicable users. Ensure you are ingesting eventcodes 4742 and 4738. Two advanced audit policies `Audit User Account Management` and `Audit Computer Account Management` under `Account Management` are required to generate these event codes.
known_false_positives: Migration of privileged accounts.
references:
- https://adsecurity.org/?p=1772
finding:
title: A Privileged User Account SID History Attribute was added to $userSid$ by $src_user$
entity:
field: src_user
type: user
score: 50
analytic_story:
- Compromised Windows Host
- Sneaky Active Directory Persistence Tricks
asset_type: Endpoint
mitre_attack_id:
- T1134.005
product:
- Splunk Enterprise
- Splunk Enterprise Security
- Splunk Cloud
category: endpoint
security_domain: endpoint
Stages and Predicates
Stage 1: search
`wineventlog_security`
EventCode IN (4742, 4738)
NOT SidHistory IN ("%%1793", -)
Stage 2: rex
| rex field=SidHistory "(^%{|^)(?P<SidHistory>.*?)(}$|$)"
Stage 3: eval
| eval category="privileged"
Stage 4: lookup
| lookup identity_lookup_expanded category, identity as SidHistory OUTPUT identity_tag as match
Stage 5: where
| where isnotnull(match)
Stage 6: rename
| rename TargetSid as userSid
Stage 7: table
| table _time action status host user userSid SidHistory Logon_ID src_user dest
Stage 8: search
| `windows_ad_privileged_account_sid_history_addition_filter`
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
SidHistory | in | "%%1793", - | excludes:SidHistory |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | in |
| field:"EventID" kind:in |
match | is_not_null | field:"match" kind:is_not_null |