Cracking PDF passwords

Jackbox

Active Member
Jan 2, 2016
197
96
74
First go over here and setup a Kali VirtualBox system: https://ciphers.pw/threads/virtualbox-kali-full-screen.8200/ (VMware works if you already have this setup)

After you are inside your Kali system, continue on with the rest!

Time to fetch our dependencies first:
Code:
apt update
apt install git libssl-dev build-essential -y


Great, now let's get John the Ripper cloned so we can make it (compile).
Code:
cd ~
git clone https://github.com/magnumripper/JohnTheRipper.git
cd ./JohnTheRipper/src
./configure && make


Awesome! That probably took some time, thanks for your patience. Now make sure the PDF you want to crack is on the Kali Linux desktop and named "crack.pdf" because we are going to pull the hash out of our PDF to then crack the password!
Code:
cd ~/JohnTheRipper/run/
./pdf2john.pl /root/Desktop/crack.pdf > /root/Desktop/crack.hash


Now with our hash file generated onto the Desktop, we can start the process.
Code:
cd ~/JohnTheRipper/run/
./john /root/Desktop/crack.hash


After this is finished, you may see "Session completed" and if the PDF has been cracked you may now run
Code:
./john --show /root/Desktop/crack.hash

2288


Notice we now can try 5585 to gain entry into the PDF. You can also use a custom wordlist if you think the password might start with COMPANYNAME for example password.lst is the default but maybe create your own:
Code:
cd ~/JohnTheRipper/run/
./john --wordlist=password.lst /root/Desktop/crack.hash

Welp.. that was fun! Good luck, be safe.. use this only on your own files of course!
 
Last edited:
Top