I have a zip file (.zip created by 7zip v15.10) that I remember the password to (~12 characters long), but it seems I've typed the password wrong while zipping it and now it doesn't open.
What are the best tools to recover the password based on the permutations of what the password should have been?
Some paid zip cracker software claim that they're able to find the right password based on what the password should've be by trying the permutations of it, what I want to find out is: are their claims true?
A year ago I've tried the trial version of one, it had one method that I would start typing the password and at some point it told me that "password found" but to see the password I had to pay for the full version first. I couldn't verify that their claim was true and since their last update was 5-7 years in the past, I was hesitant paying to find out.
-
please edit your question and provide the following information: the format of the file, including the version of the software used to generate it, and the possible range and number of characters in your password (the worst-case scenario)– brynkFeb 17, 2021 at 10:32
-
It's certainly possible that "some paid zip cracker" might be able to use some clever tricks (e.g., as you type it tries the letters you type and typical typo letters close by on the keyboard--like if you type "k" it tries "k" "j" "l" "i" "m" ","), but it is a little hard to give a good answer if we don't know the specific "zip cracker" and the specific claims.– hftFeb 19, 2021 at 22:37
-
See security.stackexchange.com/questions/240072/…– mti2935Feb 20, 2021 at 0:04
1 Answer
The tool you need is called HashCat.
In the first instance, you need to specify or extract the stored+salted hash that is within the zip file, eg:
hashcat -m 13600 "your_zip_file.zip"
^ (for 7z zip files)7z2hashcat
(for 7z files)
(^ See this discussion on various zip formats in hashcat: https://forum.hackthebox.eu/discussion/3783/zip-password-crack)
Then, you need to configure hashcat
to limit the range of characters from which it will draw its possible combinations. This is addressed in the documentation.
edit: to clarify: you don't specify the total number of possible characters in your question, so it's not possible to predict or speculate on possible hashcat
configurations, however, the tool allows you to specify the charset that applies for a particular placeholder, viz. https://hashcat.net/wiki/doku.php?id=mask_attack#examples - in your case I would recommend creating more than one (max four) custom charset with the possible known characters at various regions in your password - the more constraints you can impose, the less the total number of tests that must be executed.
Depending on how many possible combinations there are, you may wish to parallelise the operation. This is beyond the scope of this answer, however, here's an idea about how to approach the problem: Hashcat performance on AWS EC2 GPU instances de Koning 2019
Let us know how you go ... good luck!
-
Sounds like brute force cracking with limited characters. Some paid zip cracker software claim that they're able to find the right password based on what the password should've be by trying the permutations of it, what I want to find out is: are their claims true?– Kia AzadFeb 18, 2021 at 7:17
-
@KiaAzad What exactly do you consider a permutation? To me that just sounds like they're trying slight variations on your guess which is basically equivalent to a brute force attack with a narrowed search space.– tlng05Feb 18, 2021 at 11:13
-
@tln05 well, I mean exactly what you've described. A simple brute force attack checks all combinations, but a more sophisticated algorithm might be able to skip some and try the ones that have a higher chance to be the right password first based on the user input.– Kia AzadFeb 18, 2021 at 13:13