← Back to Explore
splunk_escuTTP
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.
MITRE ATT&CK
Detection Query
`wineventlog_security` (EventCode=4742 OR EventCode=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`Author
Dean Luxton
Created
2026-03-10
Data Sources
Windows Event Log Security 4742Windows Event Log Security 4738
References
Tags
Compromised Windows HostSneaky Active Directory Persistence Tricks
Raw Content
name: Windows AD Privileged Account SID History Addition
id: 6b521149-b91c-43aa-ba97-c2cac59ec830
version: 11
date: '2026-03-10'
author: Dean Luxton
type: TTP
status: production
data_source:
- Windows Event Log Security 4742
- Windows Event Log Security 4738
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.
search: |-
`wineventlog_security` (EventCode=4742 OR EventCode=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
drilldown_searches:
- name: View the detection results for - "$src_user$"
search: '%original_detection_search% | search src_user = "$src_user$"'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
- name: View risk events for the last 7 days for - "$src_user$"
search: '| from datamodel Risk.All_Risk | search normalized_risk_object IN ("$src_user$") starthoursago=168 | stats count min(_time) as firstTime max(_time) as lastTime values(search_name) as "Search Name" values(risk_message) as "Risk Message" values(analyticstories) as "Analytic Stories" values(annotations._all) as "Annotations" values(annotations.mitre_attack.mitre_tactic) as "ATT&CK Tactics" by normalized_risk_object | `security_content_ctime(firstTime)` | `security_content_ctime(lastTime)`'
earliest_offset: $info_min_time$
latest_offset: $info_max_time$
rba:
message: A Privileged User Account SID History Attribute was added to $userSid$ by $src_user$
risk_objects:
- field: src_user
type: user
score: 50
threat_objects: []
tags:
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
security_domain: endpoint
manual_test: This search uses a lookup provided by Enterprise Security and needs to be manually tested.
tests:
- name: True Positive Test
attack_data:
- data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1134.005/mimikatz/windows-security-xml.log
source: XmlWinEventLog:Security
sourcetype: XmlWinEventLog