Today we are going learn how to crack the
password of PDF file using Hashcat 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 Hashcat?
- Hashcat is the world’s fastest CPU-based password recovery tool.
- Hashcat is the self-proclaimed world’s fastest CPU-based password recovery tool, Examples of hashcat supported hashing algorithms are Microsoft LM Hashes, MD4, MD5, SHA-family, Unix Crypt formats, MySQL, Cisco PIX.
Practical:
-
Attacker: Kali Linux(OS), Hashcat(Tool), Wordlist.
-
Here we have pdf2john(hashextractor), sample.pdf(target PDF file), rockyou.txt(wordlist). Now lets extract the hashes of PDF file.
- The pdf2john has extracted the hashes of the PDF. Copy the hash in a file.
- Here the hash is saved in a file. Now check for pdf version and module number for hashcat.
hashcat --help | grep pdf -i |
|
|
|
|
- Here we got that the PDF is version 1.6, so the module number for the hashcat is 10500.
- Now, its time for crack the password using hashcat using module number -m 10500, hash.txt file and rockyou.txt file.
- The rockyou.txt file contains 14344394 password.
- This hashcat cracked the password within 20sec.
hashcat -m 10500 hash.txt rockyou.txt
|
- Here we got the password of PDF, now try open the pdf with this password.
Be Aware, Be Secure.
Thank You 🙏
Comments
Post a Comment