Overview
Windows stores credentials in multiple locations including LSASS process memory, the SAM database, NTDS.dit (Active Directory), and the DPAPI master key store. This page covers how to extract credentials from each location during authorized assessments.
Credential theft techniques are for authorized penetration testing and red team operations only. These techniques are highly impactful and must only be used with explicit written authorization.
Mimikatz
Mimikatz is the primary tool for Windows credential extraction:
PowerShell Invoke-Mimikatz
LSASS Dumping Methods
Procdump (Microsoft Signed)
Procdump from Sysinternals is a legitimate Microsoft-signed binary, not flagged by Defender:
Then extract credentials:
comsvcs.dll (No Upload Required)
Task Manager (GUI Method)
- Right-click Task Bar → Task Manager → More Details
- Find “Local Security Authority Process” in Processes tab
- Right-click → “Create dump file”
PPLBlade (Bypasses Protected Process Light)
PPLBlade dumps LSASS while:
- Bypassing PPL protection
- Obfuscating the dump file to evade Defender signatures
- Supporting fileless (in-memory) upload via RAW or SMB
LalsDumper (SSP-Based — No MiniDumpWriteDump)
Advanced three-stage dumper that loads a malicious SSP into LSASS, never calling MiniDumpWriteDump:
- Stage 1 (
lals.exe) — patches fdp.dll placeholder with path to rtu.txt, saves as nfdp.dll, calls AddSecurityPackageA("nfdp","fdp") to force LSASS to load the rogue SSP
- Stage 2 (inside LSASS) — rogue DLL reads
rtu.txt, XORs with 0x20, maps decoded shellcode
- Stage 3 — reimplements MiniDump logic via direct syscalls, streams compressed LSASS dump to
%TEMP%\<pid>.ddt
SAM and SYSTEM Extraction
The SAM database stores local account hashes and requires SYSTEM access to read directly.
From Registry
Extract hashes on attacker machine:
Volume Shadow Copy
PowerShell alternative:
NTDS.dit — Active Directory Database
The NTDS.dit file is the AD database containing all domain user password hashes.
Hash decryption requires three layers:
- Decrypt PEK (Password Encryption Key) using BOOTKEY + RC4
- Decrypt hash using PEK + RC4
- Decrypt hash using DES
Copy NTDS.dit
Export NTDS to SQLite
CrackMapExec Credential Dumping
DPAPI — Decrypting Stored Credentials
DPAPI protects stored credentials, browser passwords, and PowerShell credentials:
Mining Idle RDP Sessions
After compromise, harvest credentials from users with active RDP sessions:
Registry Downgrades for Credential Theft
FinalDraft-style implants set registry keys to enable credential theft:
DisableRestrictedAdmin=1 — enables full credential/ticket reuse during RDP (Pass-the-Hash via RDP)
LocalAccountTokenFilterPolicy=1 — disables UAC token filtering over the network
RunAsPPL=0 — removes LSASS PPL protection, making memory dumps trivial
Invoke-NinjaCopy
Invoke-NinjaCopy can read files locked by the OS (SAM, NTDS.dit, SYSTEM hive) without VSS:
Meterpreter Credential Harvesting
If you have a Meterpreter shell:
References