Detection rules › Splunk
ntds.dit Access from Unexpected Location (Windows Event Log)
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 | T1003.003 OS Credential Dumping: NTDS |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '20634.36765'
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_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<" OR Type=Process) "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:
- Process command-line parameters
- Windows event logs
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_winevent` (TERM(EventCode=4688) OR "<EventID>4688<" OR Type=Process) "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
Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.
| Field | Kind | Values |
|---|---|---|
EventCode | eq |
|
parent_process_path | match |
|
process | regex_match |
|
process_path | match |
|
Search terms
Bare-string tokens in the SPL search body. Splunk matches each token against _raw (the untyped raw event text) anywhere it appears, not against a specific field. These don't surface in the Indicators table because they aren't predicates on a known field.
| Stage | Term |
|---|---|
| 1 | TERM |
| 1 | "<EventID>4688<" |
| 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" |