Detect LSA Secrets in Sumo Logic CSE
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/
Sumo Detection Query
(_sourceCategory="*windows*sysmon*" OR _sourceCategory="*sysmon*" OR _sourceCategory="*WinEventLog*Sysmon*")
| parse "<EventID>*</EventID>" as EventCode nodrop
| parse "<TargetObject>*</TargetObject>" as TargetObject nodrop
| parse "<Image>*</Image>" as Image nodrop
| parse "<CommandLine>*</CommandLine>" as CommandLine nodrop
| parse "<Computer>*</Computer>" as Computer nodrop
| parse "<User>*</User>" as SysmonUser nodrop
| where
(
EventCode in ("12","13")
and TargetObject matches "*\\SECURITY\\Policy\\Secrets*"
and !(Image matches "*\\lsass.exe" or Image matches "*\\svchost.exe" or Image matches "*\\services.exe")
)
or
(
EventCode = "1"
and (
CommandLine matches "*lsadump::secrets*"
or CommandLine matches "*lsadump::cache*"
or CommandLine matches "*secretsdump*"
or CommandLine matches "*lsa_secrets*"
or CommandLine matches "*LSAsecret*"
)
)
or
(
EventCode = "1"
and Image matches "*\\reg.exe"
and CommandLine matches "*save*"
and CommandLine matches "*security*"
and !(CommandLine matches "*hklm\\system*")
)
| if (EventCode in ("12","13"), "RegistryAccess",
if (CommandLine matches "*lsadump*" or CommandLine matches "*secretsdump*", "DumpTool",
if (Image matches "*\\reg.exe" and CommandLine matches "*save*", "RegExport", "Other")
)
) as DetectionType
| count as EventCount by _messageTime, Computer, SysmonUser, Image, CommandLine, TargetObject, DetectionType
| fields -EventCount
| sort by _messageTime desc Detects LSA Secrets dumping (T1003.004) in Sumo Logic by parsing Sysmon XML events for three key patterns: registry access to HKLM\SECURITY\Policy\Secrets from unauthorized processes (Sysmon EventIDs 12/13), known credential dump tool invocations in process command lines (Sysmon EventID 1), and reg.exe save operations targeting the SECURITY hive for offline extraction.
Data Sources
Required Tables
False Positives & Tuning
- Endpoint Detection and Response (EDR) agents such as CrowdStrike Falcon or Carbon Black performing their own registry monitoring that transiently accesses LSA secrets paths during sensor initialization or health checks
- Windows Active Directory migration tools or domain join/unjoin operations that legitimately read service account credentials stored in LSA secrets during domain configuration
- Automated deployment pipelines using reg.exe to export and migrate registry hives between environments as part of golden image creation or system provisioning workflows
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.