Try in Splunk Security Cloud

Description

The following analytic detects modifications to the Access Control List (ACL) of the AdminSDHolder object in a Windows domain, specifically the addition of new rules. It leverages EventCode 5136 from the Security Event Log, focusing on changes to the nTSecurityDescriptor attribute. This activity is significant because the AdminSDHolder object secures privileged group members, and unauthorized changes can allow attackers to establish persistence and escalate privileges. If confirmed malicious, this could enable an attacker to control domain-level permissions, compromising the entire Active Directory environment.

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

  • Last Updated: 2024-07-02
  • Author: Mauricio Velazco, Dean Luxton, Splunk
  • ID: 00d877c3-7b7b-443d-9562-6b231e2abab9

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1546 Event Triggered Execution Privilege Escalation, Persistence
Kill Chain Phase
  • Exploitation
  • Installation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
`wineventlog_security` EventCode=5136 ObjectClass=container ObjectDN="CN=AdminSDHolder,CN=System*"  
| stats min(_time) as _time values(eval(if(OperationType=="%%14675",AttributeValue,null))) as old_value values(eval(if(OperationType=="%%14674",AttributeValue,null))) as new_value values(OperationType) as OperationType by ObjectClass ObjectDN OpCorrelationID src_user SubjectLogonId  
| rex field=old_value max_match=10000 "\((?P<old_values>.*?)\)"  
| rex field=new_value max_match=10000 "\((?P<new_ace>.*?)\)"  
| mvexpand new_ace 
| where NOT new_ace IN (old_values)  
| rex field=new_ace "(?P<aceType>.*?);(?P<aceFlags>.*?);(?P<aceAccessRights>.*?);(?P<aceObjectGuid>.*?);(?P<aceInheritedTypeGuid>.*?);(?P<aceSid>.*?)$" 
| rex max_match=100 field=aceAccessRights "(?P<AccessRights>[A-Z]{2})"  
| rex max_match=100 field=aceFlags "(?P<aceFlags>[A-Z]{2})"  
| lookup msad_guid_lookup guid as aceObjectGuid OUTPUT displayName as ControlAccessRights 
| lookup ace_access_rights_lookup access_rights_string as AccessRights OUTPUT access_rights_value  
| lookup ace_type_lookup ace_type_string as aceType OUTPUT ace_type_value  
| lookup ace_flag_lookup flag_string as aceFlags OUTPUT flag_value as ace_flag_value ``` Optional SID resolution lookups 
| lookup identity_lookup_expanded objectSid as aceSid OUTPUT downLevelDomainName as user  
| lookup admon_groups_def objectSid as aceSid OUTPUT cn as group``` 
| lookup builtin_groups_lookup builtin_group_string  as aceSid OUTPUTNEW builtin_group_name as builtin_group 
| eval aceType=coalesce(ace_type_value,aceType), aceFlags=coalesce(ace_flag_value,"This object only"), aceAccessRights=if(aceAccessRights="CCDCLCSWRPWPDTLOCRSDRCWDWO","Full control",coalesce(access_rights_value,AccessRights)), aceControlAccessRights=coalesce(ControlAccessRights,aceObjectGuid), user=coalesce(user, group, builtin_group, aceSid) 
| stats min(_time) as _time values(aceType) as aceType values(aceFlags) as aceFlags(inheritance) values(aceControlAccessRights) as aceControlAccessRights values(aceAccessRights) as aceAccessRights values(new_ace) as new_ace values(SubjectLogonId) as SubjectLogonId by ObjectClass ObjectDN src_user user 
| eval aceControlAccessRights=if(mvcount(aceControlAccessRights)=1 AND aceControlAccessRights="","All rights",'aceControlAccessRights') 
| search NOT aceType IN (*denied*,D,OD,XD) AND aceAccessRights IN ("Full control","All extended rights","All validated writes","Create all child objects","Delete all child objects","Delete subtree","Delete","Modify permissions","Modify owner","Write all properties",CC,CR,DC,DT,SD,SW,WD,WO,WP) 
| `windows_ad_adminsdholder_acl_modified_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_ad_adminsdholder_acl_modified_filter is a empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Lookups

The SPL above uses the following Lookups:

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 the AdminSDHolder object in order to log modifications.

Known False Positives

Adding new users or groups to the AdminSDHolder ACL is not usual. Filter as needed

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
56.0 80 70 The AdminSDHolder domain object $ObjectDN$ has been modified 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: 3