Prompt
We have captured an encrypted pdf from a hacker's FTP server. Decrypt it and find out what you can.
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. Once the password is recovered, enter it when opening the PDF to view the flag.
Guide
pdf2john comes preinstalled on Kali Linux and can be used to extract the password hash as follows:
pdf2john encrypted.pdf > hash.txtOption 1: Cracking with Hashcat
As shown in the screenshot above, pdf2john includes the filename in front of the hash, which is not valid syntax for hashcat. Perform the following to delete the leading filename from the hash file:
cat hash.txt | cut -d ":" -f 2- > clean.txtDetermine what hash mode is needed for PDF passwords using hashcat documentation, then crack the password using the Rockyou wordlist:
hashcat clean.txt -O -m 10700 -a 0 /usr/share/wordlists/rockyou.txt-O will help speed up the cracking process.View the cracked password with the following command:
hashcat clean.txt -m 10700 --showIf you find that this is taking a long time to crack that may be because the solution is almost half-way through the Rockyou wordlist.
Option 2: Cracking with John
Crack the password using the Rockyou wordlist:
john --wordlist=/usr/share/wordlists/rockyou.txt hash.txtView the cracked password with the following command:
john --show hash.txtUseful resources for this challenge:
- John the Ripper: https://github.com/openwall/john
- Hashcat example documentation: https://hashcat.net/wiki/doku.php?id=example_hashes
- Use the Tutorial Video below
Tutorial Video
Watch our full Tutorial Video to learn more about how PDFs are encrypted and to see a walkthrough of how to solve this challenge:
Questions
1. What is the password used to encrypt the pdf?
Use a password cracking tool to crack the password with the Rockyou wordlist.
2. What is the flag in the PDF?
Open the PDF using the cracked password to reveal the flag.
©️ 2026 Cyber Skyline. All Rights Reserved. Unauthorized reproduction or distribution of this copyrighted work is illegal.