Detection rules › Splunk
SecretsDump Credential Harvest (Windows Event Log)
SecretsDump.py Performs various techniques to dump hashes from the remote machine without executing any agent there
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access | T1003.002 OS Credential Dumping: Security Account Manager |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4624 | An account was successfully logged on. |
| Security-Auditing | Event ID 4661 | A handle to an object was requested. |
| Security-Auditing | Event ID 5145 | A network share object was checked to see whether client can be granted desired access. |
Rule body yaml
id: '5412.5535'
title: SecretsDump Credential Harvest
description: 'SecretsDump.py Performs various techniques to dump hashes from the remote
machine without executing any agent there. -- Threat Actor Association: APT15, Scattered
Spider (aka. 0ktapus, UNC3944), Volt Typhoon -- Software Association: Rhysida'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` ((TERM(EventCode=4624) OR
"<EventID>4624<") Authentication_Package="NTLM") OR ((TERM(EventCode=4661) OR "<EventID>4661<")
TERM(SAM)) OR ((TERM(EventCode=5145) OR "<EventID>5145<") TERM(SAMR)) | rex field=_raw
"Account Name:\s+(?<user>\S+\$)" | table _time, host, user signature_id, Account_Name,
user, Relative_Target_Name, signature_id, src_ip, session_id | bin span=1s | stats
values(*) as * by _time, host, session_id | where (match(signature_id, "(?i)4624")
AND match(signature_id, "(?i)5145") AND match(signature_id, "(?i)4661")) | eventstats
dc(src_ip) as dc_src_ip by host| where dc_src_ip=1 '
techniques:
- credential-access:os credential dumping:security account manager
technique_id:
- T1003.002
data_category:
- Windows event logs
references:
- https://github.com/SecureAuthCorp/impacket/blob/master/examples/secretsdump.py
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` ((TERM(EventCode=4624) OR "<EventID>4624<") Authentication_Package="NTLM") OR ((TERM(EventCode=4661) OR "<EventID>4661<") TERM(SAM)) OR ((TERM(EventCode=5145) OR "<EventID>5145<") TERM(SAMR))
Stage 2: rex
| rex field=_raw "Account Name:\s+(?<user>\S+\$)"
Stage 3: table
| table _time, host, user signature_id, Account_Name, user, Relative_Target_Name, signature_id, src_ip, session_id
Stage 4: bucket
| bin span=1s
Stage 5: stats
| stats values(*) as * by _time, host, session_id
Stage 6: where
| where (match(signature_id, "(?i)4624") AND match(signature_id, "(?i)5145") AND match(signature_id, "(?i)4661"))
Stage 7: eventstats
| eventstats dc(src_ip) as dc_src_ip by host
Stage 8: where
| where dc_src_ip=1
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 |
|---|---|---|
Authentication_Package | eq |
|
EventCode | eq |
|
dc_src_ip | eq |
|
signature_id | 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>4624<" |
| 1 | TERM |
| 1 | "<EventID>4661<" |
| 1 | TERM |
| 1 | SAM |
| 1 | TERM |
| 1 | "<EventID>5145<" |
| 1 | TERM |
| 1 | SAMR |