Windows AD Cross Domain SID History Addition
Description
The following analytic detects changes to the sIDHistory attribute of user or computer objects across different domains. It leverages Windows Security Event Codes 4738 and 4742 to identify when the sIDHistory attribute is modified. This activity is significant because the sIDHistory attribute allows users to inherit permissions from other AD accounts, which can be exploited by adversaries for inter-domain privilege escalation and persistence. If confirmed malicious, this could enable attackers to gain unauthorized access to resources, maintain persistence, and escalate privileges across domain boundaries.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2024-05-11
- Author: Dean Luxton
- ID: 41bbb371-28ba-439c-bb5c-d9930c28365d
Annotations
ATT&CK
Kill Chain Phase
- Exploitation
NIST
- DE.CM
CIS20
- CIS 10
CVE
Search
1
2
3
4
5
6
7
8
9
10
`wineventlog_security` (EventCode=4742 OR EventCode=4738) NOT SidHistory IN ("%%1793", -)
| rex field=SidHistory "(^%{
|^)(?P<SidHistoryMatch>.*)(\-
|\\\)"
| rex field=TargetSid "^(?P<TargetSidmatch>.*)(\-
|\\\)"
| where SidHistoryMatch!=TargetSidmatch AND SidHistoryMatch!=TargetDomainName
| rename TargetSid as userSid
| table _time action status host user userSid SidHistory Logon_ID src_user
| `windows_ad_cross_domain_sid_history_addition_filter`
Macros
The SPL above uses the following Macros:
windows_ad_cross_domain_sid_history_addition_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.
Required fields
List of fields required to use this analytic.
- _time
- EventCode
- SidHistory
- TargetSid
- TargetDomainName
- user
- src_user
- Logon_ID
How To Implement
To successfully implement this search, you need to be ingesting eventcodes 4738
and 4742
. The Advanced Security Audit policy settings Audit User Account Management
and Audit Computer Account Management
within Account Management
all need to be enabled.
Known False Positives
Domain mergers and migrations may generate large volumes of false positives for this analytic.
Associated Analytic Story
RBA
Risk Score | Impact | Confidence | Message |
---|---|---|---|
80.0 | 100 | 80 | Active Directory SID History Attribute was added to $user$ by $src_user$ |
The Risk Score is calculated by the following formula: Risk Score = (Impact * Confidence/100). Initial Confidence and Impact is set by the analytic author.
Reference
- https://adsecurity.org/?p=1772
- https://learn.microsoft.com/en-us/windows/win32/adschema/a-sidhistory?redirectedfrom=MSDN
- https://learn.microsoft.com/en-us/defender-for-identity/security-assessment-unsecure-sid-history-attribute
Test Dataset
Replay any dataset to Splunk Enterprise by using our replay.py
tool or the UI.
Alternatively you can replay a dataset into a Splunk Attack Range
source | version: 2