So you may have seen this video on YouTube. If you're one of those who'd rather read than watch, congrats—you’re our kind of rebel. Keep scrolling. 😉
So you got a PDF file, and it's locked tighter than your favorite snack stash? Maybe you forgot the password, or maybe you're just curious (👀) about how these things work. Either way, we’re about to unleash the beast—John the Ripper, the legendary password cracker that laughs in the face of weak security.
Let’s crack (pun intended) right into it. 🛠️
Step 1: Kali Linux Subsystem – Welcome to the Dark Side
First things first, we need a powerful environment for this mission. That means Kali Linux, the hacker’s playground. If you're on Windows, don’t worry—Microsoft has your back (for once). Install the Kali Subsystem right here:
🔗 Download Kali Linux Subsystem
Once installed, fire it up like it’s your favorite retro console. 🎮
Step 2: Summoning John the Ripper
Time to bring our digital lockpicker into the mix. Open up your Kali terminal and enter:
git clone https://github.com/magnumripper/JohnTheRipper.git
cd ./JohnTheRipper/src
sudo apt-get update
sudo apt-get install libssl-dev
./configure && make
cd ..
cd /run
Why all this setup? Because good things take time, and this is one of the best password crackers out there. 💪
Step 3: Extracting the Hash – The Secret Sauce 🕵️♂️
Before John can do its magic, we need to convert the PDF into a hash (a cryptographic representation of the password). This is where pdf2john comes in:
./pdf2john.pl secret.pdf > secret.hash
Replace secret.pdf
with the actual PDF file name.
What did we just do? Turned the PDF into a hash file that John can munch on. 🥩
Step 4: Time to Crack! 🧨
Now, the fun part—breaking the password. We have two options:
Option A: Brute Force (Smash it till it works)
john secret.hash
Option B: Wordlist Attack (Using known passwords)
john --wordlist=/usr/share/wordlists/rockyou.txt secret.hash
RockYou.txt is legendary in the hacking world. If a password has ever been leaked, chances are it’s in there. 📜
Step 5: Show Me the Password 🏆
Once John finishes doing its thing, you can retrieve the password like this:
john --show secret.hash
Boom! There’s your password. Now go back, open the PDF, and feel like a 1337 hacker. 😎