Windows Credential Hunting for Privilege Escalation
Credentials left on Windows systems are one of the most reliable escalation paths. Passwords appear in registry keys, installation files, PowerShell history, scheduled task configurations, and application configs. Find one credential and test it against everything — password reuse is extremely common.
Prerequisites Check
Note your current privileges and group memberships before hunting — some credential stores require elevated access.
Registry — AutoLogon and Stored Passwords
Windows AutoLogon credentials are stored in plaintext in the registry:
Broad registry password search:
PuTTY stored sessions often contain credentials:
Unattend.xml and Sysprep Files
Windows deployment files frequently contain base64-encoded or plaintext administrator passwords:
Look for <Password> tags. The value inside <Value> may be base64-encoded. Decode it:
PowerShell History
PowerShell saves command history per user. Credentials typed on the command line appear here:
Check all users if you have access:
cmdkey — Stored Windows Credentials
cmdkey stores credentials for network resources and remote desktop sessions:
If stored credentials exist for a target, use runas to execute commands as that user without knowing the password:
See https://hackindex.io/platforms/windows/privilege-escalation/runas-stored-credentials for the full exploitation workflow.
IIS and Web Application Configs
Web server configuration files frequently contain database passwords:
Application Config Files
SAM and SYSTEM — Local Password Hashes
If you have admin privileges, dump local account hashes:
For the full hash dumping and cracking workflow see https://hackindex.io/platforms/windows/privilege-escalation/windows-password-attacks.
WiFi Passwords
Stored WiFi profiles often contain plaintext PSK passwords:
The Key Content field is the plaintext WiFi password. Administrators frequently reuse WiFi passwords for local accounts.
DPAPI Credential Files
Windows DPAPI protects stored browser passwords, RDP credentials, and application secrets. If you have access to a user's profile:
For DPAPI decryption see https://hackindex.io/platforms/windows/privilege-escalation/dpapi-credential-decryption.
Automated Search
winPEAS covers most of these automatically:
PowerUp also checks AutoLogon and common credential locations:
Password Reuse Testing
Once you find any credential, test it everywhere:
References
-
Automated credential discovery across registry, files, and Windows credential stores.
-
cmdkeydocs.microsoft.com/en-us/windows-server/administration/windows-commands/cmdkey (opens in new tab)
Documentation Stored credential management and runas integration.
Was this helpful?
Your feedback helps improve this page.