Cracking a ZIP File Password Using CMD

Forgetting or losing passwords is a very common issue, and for sure that will make you feel upset and frustrated. There are many ways to restore or recover the password. In this article, we will show you, step-by-step, how to recover the password of a ZIP file using the CMD tool.

Step-1: First of all, you need to download a command tool called “John the Ripper”. It’s an open-source free tool available for all operating systems, Windows, Linux and macOS. Click here to go to its official webpage, and select the version suitable for your operating system.

John the Ripper

Step-2: Then, unZIP the downloaded folder and save it in a unique folder name. It can be any name you want, let’s say “ABC”.

Unzip John the Ripper on Windows Computer

Step-3: Open the unzipped folder “ABC” and click on the “run” folder. In this folder, you need to create another folder, and name it “crack”.

Create a Crack Folder in John the Ripper Folder

Step-4: Put the password-protected ZIP file that you want to crack inside this folder. The ZIP file we used in this tutorial is called “profile”.

Add the Password-Protected ZIP File into John the Ripper Folder

Step-5: Close all the opened folders, and open your CMD tool. In this command prompt write the command line: cd desktop/ABC/run”, then click “Enter”.

Open CMD and Go to John the Ripper Run Folder

Step-6: After that, type in the command: “zip2john.exe crack/>crack/key.txt”, and click “Enter”. This step will create password hashes in a form of .txt file. Remember, you need to write your ZIP file name instead of “profile”.

Use zip2john.exe Command to Generate Hash File for the ZIP File

This Is the Password-Protected ZIP Hash File TXT File

Step-7: The hash file now will be used to crack the ZIP file password. In the command prompt, write in the command line “john –format=zip crack/key.txt”.

Use john --format=zip to Crack the ZIP File Password

Step-8: The CMD will execute the command and show the cracked password after the process finishes. Note that if the password is simple, it will take a few minutes, however, if the password is complex, it may take several hours.

ZIP File Password Cracked Successfully with John the Ripper

The Most Effective Alternative

Although this method of using CMD to crack the ZIP file password is somehow easy and free, there are some drawbacks of using this method, which are as follows.

  1. Time-consuming: this method consumes a lot of time to crack a Zip file password, especially if it is longer than 4 characters. It may take several hours or even days in case the password is complex.
  2. Low recovery rate: due to long password recovery process, this method succeeds only in about 20% of the cases
  3. Potential data loss: when using the CMD, you need to be very careful while writing the command lines. Any mistake may result in data loss or damaging the ZIP file.

What if this method did not work with your case and you cannot recover the ZIP file password using the CMD? The good news is there is a very efficient and easier way to do that, which is by using the application “Passper for ZIP” and you can find the article about it here. This tool is incredibly powerful with a user-friendly interface that will help you in your time of need.

Free Download Passper for ZIP

Tareq A. Awadallah

A mechanical engineer, technical content creator, writer and editor, and digital enthusiastic. Worked in construction, oil & gas, and e-commerce fields, and gained experience dealing with different subjects and topics every day.

Related Articles

Back to top button