Credential Hunting in Linux
Utilize when you have compromised a Linux Machine
🎯 Target Areas for Credential Hunting
Credential-related data can be found in many places. For efficiency, categorize your search:
Files
Configs, Logs, Cache, Notes
History
Shell commands, session history
Memory
In-memory data, running processes
Keyrings
Browser-stored credentials, OS-based vaults
🗃️ Files
Linux treats everything as a file, making files the primary hunting ground. Focus on:
Configuration Files (
.conf
,.config
,.cnf
)Databases (
.db
,.sql
)Scripts (
.sh
,.py
, etc.)Notes (
.txt
or extension-less)Cronjobs
SSH Keys
Finding Config Files
To find credentials within them:
🧩 Databases
Database files can contain stored credentials:
📝 Notes
Often contain sensitive access information:
⚙️ Scripts
Scripts can store hardcoded credentials:
⏰ Cronjobs
Check both system and user cronjobs:
🔑 SSH Keys
SSH private/public keys can allow system access:
Private Key Search
Public Key Search
📜 History Files
Shell and command-line history can leak credentials:
📄 Logs
Logs can expose login attempts, sudo usage, and failures:
Memory (Live Creds)
Mimipenguin (Requires Root)
LaZagne (Extensive Source Extraction)
Credential sources LaZagne targets include:
Wifi, Kwallet, Libsecret, CLI
Git, Env Vars, Grub, Docker
AWS, SSH, Shadow, Keepass
Chromium, Firefox, Thunderbird
Browsers
Firefox Credential Storage
Check stored profiles:
Inspect login file:
Navigate to Mozilla FIrefox Directory
Decrypt with Firefox Decrypt
LaZagne for Browsers
Last updated