Operator On The Wire
Join
← Back to Knowledge Base
BLUE TEAM / THREAT HUNT / ACTIVE DIRECTORY / CREDENTIAL ACCESS / SECRETS

SAM

This note documents detection patterns related to SAM Dumping within Active Directory environments.


Direct Indicators

LogEvent IDMeaningForensic ValueNotes
Security4688Process creationCriticalLook for execution of tools capable of dumping SAM such as reg.exe, secretsdump.py, mimikatz, or PowerShell scripts. Review CommandLine and ParentProcessName.
Security4656Handle requested to objectHighAccess to registry hives such as SAM and SYSTEM may indicate credential extraction attempts.
Security4663Object accessHighIndicates access to registry keys or files associated with the SAM database.
Sysmon1Process creationCriticalIdentify suspicious execution of registry export commands or credential extraction utilities.
Sysmon11File creationHighCreation of exported registry hive files such as sam.save or system.save.
Sysmon13Registry value setMediumRegistry operations interacting with SAM or SYSTEM hives.

Indirect Indicators

IndicatorWhat To Look ForForensic ValueNotes
Registry hive exportCommands exporting SAM or SYSTEM hives using reg saveCriticalCommon attacker method to obtain password hashes.
Suspicious tool executionExecution of mimikatz, secretsdump, or similar utilitiesHighOften indicates credential dumping activity.
Temporary hive filesFiles named sam.save, system.save, or similar appearing in temp directoriesHighOften used by attackers for offline extraction.
Privilege escalation preceding dumpUse of SeBackupPrivilege or administrative privilegesMediumOften required before registry hive access.
Post-dump authenticationSuccessful logons using accounts extracted from SAMCriticalIndicates attacker cracked hashes and reused credentials.

Common Tools

ToolUsage
MimikatzExtracts SAM password hashes from memory or registry hives.
Impacket secretsdump.pyExtracts SAM and SYSTEM hashes from local or remote hosts.
reg.exeBuilt-in command used to export registry hives.
PowerShell scriptsCustom scripts used to copy and extract registry hive files.
Cobalt StrikeOften used to execute credential dumping modules.

Relevant Artifacts

  • Windows Security logs (4688, 4656, 4663)
  • Sysmon logs (1, 11, 13)
  • Registry hive files (SAM, SYSTEM, SECURITY)
  • Dumped hive copies on disk
  • Prefetch entries for dumping utilities
  • MFT artifacts showing hive file creation
  • PowerShell execution logs (4103, 4104)
  • EDR telemetry showing suspicious registry operations

MITRE ATT&CK References

  • T1003 OS Credential Dumping
  • T1003.002 SAM
  • T1078 Valid Accounts
  • T1555 Credentials from Password Stores

Decision Tree

  1. Is the suspicious event present?
    • Look for process execution exporting registry hives or accessing SAM database.
  2. What host generated the event?
    • Identify the compromised workstation or server.
  3. Is the account expected to perform this action?
    • Registry hive exports are uncommon in normal operations.
  4. Pivot:
    • Source host → analyze executed commands and processes.
    • Account → review privileges and group memberships.
    • Network → check for lateral movement after credential extraction.
  5. Confirm exploitation
    • Investigate whether dumped hashes were used for authentication attempts.

Example Detection Templates

KQL

SecurityEvent
| where EventID == 4688
| where CommandLine contains "reg save"
| project TimeGenerated, Computer, NewProcessName, CommandLine, ParentProcessName
Sysmon
| where EventID == 11
| where TargetFilename contains "sam"
| project TimeGenerated, Computer, TargetFilename, Image

EQL

process where process.command_line like "*reg save*SAM*"

Sigma

title: SAM Registry Hive Dump
id: sam-hive-dump
status: experimental
description: Detects attempts to export the SAM registry hive
logsource:
  product: windows
  category: process_creation
detection:
  selection:
    CommandLine|contains:
      - "reg save"
      - "SAM"
  condition: selection
fields:
  - CommandLine
  - ParentProcessName
falsepositives:
  - Legitimate administrative backup operations
level: high
tags:
  - attack.credential_access
  - attack.t1003.002

Mitigation & Hardening

Control AreaMitigationEffectivenessNotes
Privilege restrictionLimit SeBackupPrivilege and administrative rightsHighPrevents unauthorized registry hive exports.
MonitoringAlert on reg save commands targeting SAM or SYSTEM hivesHighEarly detection of credential dumping attempts.
Endpoint protectionDeploy EDR capable of detecting credential dumping toolsHighHelps detect suspicious registry access behavior.
Least privilegeRestrict local administrator accountsHighReduces attacker ability to dump registry hives.
System auditingEnable detailed registry access auditingMediumImproves visibility into hive access events.