Try in Splunk Security Cloud

Description

The following analytic looks for changes to the sIDHistory AD attribute of user or computer objects which exist within the same domain. 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. This analytic was written to pick up on activity via Mimikatz sid::patch. Please note there are additional avenues to abuse SID history such as DCShadow & Golden / Diamond tickets which won't be detected using these event codes.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud

  • Last Updated: 2022-09-09
  • Author: Dean Luxton
  • ID: 5fde0b7c-df7a-40b1-9b3a-294c00f0289d

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1134.005 SID-History Injection Defense Evasion, Privilege Escalation
T1134 Access Token Manipulation Defense Evasion, Privilege Escalation
Kill Chain Phase
  • Exploitation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
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 OR SidHistoryMatch=TargetDomainName 
| rename TargetSid as userSid, TargetDomainName as userDomainName 
| table _time action status host user userSid userDomainName SidHistory Logon_ID src_user 
| `windows_ad_same_domain_sid_history_addition_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_ad_same_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. SID resolution is not required..

Known False Positives

Unknown

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
100.0 100 100 Active Directory SID History Attribute was added to $user$ by $src_user$

:information_source: 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

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