hashcat(https://hashcat.net) supports some zip archive cracking.
./hashcat64.bin --help | grep -i zip
11600 | 7-Zip | Archives
13600 | WinZip | Archives
Unfortutnately, if you creacted the file with PKZIP, that won't help(https://github.com/hashcat/hashcat/issues/69).
If your files were created with PKZIP, you'll need to first extract the password hash and then crack it using John. In my experience John the Ripper is slower than hashcat, which is why I'm putting it second.
Based on https://dfir.science/2014/07/how-to-cracking-zip-and-rar-protected.html,
you'll have to:
git clone --depth=1 --branch=bleeding-jumbo https://github.com/magnumripper/JohnTheRipper.git
cd JohnTheRipper/src/
./configure && make
cd ../..
JohnTheRipper/run/zip2john target.zip > hash
JohnTheRipper/run/john hash
PS. installing john
from the repositories will usually install the version without community patches, meaning... without zip2john
. Which is why this guide assumes installation from source will be required. Unfortunately, trying to build the last release on Ubuntu 16.04 failed during linking, which is why this guide assumes you'll have to build from git, which worked for me. Building requires build-essential
and libssl-dev
on Ubuntu, different distros will have different requirements