Prompt
We have captured an encrypted pdf from a hacker's FTP server. Decrypt it and find out what you can.
Tutorial Video
Walk-Through
This challenge involves cracking the password of an encrypted PDF. This is accomplished by first extracting the password hash from the PDF and then running a password cracking tool, such as hashcat
or john
.
Extracting the Password Hash
pdf2john
can be used to extract the password hash and it comes preinstalled in Kali Linux.
pdf2john encrypted.pdf > hash.txt
Cracking the Password Hash
You can then crack the password using hashcat
or john
.
Option 1: Hashcat
- Delete the leading filename from the hash file.
- Crack the password using the rockyou wordlist
This is necessary because pdf2john
includes the filename in front of the hash, which is not valid syntax for hashcat
.
cat hash.txt | cut -d ":" -f 2- > clean.txt
hashcat clean.txt -m 10700 -a 0 /usr/share/wordlists/rockyou.txt
- View the cracked password
hashcat clean.txt -m 10700 --show
Option 2: John
- Crack the password using the rockyou wordlist
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txt
- View the cracked password
john --show hash.txt
Questions
What is the password used to encrypt the pdf?
Use a password cracking tool to crack the password with the Rockyou wordlist.
What is the flag in the PDF?
Open the PDF using the cracked password to reveal the flag.
©️ 2024 Cyber Skyline. All Rights Reserved. Unauthorized reproduction or distribution of this copyrighted work is illegal.