John The Ripper
Format the archived file to make the John to recognize it, then crack the hash using John.
Fcrackzip
# -u: unzip
# -D: dictionary
# -p: strgin as initial password/file
fcrackzip -u -D -p passwords.txt sample.zip
Bkcrack
bkcrack is useful for cracking legacy zip encryption with a known plaintext attack.
Download the Tool
wget https://github.com/kimci86/bkcrack/releases/download/v1.5.0/bkcrack-1.5.0-Linux.tar.gz
tar -xf bkcrack-1.5.0-Linux.tar.gz
cd bkcrack-1.5.0-Linux.tar.gz
Recover Internal Keys
First we check what files in the target zip file.
Assume the encrypted.zip
contains the secret.key
file and we know that it contains the "secret is" string.
Then we need to create a plain file with the same string "secret is".
Now crack the keys using these files.
For example, we get the result 8257499e 175bb63c fcbd5ff2
.
We can recover the password by running the following command.
After that, result.txt
is generated so we can see the content of the file.