T1003.005 Elastic Security · Elastic

Detect Cached Domain Credentials in Elastic Security

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/

Elastic Detection Query

Elastic Security (Elastic)
eql
any where
(
  (event.category == "process" and event.type == "start" and
    (
      process.command_line like~ "*lsadump::cache*" or
      process.command_line like~ "*cachedump*" or
      process.command_line like~ "*mscache*" or
      process.command_line like~ "*ms-cache*" or
      process.name like~ "lazagne.exe" or
      process.name like~ "cachedump.exe" or
      process.name like~ "fgdump.exe" or
      process.name like~ "gsecdump.exe"
    )
  ) or
  (event.category == "registry" and
    (
      registry.path like "*\\SECURITY\\Cache*" or
      registry.path like "*\\SECURITY\\Policy\\Secrets\\NL$*"
    ) and
    not process.name in ("lsass.exe", "svchost.exe", "services.exe")
  ) or
  (event.category == "file" and
    (
      file.path like "/var/lib/sss/db/*" or
      file.path like "/var/opt/quest/vas/authcache/*"
    ) and
    event.action in ("opened", "read") and
    not process.name in ("sssd", "sssd_nss", "sssd_pam")
  )
)
critical severity high confidence

Detects attempts to access or dump cached domain credentials (MS-Cache v2 / DCC2) via known tooling (Mimikatz lsadump::cache, LaZagne, Cachedump, fgdump, gsecdump), registry access to HKLM\SECURITY\Cache or NL$ secrets by non-system processes, and unauthorized access to Linux SSSD credential cache files.

Data Sources

Elastic Endpoint SecurityWinlogbeat with SysmonAuditbeat (Linux)

Required Tables

logs-endpoint.events.process-*logs-endpoint.events.registry-*logs-endpoint.events.file-*winlogbeat-*

False Positives & Tuning

  • Legitimate IT security scanning tools (Tenable, Qualys, CyberArk) that enumerate credential stores during authorized audits
  • SSSD daemon itself or PAM modules accessing /var/lib/sss/db/ during normal authentication operations — mitigate by tuning process.name exclusions
  • Forensic or IR tools such as FTK or Velociraptor collecting registry artifacts during an authorized incident investigation
Download portable Sigma rule (.yml)

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.

  1. 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.

  2. 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.

  3. 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.

Unlock Pro Content

Get the full detection package for T1003.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections