If you have lost your password of any zip, pdf, rar file, then here is an interesting tool for recovering passwords of the pdf file, zip, rar files. We use to save our crucial data in PDF, ZIP, RAR files as in encrypted format, but sometimes we forget the password and lost our data. Password encryption provides extra security for our files and data which is necessary for the present time, so that unknown person cannot read our files. Today you are going to know about a free Linux tool that can help you to recover the passwords of protected files.
Zydra Tool
Zydra is one of the easy and simple tools for file password recovery and it helps to crack the password of Linux shadow files. It contains a dictionary attack or the Brute force technique for recovering the passwords. This tool can recover passwords of these file types:
- PDF Files
- ZIP Files
- RAR Files
Installation Of Zydra
Git clone the following link in your terminal or run this command
git clone https://github.com/hamedA2/Zydra.git
The tool is very small in size, it will be downloaded within a second. Before using this tool we have some prerequisites which are as follows:
These prerequisites get installed manually or we can run the script.sh which is stored in zydra folder as shown in fig:
Note: First provide execution permission to these two scripts.
$./script.sh
You can see we have created a folder on the desktop for this tool in which there are two encrypted files:
- ProtectedZipFile.rar
- EncryptedFile.pdf
Now let’s open the help manual:-
$ python3 zydra.py -help
Now we are done with the installation.
Let’s figure out how to encrypt the files in Linux if you don’t know then we are going to tell you, we can use different tools in Linux but for now, we will use only a terminal for encrypting our files.
Recover the password of the RAR file
Provide the path of the file and for this file, we are using our custom word list of 1000 words for dictionary attack. You can create your own word list.
python3 Zydra.py -f /home/mark/Desktop/ZydraArticle/ProtectedZipFile.rar -d /home/mark/Desktop/ZydraArticle/wordlist.txt
Note: Time of recovering password will depend on your word list(in this case we have used 1000 word list file as you can see in the image) and difficulty of password. Password is recovered which is “ironman”. Let’s see whether it is correct or not?
unrar e /home/mark/Desktop/ZydraArticle/ProtectedZipFile.rar
Password is hidden in the terminal, Hurray! We can clearly see the content of this RAR file.
Recover the password of the PDF file
In this case, we have to provide information regarding the password, which is as follows:
lowercase, uppercase, digits, symbols, letters, minimum length, maximum length and spaces.
Run this command and modify it according to requirements:
python3 Zydra.py -f /home/mark/Desktop/ZydraArticle/EncryptedFile.pdf -b digits -m 5 -x 5
We have provided the digit format, minimum and maximum length on the password.
Password is cracked which is 34890. Let’s open the pdf and see what it contains?
open /home/mark/Desktop/ZydraArticle/EncryptedFile.pdf
Cracking the password of the ZIP file
Like the previous method, we will use a custom word list for encryption. It can be a file of all passwords that you use generally but you have to forget the password of this file and you are lazy to type all the passwords, so this will you in this situation.
python3 Zydra.py -f /home/mark/Desktop/TestZipFile/protectedFile.zip -d /home/mark/Desktop/TestZipFile/wordlist2.txt