Credential Discovery — Where Creds Hide

Companion to Attack Path Graph > Credential Discovery Paths and Credential Graph. Run this checklist on every shell before privesc-only tunnel vision.


📌 Hunt List

SourceWhere to lookTools
Linux passwd/shadow/etc/passwd, /etc/shadow, /etc/groupRegistry Hives and Linux Equivalents · Linux · John
Config files/var/www, web.config, .env, appsettings.jsongrep -ri pass, grep
Backups.bak, .old, .zip, backup.sqlGobuster -x bak,zip,sql
Database files*.db, *.sqliteSQLite · find
Env varsenv, /proc/*/environstrings, cat
History.bash_history, PowerShell historymanual
SSH keys~/.ssh/id_rsa, /etc/sshSSH · ssh2johnJohn
SAM / LSASSWindows local/domain — LSASS = live sessionsLSASS · Registry Hives and Linux Equivalents · Mimikatz · secretsdump
RegistryAutoLogon, saved credsWindows PrivEsc
Scheduled tasksTask scripts with passwordsschtasks, Windows PrivEsc
MailPOP3/IMAP inboxesMail (SMTP POP3 IMAP) · grep -i pass
LDAP descriptionsUser attrsldapsearch
SharesSMB readablesmbclient · smbmap
Browsersaved passwordsFirefox Credentials - firefox_decrypt · LaZagne · nxc -M firefox

📌 Quick Commands

# Linux
grep -riE "pass|password|secret|key" /var/www 2>/dev/null
find / -name "*.db" -o -name "*.sqlite*" 2>/dev/null
find / -name "id_rsa" -o -name "*.pem" 2>/dev/null
find /home -path "*/.mozilla/firefox/*/logins.json" 2>/dev/null   # Firefox saved logins
cat /etc/passwd; sudo -l; env
 
# Windows (CMD/PS)
dir /s /b *pass* *cred* *.config 2>nul
cmdkey /list
# PowerShell history → **[[PowerShell History - PSReadLine]]**
(Get-PSReadlineOption).HistorySavePath
type %USERPROFILE%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadLine\ConsoleHost_history.txt

📌 After You Find Something

→ Open Credential Graph — map artifact to next action (login, PtH, Kerberoast, etc.)

Reuse everywhere: nxcspray, Hydra, CrackMapExec - nxc, evil-winrm, SSH, Impacket