The Wayback Machine - https://web.archive.org/web/20240629083522/https://www.geeksforgeeks.org/recover-password-password-protected-zip-file/
Open In App

Recover password of password protected zip file

Last Updated : 31 Oct, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will get to know about how to get the password of a zip file. I’m using Linux I went with a quick search and came across fcrackzip. This is a free program that allows for both dictionary and brute force cracking of zip file passwords. It is not difficult to use and offers a wide range of options. 
Let’s make a zip file then we will copy-paste it into Linux after that we will try to break this password by fcrackzip. I created a zip file. This zip file’s password is 12345678.
 

Creating password protected zip

Creating password protected secret.zip

In Terminal type fcrackzip –help this command will open help options for fcrackzip 
 

USAGE: fcrackzip
          [-b|--brute-force]            use brute force algorithm
          [-D|--dictionary]             use a dictionary
          [-B|--benchmark]              execute a small benchmark
          [-c|--charset characterset]   use characters from charset
          [-h|--help]                   show this message
          [--version]                   show the version of this program
          [-V|--validate]               sanity-check the algorithm
          [-v|--verbose]                be more verbose
          [-p|--init-password string]   use string as initial password/file
          [-l|--length min-max]         check password with length min to max
          [-u|--use-unzip]              use unzip to weed out wrong passwords
          [-m|--method num]             use method number "num" (see below
          [-2|--modulo r/m]             only calculate 1/m of the password
          file...                    the zipfiles to crack

There are 2 methods to get the password of the zip file 
 

1. Brute force attack: If you wanted to use a brute force attack from 4-8 characters on “secret.zip” you would use the following command: 

$fcrackzip -v -m -l 4-8 -u secret.zip

To break the command down: 

  • v is for verbose and gives you better output
  • m specifies the mode to use, in this case, zip6
  • l specifies the minimum password length to maximum password length
  • u tells the program to test the password with unzip before declaring it correct

2. Dictionary-based Attack: Using a dictionary-based attack is as easy as brute force attack

Syntax:

$ fcrackzip -v -D -u -p /usr/share/dict/words secret.zip

Here: /usr/share/dict/words is the wordlists and secret.zip is the zipped file that is encrypted.

Example:

fcrackzip -v -D -u -p /usr/share/wordlists/rockyou.txt 16162020_backup.zip

Here the only difference is the -D to specify a dictionary-based attack and -p which is used to specify the password file. This file should contain one word per line and on Linux systems, there’s a nice dictionary included in /usr/share/dict/words or you can use any other password dictionaries. 

 

 



Similar Reads

How to Recover an Apple ID Password?
Apple ID is the magic key to unlock every surprise hidden in any Apple device. It might be an iPhone, iPad, iMac, MacBook, or any Apple Watch, if you have an Apple ID, you can unlock every inbuilt feature like an email system, purchase movies & apps, log in to the app store, etc of the Mac operating system. It is like a Google Account in any An
5 min read
How To Hack Password Protected Computer Account using CMD?
The term hacking is usually used for finding security faults in a System or network. To hack something also means getting unauthorized access to data in a system. To hack password protected computer using Windows Command Prompt is not a feasible technique. However, In this article, we will see how we can use CMD and get into a password protected Co
5 min read
How to Recover Accidentally Deleted File in Windows 11?
Have you ever accidentally deleted a file and later regretted it? Fear not! You’re not alone. Many individuals encounter this situation and wonder how to retrieve their lost data. Luckily, Windows 11 provides various methods for recovering deleted files, depending on the circumstances of their deletion. In this article, We'll show you how to recove
5 min read
How to Delete and Recover Firebase Project?
Here, we are going to Delete and Recover Firebase Project. This feature will be useful when we have by mistake deleted our project and we want to recover that project. Or it may be possible that we had deleted our project because we had no use of that, but now we need that firebase project. Note: A deleted firebase project can be recovered within o
1 min read
How to Recover Deleted Files Using Foremost in Linux?
Foremost is a digital forensic application that is used to recover lost or deleted files. Foremost can recover the files for hard disk, memory card, pen drive, and another mode of memory devices easily. It can also work on the image files that are being generated by any other Application. It is a free command-line tool that is pre-installed in Kali
3 min read
How to Recover Permanently Deleted Photos on iPhone?
In 2007, the ground-shaking smartphone was introduced by Apple Inc. which was later known as iPhone. You will be surprised to know that to date, 700 million iPhone devices have been sold out by Apple Inc. According to one survey data in August 2023, 95% of smartphone profits go into Apple Inc's pocket. The reason behind such skyrocketing popularity
4 min read
How to Recover Hacked Facebook Account?
When your Facebook account gets hacked then the complete control of the account goes to the hacker & they can do anything with that. They can change the name, photo, and identity & can do some illegal things with users' names. So, there you need to recover your hacked Facebook Account. For that, there are two possible methods present. In th
4 min read
How to Recover Your Google Account or Gmail?
There are times when a device loses Google Account information, and a user needs to Recover Google Account with some credentials. These credentials are crucial to verify your identity to prevent any unauthorized access. If the user forgets about the Google Account or Gmail information, login operation will become difficult. But thanks to Google Rec
5 min read
How to Recover Your Forgotten Passwords?
Forgetting passwords is a common occurrence in the digital age. Fortunately, there are simple steps you can take to regain access to your accounts. With these methods, you can recover your forgotten passwords. In this comprehensive blog how to recover your forgotten passwords we will only discuss these methods. Whether it's your email, social media
3 min read
10 Ways to Track and Recover Your Lost/Stolen iPhone
Tracking and recovering your lost or stolen iPhone can have numerous ways. Apple provides several tools and features to help you locate your device and shield your personal information. Methods to Track and Recover Your Lost/Stolen iPhoneThe following article provides an extensive guide on tracking and recovering your lost or stolen iPhone. 1. Use
4 min read
Article Tags :