PDF Password Cracking Using JTR

Today we are going learn how to crack the password of PDF file using JTR(John The Ripper) tool. 

Disclaimer: The articles provided on HackWithV is purely for informational and educational purpose only, and for those who are willing and curious to know & learn about Ethical Hacking, Security and Penetration Testing. Anytime the word "Hacking" that is used on this site shall be regarded as Ethical Hacking.

What is PDF?

  • PDF stands for the Portable Document Format, used to display documents in an electronic form independent of the software, hardware or operating system they are viewed on.

What is JTR?

  • John, better known as John the Ripper, is a tool to find weak passwords of users in a server.
  • John supports different cracking modes and understands many ciphertext formats, like several DES variants, MD5 and blowfish. 
  • It can also be used to extract AFS and Windows NT passwords.

Practical:

  • Attacker: Kali Linux(OS), John(Tool), Wordlist.
  • Target: PDF(file)

 ls

  • Here we have pdf2john(hashextractor), sample.pdf(target PDF file), rockyou.txt(wordlist). Now lets extract the hashes of PDF file.
 ./pdf2john sample.pdf

  • The pdf2john has extracted the hashes of the PDF. Copy the hash in a file.
 cat hash.txt

  • Here the hash is saved in a file. Now check usage of john.
  john --help


 
 

  • Now, its time for crack the password using john, hash.txt file and rockyou.txt file.
  • The rockyou.txt file contains 14344394 password.
  • The john cracked the password within 2 min 10 sec.
 wc -l rockyou.txt

 john hash.txt --wordlist=rockyou.txt


  • Here we got the password of PDF, now try open the pdf with this password.

Be Aware, Be Secure.

Thank You 🙏

 

Comments

Popular posts from this blog

Demo 1- How to Track Location by a Link

Snyk - Ubuntu 20.04 (Linux)

Cracking VNC Password Using Hydra