Detection rules › Splunk
ntds.dit Access from Unexpected Location (Sysmon)
Adversaries may attempt to access or create a copy of the Active Directory domain database in order to steal credential information, as well as obtain other information about domain members such as devices, users, and access rights. This use case detects processes and parent processes interacting with ntds.dit from unexpected locations which may indicate malicious activity. Due to limitations in EDR logging, EDR rules will only detect on process path (not parent process path)
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access |
References
Telemetry coverage
| Provider | Record / event type |
|---|---|
| Sysmon | Event ID 1: Process creation |
Rule body
id: '20634.36831'
title: ntds.dit Access from Unexpected Location
description: 'Adversaries may attempt to access or create a copy of the Active Directory
domain database in order to steal credential information, as well as obtain other
information about domain members such as devices, users, and access rights. This
use case detects processes and parent processes interacting with ntds.dit from unexpected
locations which may indicate malicious activity. Due to limitations in EDR logging,
EDR rules will only detect on process path (not parent process path). -- Threat
Actor Association: Mustang Panda (aka. Stately Taurus//Earth Preta/BRONZE PRESIDENT/TA416/RedDelta),
UNC5221, UTA0178'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<")
"ntds.dit" ("apache" OR "tomcat" OR "AppData" OR "Temp" OR "Public" OR "PerfLogs"
OR "Public" OR "Downloads" OR ("Recycle" "Bin") OR "SysWOW64" OR "User" OR ("Program"
"Files") OR "Debug" OR "fonts" OR "Help" or "repair" OR "ProgramData") | regex process="(?i)ntds\.dit"|
where match(process_path, "(?i)\x5c(apache|tomcat|AppData|Temp|PerfLogs|Public|Downloads|User|ProgramData|Recycle(\s+|\.)Bin|(\x5cWindows\x5c(Debug|fonts|Help|repair|SysWOW64)))\x5c")
or match(parent_process_path, "(?i)\x5c(apache|tomcat|AppData|Temp|PerfLogs|Public|Downloads|User|ProgramData|Recycle(\s+|\.)Bin|(\x5cWindows\x5c(Debug|fonts|Help|repair|SysWOW64)))\x5c")
| table _time, host, user, process*, parent_process_path | bin span=1s | stats values(*)
as * by _time, host '
techniques:
- credential-access:os credential dumping:ntds
technique_id:
- T1003.003
data_category:
- Windows Sysmon
- Process command-line parameters
references:
- https://blog.talosintelligence.com/2022/08/recent-cyber-attack.html?m=1
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_sysmon` (TERM(EventCode=1) OR "<EventID>1<") "ntds.dit" ("apache" OR "tomcat" OR "AppData" OR "Temp" OR "Public" OR "PerfLogs" OR "Public" OR "Downloads" OR ("Recycle" "Bin") OR "SysWOW64" OR "User" OR ("Program" "Files") OR "Debug" OR "fonts" OR "Help" or "repair" OR "ProgramData")
Stage 2: regex
| regex process="(?i)ntds\.dit"
Stage 3: where
| where match(process_path, "(?i)\x5c(apache|tomcat|AppData|Temp|PerfLogs|Public|Downloads|User|ProgramData|Recycle(\s+|\.)Bin|(\x5cWindows\x5c(Debug|fonts|Help|repair|SysWOW64)))\x5c") or match(parent_process_path, "(?i)\x5c(apache|tomcat|AppData|Temp|PerfLogs|Public|Downloads|User|ProgramData|Recycle(\s+|\.)Bin|(\x5cWindows\x5c(Debug|fonts|Help|repair|SysWOW64)))\x5c")
Stage 4: table
| table _time, host, user, process*, parent_process_path
Stage 5: bucket
| bin span=1s
Stage 6: stats
| stats values(*) as * by _time, host
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
EventCode | eq |
| field:"EventID" kind:eq value:"1" |
parent_process_path | regex_match |
| field:"parent_process_name" kind:regex_match |
process | regex_match |
| field:"CommandLine" kind:regex_match |
process_path | regex_match |
| field:"process_name" kind:regex_match |
Search terms
These SPL tokens match against raw event text.
| Stage | Term |
|---|---|
| 1 | "<EventID>1<" |
| 1 | "ntds.dit" |
| 1 | "apache" |
| 1 | "tomcat" |
| 1 | "AppData" |
| 1 | "Temp" |
| 1 | "Public" |
| 1 | "PerfLogs" |
| 1 | "Public" |
| 1 | "Downloads" |
| 1 | "Recycle" |
| 1 | "Bin" |
| 1 | "SysWOW64" |
| 1 | "User" |
| 1 | "Program" |
| 1 | "Files" |
| 1 | "Debug" |
| 1 | "fonts" |
| 1 | "Help" |
| 1 | "repair" |
| 1 | "ProgramData" |