Cracking Encrypted PDF Password Using Dictionary Attack

February 15, 2018 | Views: 9587

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here


In this post we will crack encrypted PDF with a very easy method. This is a very simple and easy method for cracking encrypted PDF password which is helpful for beginners in password cracking. There are also different method for cracking PDF password by generating hash and cracking it with John the Ripper but we are going to use dictionary attack for this.


Lets crack the code

In below screen shot we can see when i am trying to access a PDF its asking for password.



 STEP 1 First open your terminal and type apt-get install pdfcrack -y and press return.



It will install pdfcrack on your machine 



 Now before cracking the password we need do generate some wordlist by keeping in mind our target, before doing this we have to do some reconnaissance to gather information about our victim. 


STEP 2  After gathering enough information about our target its time to generate wordlist . To do this first type apt-get install cupp and then type cupp -i.


STEP 3  cupp will ask for your target information like his name, his Surname, DOB, pet name so just enter your target information as asked.



STEP 4  It will ask to enter some keywords that could be victim’s nick name , phone number etc. So enter your custom words as shown below.



STEP 5  Now it will ask for enter random number at end of word and to enable l33t mode , You can use this options if your target is some geek or computer enthusiasm so in this case i am going to use these options and then it will create your wordlist.



STEP 6  It is possible that the password may not be found in this wordlist and could be some random words so i am going to merge this with some large wordlist for this i am going to use rockyou.txt which you can find at /usr/share/wordlists/  extract this at the same place where your generated wordlist is.


STEP 7  Now its time to merge these two wordlist, for this type cat “your older wordlist name” “other wordlist name ” >  “new wordlist name”.


For example in this case it will be cat shaquib.txt rockyou.txt > modified.xt



STEP 8  We have prepared our hack now its time to crack the pdf so type pdfcrack -f “your pdf name” -w your created wordlist” as in this case pdfcrack -f /root/downloads/encrypted.pdf -w /root/Desktop/modified.txt  



It will start the Attack 



And within some minutes we successfully cracked the password of this encrypted PDF file.


For more stuff you can follow us on : Facebook

And you can also follow our Page  





Share with Friends
Use Cybytes and
Tip the Author!
Share with Friends
Ready to share your knowledge and expertise?
  1. Thanks for the sharing.
    Is it the same way for Microsoft office files ?

Page 2 of 2«12
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Support Cybrary

Donate Here to Get This Month's Donor Badge


We recommend always using caution when following any link

Are you sure you want to continue?