Detect Security Account Manager in CrowdStrike LogScale
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/
LogScale Detection Query
#event_simpleName=ProcessRollup2
| case {
ImageFileName = /(?i)\\reg\.exe$/ AND CommandLine = /(?i)save.*(hklm\\sam|hklm\\system|hklm\\security)/ | DumpMethod := "RegistryExport";
CommandLine = /(?i)(lsadump::sam|lsadump::cache|sekurlsa::msv)/ | DumpMethod := "Mimikatz";
ImageFileName = /(?i)\\vssadmin\.exe$/ AND CommandLine = /(?i)(create shadow|list shadow)/ | DumpMethod := "ShadowCopy";
ImageFileName = /(?i)\\(esentutl|ntdsutil)\.exe$/ AND CommandLine = /(?i)(sam|ntds|shadow)/ | DumpMethod := "ESENTool";
* | DumpMethod := "Unknown"
}
| DumpMethod != "Unknown"
| groupBy([ComputerName, UserName, ImageFileName, CommandLine, DumpMethod], function=[count(aid, as=EventCount), min(timestamp, as=FirstSeen), max(timestamp, as=LastSeen)])
| sort(LastSeen, order=desc) Detects SAM database credential dumping in CrowdStrike Falcon using LogScale CQL by analyzing ProcessRollup2 events for reg.exe registry hive exports, Mimikatz command patterns, VSS shadow copy abuse, and ESENTUTL/NTDSUTIL misuse, grouped by host and method for analyst triage.
Data Sources
Required Tables
False Positives & Tuning
- Enterprise backup agents or IT automation frameworks that invoke reg.exe to export registry hives during scheduled maintenance or disaster recovery testing
- CrowdStrike Falcon itself or other EDR agents performing process telemetry collection that may invoke VSS or registry utilities
- Authorized penetration testing or red team operators using Mimikatz or credential dumping tools within a scoped engagement window approved by the security team
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.