Windows AD SID History Attribute Modified
Description
The following analytic leverages event code 5136
to identify a modification of the SID History AD attribute. The SID history AD attribute allows users to inherit permissions from a separate AD account without group changes. Initially developed for access continuity when migrating user accounts to different domains, this attribute can also be abused by adversaries to stealthily grant access to a backdoor account within the same domain.
- Type: TTP
-
Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
- Last Updated: 2022-11-16
- Author: Mauricio Velazco, Splunk
- ID: 1155e47d-307f-4247-beab-71071e3a458c
Annotations
ATT&CK
Kill Chain Phase
- Installation
- Actions on Objectives
NIST
- DE.CM
CIS20
- CIS 3
- CIS 5
- CIS 16
CVE
Search
1
2
3
`wineventlog_security` EventCode=5136 AttributeLDAPDisplayName=sIDHistory OperationType="%%14674"
| stats values(ObjectDN) by _time, Computer, SubjectUserName, AttributeValue
| `windows_ad_sid_history_attribute_modified_filter`
Macros
The SPL above uses the following Macros:
windows_ad_sid_history_attribute_modified_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
- AttributeLDAPDisplayName
- OperationType=
- ObjectDN
- Computer
- SubjectUserName
- AttributeValue
How To Implement
To successfully implement this search, you ned to be ingesting eventcode 5136
. The Advanced Security Audit policy setting Audit Directory Services Changes
within DS Access
needs to be enabled. Additionally, a SACL needs to be created for AD objects in order to ingest attribute modifications.
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 |
---|---|---|---|
56.0 | 80 | 70 | SID History AD attribute modified by $SubjectUserName$ for $ObjectDN$ |
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
- https://book.hacktricks.xyz/windows-hardening/active-directory-methodology/sid-history-injection
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: 1