Credential Hunting
Search for files containing βpasswordβ or βpasswdβ
check for dbs and config filesfind / -type f -name "*.conf" -exec grep -H "DB_USER" {} \; 2>/dev/null
find / -type f -name "*.yaml" -exec grep -H "password" {} \; 2>/dev/null
find / -type f -name "*.pem" -o -name "*.key" 2>/dev/null
find /home -type f -name "id_rsa" 2>/dev/null
find /home -type f -path "*aws*" -exec grep -H "aws_access_key_id" {} \; 2>/dev/null
find / -type f -path "*aws*" -exec grep -H "AWS_ACCESS_KEY_ID" {} \; 2>/dev/null
/var/log/auth.log
or /var/log/secure
for previously captured credentials or failed attempts:
Look for passwords in scripts or in /opt
, /usr/local
: