DPAPI Credential Decryption for Privilege Escalation
Windows Data Protection API (DPAPI) encrypts sensitive data — browser passwords, RDP saved credentials, application secrets, and WiFi keys — tied to the user's logon session. If you have a shell as the user who encrypted the data (or as SYSTEM), you can decrypt it without knowing the master key password. Decrypted credentials frequently belong to administrators and provide direct privilege escalation.
Prerequisites Check
DPAPI decryption works in two scenarios:
As the owning user — DPAPI decrypts automatically using the session key
As SYSTEM — you can access the DPAPI master keys for any user
Finding DPAPI Credential Files
SharpDPAPI — Automated Decryption
SharpDPAPI from GhostPack is the most comprehensive DPAPI tool:
As the current user (decrypt your own credentials):
As SYSTEM (decrypt any user's credentials):
Download: https://github.com/GhostPack/SharpDPAPI
Mimikatz DPAPI Decryption
Browser Password Extraction
Chrome, Edge, and Firefox store passwords encrypted with DPAPI. SharpDPAPI handles these:
Or use dedicated tools:
Download: https://github.com/GhostPack/SharpDPAPI (includes SharpChrome)
Extracting Master Keys from Memory (Live Session)
If the user is currently logged in, their DPAPI master keys are cached in LSASS:
This outputs decrypted master keys. Use them to decrypt any DPAPI blob:
RDP Saved Credentials
RDP targets saved via Windows Credential Manager are DPAPI-protected:
Decrypted RDP credentials often contain domain admin passwords saved by an administrator who RDPed to this machine.
Offline DPAPI Decryption
If you have the user's password or NT hash, you can decrypt DPAPI blobs offline without a live session:
References
-
GhostPack Comprehensive DPAPI credential and master key extraction tool.
-
Microsoft Docs Data protection architecture and master key derivation documentation.
Was this helpful?
Your feedback helps improve this page.