πCredential Hunting
π― Overview
Systematic search for stored credentials across the Linux file system. Credentials may be found in configuration files, scripts, history files, backups, databases, and various application-specific locations.
π Common Credential Locations
Configuration Files
# All config files
find / ! -path "*/proc/*" -iname "*config*" -type f 2>/dev/null
# Database configs
find / -name "*.conf" -exec grep -l "password\|pass\|pwd" {} \; 2>/dev/null
# Web application configs
find /var/www -name "wp-config.php" 2>/dev/null
find /var/www -name "config.php" 2>/dev/null
find /etc -name "*sql*" -o -name "*db*" 2>/dev/nullWordPress Database Credentials
# WordPress config files
find / -name "wp-config.php" -exec cat {} \; 2>/dev/null
# Extract DB credentials
grep 'DB_USER\|DB_PASSWORD\|DB_HOST' /var/www/*/wp-config.phpπ SSH Key Discovery
SSH Key Locations
SSH Key Analysis
π History & Log Files
Command History Files
Log File Investigation
ποΈ Backup & Archive Files
Backup File Discovery
πΎ Database & Application Files
Database Credential Hunting
Web Application Files
π§ Mail & Spool Directories
Mail System Investigation
π Comprehensive Credential Search
File Content Search
Specific Application Hunting
π Advanced Credential Discovery
Environment Variables & Memory
Hidden & Dot Files
π Quick Credential Hunt Script
π― High-Value Target Files
Priority File Types
Common Credential Patterns
π Password Validation
Test Discovered Credentials
β οΈ Credential Security
What to Look For
Plaintext passwords in config files
Connection strings with embedded credentials
SSH private keys without passphrases
Database credentials for privilege escalation
Service account passwords for lateral movement
Common Mistakes
WordPress
wp-config.phpwith default credentialsBackup files containing production passwords
Development configs deployed to production
SSH keys in world-readable locations
Passwords in bash history or scripts
Credential hunting transforms file system enumeration into actionable intelligence - discovering stored secrets that enable privilege escalation and lateral movement throughout the target environment.
Last updated