Detection rules › Splunk
Locate Credentials (Windows Event Log)
Adversaries may search local file systems and remote file shares for files containing passwords. These can be files created by users to store their own credentials, shared credential stores for a group of individuals, configuration files containing passwords for a system or service, or source code/binary files containing embedded passwords
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Credential Access | T1552.001 Unsecured Credentials: Credentials In Files |
References
Event coverage
| Provider | Event | Title |
|---|---|---|
| Security-Auditing | Event ID 4688 | A new process has been created. |
Rule body yaml
id: '1081.1130'
title: Locate Credentials
description: 'Adversaries may search local file systems and remote file shares for
files containing passwords. These can be files created by users to store their own
credentials, shared credential stores for a group of individuals, configuration
files containing passwords for a system or service, or source code/binary files
containing embedded passwords. -- Threat Actor Association: Alloy Taurus/Gallium,
Antlion, APT15, APT29/Nobelium/Cozy Bear, DarkSide, BlackMatter, Lancyfly, Lapsus$,
TeamTNT, Wizard Spider - Software Association: ALPHV/BlackCat, Conti, Ransom Cartel,
Snake, TeamTNT -- Atomics 1003.002 Test #5 NOTE *Only for the Powershell version
Atomics T1552.001 Test#1 Atomics T1552.001 Test#3 Atomics T1552.006 Test#1 Atomics
T1552.004 Test#2'
logic_format: Splunk
logic: '`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR
"<EventID>4688<") AND (TERM(findstr) AND (TERM(password) OR TERM(txt) OR TERM(ini)
OR TERM(xml) OR TERM(pass) OR TERM(cred) OR TERM(vnc) OR TERM(config) OR TERM(spin)
)) OR (TERM(type) AND (TERM(sysprep) OR TERM(unattend) OR TERM(Unattended)) AND
(TERM(inf) OR TERM(ini) OR TERM(xml))) OR (TERM(dir) AND (TERM(vnc) OR TERM(ultravnc))
AND (TERM(inf) OR TERM(ini) OR TERM(xml))) OR ((TERM(cmd) AND TERM(/c) AND TERM(copy))
AND ("ntds.dit" OR TERM(SAM) OR TERM(System) )) OR (TERM(vssadmin) AND TERM(create)
AND TERM(SHADOW)) OR (TERM(ntdsutil)) OR ("Wmic" TERM(shadowcopy)) | table _time,
host, user, process, process_*, parent_*, signature_id | bin span=300s | stats values(*)
as * by _time, host | stats values(*) as * by _time, host| eventstats dc(host) as
dc_host by process| eventstats count as c_process by process| where dc_host=1 and
c_process<3 '
techniques:
- credential-access:unsecured credentials:credentials in files
technique_id:
- T1552.001
data_category:
- Windows event logs
references:
- https://attack.mitre.org/techniques/T1552/001/
Stages and Predicates
Stage 1: search
`get_endpoint_data` `get_endpoint_data_winevent` (TERM(EventCode=4688) OR "<EventID>4688<") AND (TERM(findstr) AND (TERM(password) OR TERM(txt) OR TERM(ini) OR TERM(xml) OR TERM(pass) OR TERM(cred) OR TERM(vnc) OR TERM(config) OR TERM(spin) )) OR (TERM(type) AND (TERM(sysprep) OR TERM(unattend) OR TERM(Unattended)) AND (TERM(inf) OR TERM(ini) OR TERM(xml))) OR (TERM(dir) AND (TERM(vnc) OR TERM(ultravnc)) AND (TERM(inf) OR TERM(ini) OR TERM(xml))) OR ((TERM(cmd) AND TERM(/c) AND TERM(copy)) AND ("ntds.dit" OR TERM(SAM) OR TERM(System) )) OR (TERM(vssadmin) AND TERM(create) AND TERM(SHADOW)) OR (TERM(ntdsutil)) OR ("Wmic" TERM(shadowcopy))
Stage 2: table
| table _time, host, user, process, process_*, parent_*, signature_id
Stage 3: bucket
| bin span=300s
Stage 4: stats
| stats values(*) as * by _time, host
Stage 5: stats
| stats values(*) as * by _time, host
Stage 6: eventstats
| eventstats dc(host) as dc_host by process
Stage 7: eventstats
| eventstats count as c_process by process
Stage 8: where
| where dc_host=1 and c_process<3
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.
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 | TERM |
| 1 | findstr |
| 1 | TERM |
| 1 | password |
| 1 | TERM |
| 1 | txt |
| 1 | TERM |
| 1 | ini |
| 1 | TERM |
| 1 | xml |
| 1 | TERM |
| 1 | pass |
| 1 | TERM |
| 1 | cred |
| 1 | TERM |
| 1 | vnc |
| 1 | TERM |
| 1 | config |
| 1 | TERM |
| 1 | spin |
| 1 | TERM |
| 1 | type |
| 1 | TERM |
| 1 | sysprep |
| 1 | TERM |
| 1 | unattend |
| 1 | TERM |
| 1 | Unattended |
| 1 | TERM |
| 1 | inf |
| 1 | TERM |
| 1 | ini |
| 1 | TERM |
| 1 | xml |
| 1 | TERM |
| 1 | dir |
| 1 | TERM |
| 1 | vnc |
| 1 | TERM |
| 1 | ultravnc |
| 1 | TERM |
| 1 | inf |
| 1 | TERM |
| 1 | ini |
| 1 | TERM |
| 1 | xml |
| 1 | TERM |
| 1 | cmd |
| 1 | "/c" |
| 1 | TERM |
| 1 | copy |
| 1 | "ntds.dit" |
| 1 | TERM |
| 1 | SAM |
| 1 | TERM |
| 1 | System |
| 1 | TERM |
| 1 | vssadmin |
| 1 | TERM |
| 1 | create |
| 1 | TERM |
| 1 | SHADOW |
| 1 | TERM |
| 1 | ntdsutil |
| 1 | "Wmic" |
| 1 | TERM |
| 1 | shadowcopy |