ZIP, PDF & RAR Password Cracking

ZIP, PDF & RAR Password Cracking

Having confidential documents on a system, like a pdf of financial data or a zip including personal images and videos, ensure they’re password-protected so nobody else can access them. Encrypting documents with a password provides security that although the device is under attack, the attackers would be unable to view files while on the system.

Even so, just like everything else, when files have a password, this can be brute-forced. And here we’re trying to understand about zydra, a file brute-forcing tool, and see how it works by brute-forcing a document and inspecting the details. You will only need a Kali Linux and some encrypted files to perform this tutorial. Zydra works in two modes: brute force and dictionary. And we will try the example on each way.

How Files Encrypt?

Files can be password protected using different encryption algorithms, varying on the software and its edition. Linux command line zip uses the older PKZIP algorithm that is unstable and simple to crack. Other software, such as WinZip and 7-Zip, use the efficient AES-256 encryption algorithm. The RAR method used a unique encryption algorithm in previous versions, but the latest versions utilize AES.

In Linux, you can effortlessly generate PDFs in LibreOffice, and the new file can be password-protected. The passwords stored inside Linux shadow files are protected, but the files themselves are not. MD5, SHA-512, SHA-256, Blowfish, and DES are all commonly used for it.

Install Zydra in Kali Linux

Install some prerequisites first.

  • $ pip3 install rarfile pyfiglet py-term
  • Git clone the repository from Github.
  • $ git clone https://github.com/hamedA2/Zydra.git

Files for Testing

We will get several files to check Zydra before we could launch it. There are RAR and ZIP files available to download and use for testing. Soon you will discover the password for each of these is “password1.” We will use a small list for the demo as the password for these files is simple. You can find the list from SecLists GitHub.

pdf password cracking

Crack ZIP Files

Using a dictionary mode, type file name, and wordlist file.

No alt text provided for this image
No alt text provided for this image

Use the found password to unzip the file and read the content.

No alt text provided for this image

This blog was published on ehacking.

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics