Try in Splunk Security Cloud

Description

This detection monitors changes to the following Active Directory attributes: "msDS-AllowedToDelegateTo", "msDS-AllowedToActOnBehalfOfOtherIdentity", "msDS-KeyCredentialLink", "scriptPath", and "msTSInitialProgram". Modifications to these attributes can indicate potential malicious activity or privilege escalation attempts. Immediate investigation is recommended upon alert.

  • Type: TTP
  • Product: Splunk Enterprise, Splunk Enterprise Security, Splunk Cloud
  • Datamodel: Change
  • Last Updated: 2023-11-13
  • Author: Dean Luxton
  • ID: 5682052e-ce55-4f9f-8d28-59191420b7e0

Annotations

ATT&CK

ATT&CK

ID Technique Tactic
T1550 Use Alternate Authentication Material Defense Evasion, Lateral Movement
T1222 File and Directory Permissions Modification Defense Evasion
T1222.001 Windows File and Directory Permissions Modification Defense Evasion
Kill Chain Phase
  • Exploitation
NIST
  • DE.CM
CIS20
  • CIS 10
CVE
1
2
3
4
5
6
7
8
9
10
`wineventlog_security` EventCode=5136 AttributeLDAPDisplayName IN ("msDS-AllowedToDelegateTo","msDS-AllowedToActOnBehalfOfOtherIdentity","scriptPath","msTSInitialProgram") OperationType=%%14674  ```Changes to the attribute "msDS-KeyCredentialLink" are also worth moniroting, however tuning will need to be applied``` 
| table _time ObjectClass ObjectDN OpCorrelationID src_user SubjectLogonId DSName AttributeValue AttributeLDAPDisplayName  
| rename SubjectLogonId as TargetLogonId, src_user as initiator, _time as eventTime  
| appendpipe [
| map search="search `wineventlog_security` EventCode=4624 TargetLogonId=$TargetLogonId$"]  
| stats min(eventTime) as _time values(initiator) as src_user, values(DSName) as targetDomain, values(ObjectDN) as ObjectDN, values(ObjectClass) as ObjectClass, values(src_category) as src_category, values(src_ip) as src_ip values(LogonType) as LogonType values(AttributeValue) as AttributeValue values(AttributeLDAPDisplayName) as AttributeLDAPDisplayName by TargetLogonId  
| rex field=ObjectDN "^CN=(?P<cn>.*?),[A-Z]{2}\="  
| eval dest=if(ObjectClass="computer",cn,null), user=if(ObjectClass="user",cn,null) 
| fields - cn 
| `windows_ad_suspicious_attribute_modification_filter`

Macros

The SPL above uses the following Macros:

:information_source: windows_ad_suspicious_attribute_modification_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
  • OperationType
  • ObjectDN
  • OpCorrelationID
  • src_user
  • AttributeLDAPDisplayName
  • AttributeValue
  • ObjectClass
  • SubjectLogonId
  • DSName

How To Implement

Ensure you are ingesting Active Directory audit logs - specifically event 5136. See lantern article in references for further on how to onboard AD audit data. Ensure the wineventlog_security macro is configured with the correct indexes.

Known False Positives

If key credentials are regularly assigned to users, these events will need to be tuned out.

Associated Analytic Story

RBA

Risk Score Impact Confidence Message
100.0 100 100 $src_user$ has added $AttributeLDAPDisplayName$ ACL rights to $ObjectClass$ $ObjectDN$

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