Detect LSA Secrets in Google Chronicle
Adversaries with SYSTEM access dump LSA secrets from HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets, which contain service account credentials, auto-logon passwords, IIS application pool credentials, scheduled task credentials, and VPN/dial-up credentials. Tools include Mimikatz (lsadump::secrets), Impacket secretsdump.py, gsecdump, LaZagne, and reg.exe to export HKLM\SECURITY. Used by MuddyWater, APT33, APT29, OilRig, Ember Bear, Leafminer, and many others. Service account credentials from LSA secrets enable lateral movement to the services those accounts manage.
MITRE ATT&CK
- Tactic
- Credential Access
- Technique
- T1003 OS Credential Dumping
- Sub-technique
- T1003.004 LSA Secrets
- Canonical reference
- https://attack.mitre.org/techniques/T1003/004/
YARA-L Detection Query
rule lsa_secrets_dumping_t1003_004 {
meta:
author = "Detection Engineering"
description = "Detects LSA Secrets dumping via unauthorized registry access, credential dump tools, or reg.exe SECURITY hive export"
severity = "HIGH"
priority = "HIGH"
mitre_attack_tactic = "Credential Access"
mitre_attack_technique = "T1003.004"
reference = "https://attack.mitre.org/techniques/T1003/004/"
version = "1.0"
events:
(
(
$e.metadata.event_type = "REGISTRY_OPEN" or
$e.metadata.event_type = "REGISTRY_READ"
) and
re.regex($e.target.registry.registry_key, `(?i).*\\SECURITY\\Policy\\Secrets.*`) and
not re.regex($e.principal.process.file.full_path, `(?i).*(\\lsass\.exe|\\svchost\.exe|\\services\.exe)$`)
)
or
(
$e.metadata.event_type = "PROCESS_LAUNCH" and
re.regex($e.target.process.command_line, `(?i)(lsadump::secrets|lsadump::cache|secretsdump|lsa_secrets|LSAsecret)`)
)
or
(
$e.metadata.event_type = "PROCESS_LAUNCH" and
re.regex($e.target.process.file.full_path, `(?i).*\\reg\.exe$`) and
re.regex($e.target.process.command_line, `(?i).*save.*`) and
re.regex($e.target.process.command_line, `(?i).*security.*`) and
not re.regex($e.target.process.command_line, `(?i).*hklm\\\\system.*`)
)
condition:
$e
} Chronicle YARA-L 2.0 rule detecting LSA Secrets dumping (T1003.004) using the Unified Data Model (UDM). Matches three detection patterns across registry and process event types: unauthorized registry reads of HKLM\SECURITY\Policy\Secrets, known credential dump tool command line signatures, and reg.exe SECURITY hive export operations. Uses UDM fields principal.process.file.full_path, target.registry.registry_key, and target.process.command_line for correlation.
Data Sources
Required Tables
False Positives & Tuning
- Privileged access workstation (PAW) management software performing scheduled audits of LSA secrets to verify service account credential synchronization across managed systems
- Security orchestration tools (Splunk SOAR, Palo Alto XSOAR) executing automated credential health checks that involve reading LSA secrets paths as part of incident response playbooks
- Domain controller replication processes or Active Directory Recycle Bin operations that may access LSA-adjacent registry paths during synchronization of credential-related attributes
Other platforms for T1003.004
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 1Export SECURITY Registry Hive
Expected signal: Sysmon Event ID 1: Process Create for reg.exe with CommandLine 'save HKLM\SECURITY'. Sysmon Event ID 11: FileCreate for atomic_security.hiv. Sysmon Event ID 12/13: Registry access to HKLM\SECURITY by reg.exe.
- Test 2Mimikatz LSA Secrets Dump Command
Expected signal: Sysmon Event ID 1: Process Create for mimikatz.exe with 'lsadump::secrets' in CommandLine. Sysmon Event ID 12/13: Registry access to SECURITY\Policy\Secrets if Mimikatz reads from registry. Security Event ID 4688 for mimikatz.exe process creation.
- Test 3LaZagne Credential Dump (LSA Secrets Module)
Expected signal: Sysmon Event ID 1: Process Create for lazagne.exe with '-lsa' parameter. Sysmon Event ID 10: ProcessAccess targeting lsass.exe if LaZagne attempts in-memory extraction. Security Event ID 4688 for lazagne.exe. Windows Defender may flag as HackTool.
References (5)
- https://attack.mitre.org/techniques/T1003/004/
- https://www.passcape.com/index.php?section=docsys&cmd=details&id=23
- https://ired.team/offensive-security/credential-access-and-credential-dumping/dumping-lsa-secrets
- https://www.first.org/resources/papers/conf2017/Windows-Credentials-Attacks-and-Mitigation-Techniques.pdf
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.004/T1003.004.md
Unlock Pro Content
Get the full detection package for T1003.004 including response playbook, investigation guide, and atomic red team tests.