Detect Security Account Manager in Sumo Logic CSE
Adversaries attempt to extract credential material from the Security Account Manager (SAM) database containing local account NTLM hashes. The SAM requires SYSTEM-level access. Methods include: registry export (reg save HKLM\sam; reg save HKLM\system), Volume Shadow Copy access, Mimikatz lsadump::sam, secretsdump.py, gsecdump, pwdump, and creddump7. Used by APT29, APT41, Daggerfly, GALLIUM, Wizard Spider, Ember Bear, Agrius, and ransomware operators universally. Combined with the SYSTEM hive, SAM allows offline hash extraction.
MITRE ATT&CK
- Tactic
- Credential Access
- Technique
- T1003 OS Credential Dumping
- Sub-technique
- T1003.002 Security Account Manager
- Canonical reference
- https://attack.mitre.org/techniques/T1003/002/
Sumo Detection Query
_sourceCategory=windows/sysmon OR _sourceCategory=windows/security
| parse field=CommandLine "*" as cmd nodrop
| parse field=Image "*" as img nodrop
| where (toLower(img) matches "*reg.exe" and (toLower(cmd) matches "*save*hklm\\sam*" or toLower(cmd) matches "*save*hklm\\system*" or toLower(cmd) matches "*save*hklm\\security*"))
or (toLower(cmd) matches "*lsadump::sam*" or toLower(cmd) matches "*lsadump::cache*" or toLower(cmd) matches "*sekurlsa::msv*")
or (toLower(img) matches "*vssadmin.exe" and (toLower(cmd) matches "*create shadow*" or toLower(cmd) matches "*list shadow*"))
or ((toLower(img) matches "*esentutl.exe" or toLower(img) matches "*ntdsutil.exe") and (toLower(cmd) matches "*sam*" or toLower(cmd) matches "*shadow*" or toLower(cmd) matches "*ntds*"))
| eval DumpMethod = if(toLower(img) matches "*reg.exe", "RegistryExport",
if(toLower(cmd) matches "*lsadump*" or toLower(cmd) matches "*sekurlsa*", "Mimikatz",
if(toLower(img) matches "*vssadmin*", "ShadowCopy",
if(toLower(img) matches "*esentutl*" or toLower(img) matches "*ntdsutil*", "ESENTool", "Unknown"))))
| fields _messageTime, Computer, User, img, cmd, DumpMethod
| sort by _messageTime desc Detects SAM database credential dumping in Sumo Logic by analyzing Sysmon and Windows Security event logs for registry export commands, Mimikatz patterns, VSS shadow copy abuse, and ESENTUTL/NTDSUTIL misuse, with method classification.
Data Sources
Required Tables
False Positives & Tuning
- Legitimate registry backup automation scripts run by IT operations during maintenance windows
- Enterprise endpoint security tools performing forensic collection or telemetry that include VSS or SAM-adjacent commands
- Authorized red team or penetration testing engagements where Mimikatz or credential auditing tools are used with documented approval
Other platforms for T1003.002
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 SAM and SYSTEM Registry Hives
Expected signal: Sysmon Event ID 1: Process Create with Image=reg.exe, CommandLine containing 'save HKLM\sam'. Sysmon Event ID 11: FileCreate for atomic_sam.hiv and atomic_system.hiv. Security Event ID 4688 for reg.exe process creation.
- Test 2SAM Dump via Mimikatz lsadump::sam (Command Pattern)
Expected signal: Sysmon Event ID 1: Process Create with CommandLine containing 'lsadump::sam'. Sysmon Event ID 10: ProcessAccess if Mimikatz attempts to access lsass.exe. Security Event ID 4688 for mimikatz.exe. Windows Defender may flag this as HackTool:Win32/Mimikatz.
- Test 3Create Volume Shadow Copy for SAM Access
Expected signal: Sysmon Event ID 1: Process Create for vssadmin.exe with CommandLine 'create shadow /for=C:'. System Event Log: Event ID 8193/8194 for Volume Shadow Copy service events. Security Event ID 4688 for vssadmin.exe.
References (5)
- https://attack.mitre.org/techniques/T1003/002/
- https://github.com/Neohapsis/creddump7
- https://github.com/redcanaryco/atomic-red-team/blob/master/atomics/T1003.002/T1003.002.md
- https://www.ired.team/offensive-security/credential-access-and-credential-dumping/dumping-hashes-from-sam-registry
- https://docs.microsoft.com/en-us/windows/security/threat-protection/auditing/audit-sam
Unlock Pro Content
Get the full detection package for T1003.002 including response playbook, investigation guide, and atomic red team tests.