Detect Cached Domain Credentials in Google Chronicle
Adversaries access cached domain credentials (DCC2/MS-Cache v2) stored locally for offline authentication when domain controllers are unavailable. On Windows, these are stored as MSCACHE v2 (PBKDF2-derived) hashes in HKLM\SECURITY\Cache and cannot be used for pass-the-hash but can be cracked offline. Linux systems using SSSD store cached credentials at /var/lib/sss/db/cache.[domain].ldb. Tools include Mimikatz (lsadump::cache), LaZagne, Cachedump, and Quarks PwDump. Used by Okrum, APT33, OilRig, Leafminer, MuddyWater.
MITRE ATT&CK
- Tactic
- Credential Access
- Technique
- T1003 OS Credential Dumping
- Sub-technique
- T1003.005 Cached Domain Credentials
- Canonical reference
- https://attack.mitre.org/techniques/T1003/005/
YARA-L Detection Query
rule t1003_005_cached_domain_credentials {
meta:
author = "Argus Detection Engineering"
description = "Detects access to cached domain credentials (DCC2/MS-Cache v2) via credential dumping tools, LSA cache registry access, or SSSD cache file access on Linux."
mitre_attack_technique = "T1003.005"
mitre_attack_tactic = "Credential Access"
severity = "CRITICAL"
priority = "HIGH"
reference = "https://attack.mitre.org/techniques/T1003/005/"
version = "1.0"
events:
(
// Pattern 1: Known credential dumping tool process execution
$e1.metadata.event_type = "PROCESS_LAUNCH"
and (
re.regex($e1.target.process.command_line, `(?i)(lsadump::cache|cachedump|mscache|ms-cache)`) or
re.regex($e1.target.process.file.full_path, `(?i)(lazagne|cachedump|fgdump|gsecdump)\.exe`)
)
)
or
(
// Pattern 2: Non-system process accessing LSA cache registry keys
$e1.metadata.event_type = "REGISTRY_READ"
and (
re.regex($e1.target.registry.registry_key, `(?i)\\SECURITY\\Cache`) or
re.regex($e1.target.registry.registry_key, `(?i)\\SECURITY\\Policy\\Secrets\\NL\$`)
)
and not re.regex($e1.principal.process.file.full_path, `(?i)(lsass|svchost|services)\.exe$`)
)
or
(
// Pattern 3: Unauthorized access to Linux SSSD credential cache
$e1.metadata.event_type = "FILE_OPEN"
and (
re.regex($e1.target.file.full_path, `/var/lib/sss/db/`) or
re.regex($e1.target.file.full_path, `/var/opt/quest/vas/authcache/`)
)
and not re.regex($e1.principal.process.file.full_path, `sssd`)
)
condition:
$e1
} Chronicle YARA-L 2.0 rule detecting T1003.005 cached domain credential access patterns across three vectors: process execution of known dumping tools (Mimikatz, LaZagne, Cachedump), registry read events on HKLM\SECURITY\Cache and NL$ secrets by non-system processes, and unauthorized file access to Linux SSSD credential cache databases.
Data Sources
Required Tables
False Positives & Tuning
- Privileged access workstation (PAW) management solutions that inventory LSA configuration as part of hardening compliance checks — whitelist by known PAW management service accounts
- SSSD daemon child processes (sssd_be, sssd_sudo) that may appear under unexpected parent processes during authentication failures or cache rebuild operations
- Authorized penetration testing using Mimikatz with lsadump::cache — correlate with approved pentest window and source host
Other platforms for T1003.005
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Mimikatz Cached Domain Credentials Dump
Expected signal: Sysmon Event ID 1: Process Create for mimikatz.exe with 'lsadump::cache' in CommandLine. Sysmon Event ID 12/13: Registry access to HKLM\SECURITY\Cache by mimikatz.exe. Security Event ID 4688 for mimikatz.exe.
- Test 2Check Cached Credential Count via Registry
Expected signal: Sysmon Event ID 12: Registry Key Opened for HKLM\SECURITY\Cache (if Sysmon is configured to log registry reads). Security Event ID 4656/4663 if registry auditing is enabled. Process Create for reg.exe.
- Test 3Linux SSSD Cache Access Simulation
Expected signal: Linux auditd events for file access on /var/lib/sss/db/ by non-sssd processes. Syslog entries for file access audit events. Process creation events for ls, file, and stat commands.
References (6)
- https://attack.mitre.org/techniques/T1003/005/
- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/hh994565
- https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-and-cracking-mscash-cached-domain-credentials
- https://passlib.readthedocs.io/en/stable/lib/passlib.hash.msdcc2.html
- https://labs.portcullis.co.uk/download/eu-18-Wadhwa-Brown-Where-2-worlds-collide-Bringing-Mimikatz-et-al-to-UNIX.pdf
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.005/T1003.005.md
Unlock Pro Content
Get the full detection package for T1003.005 including response playbook, investigation guide, and atomic red team tests.