• caglararli@hotmail.com
  • 05386281520

Can’t crack specific zip file with John on one OS, but manged to do it on another OS

Çağlar Arlı      -    15 Views

Can’t crack specific zip file with John on one OS, but manged to do it on another OS

I'm using John The Ripper for cracking zip archives under Kali Linux and Ubuntu 22 LTS, and it sometimes works, but sometimes doesn't. When I prepare a zip archive under Windows, it cracks it perfectly, but sometimes there are files that I cannot crack.

What's funny is I have a file which I managed to crack once, but now when I try to do it again on another OS, I can't. I only remember the first time I used a lot of commands to figure it out.

I noticed that the main difference between files I can crack or cannot is the result of zip2john command:

└─$ zip2john abc.zip > abc.hash

If this command doesn't print any result the cracking will be successful, but when it results with:

└─$ zip2john wtf.zip > wtf.hash 
ver 2.0 wtf.zip/20240216_124713.pdf PKZIP Encr: cmplen=1294053, decmplen=1501317, crc=496001BE ts=692F cs=4960 type=8

the cracking won't be successful; john will keep trying to find the password forever.

I'm sure that this file can be cracked because I managed to do it once using thousands of commands like umask, unshadow, changing permissions, editing something inside the hash file, but now I try everything and can't repeat it.

Can you help me? I wonder what is the difference between those files which makes it so difficult to crack the second type as on the second example.

You asked me about these comments I tried - I manged to find the history of commands - i tried them again but it didint work:

sudo apt-get install john -y
john
clear
ls
cd Desktop/
ls
ziptojohn WAM.zip > hash.txt
zip2john WAM.zip > hash.txt
zip2john
snap install john-the-ripper
zip2john
john-the-ripper.zip2john 
clear
john-the-ripper.zip2john WAM.zip > hash.txt
clear
john
clear
john --format=zip hash.txt
sudo apt-get install subversion cmake bison flex
john --format=zip hash.txt
john-the-ripper.zip2john WAM.zip > hash.txt
cd ..
ls
cd matheo/
ls
cd Desktop/
ls
john-the-ripper.zip2john WAM.zip > hash.txt
john --format=zip hash.txt
john --list=formats | tr , '\n' | grep md5
john man
john
sudo apt update~
sudo apt update
sudo apt install snapd
sudo snap install john-the-ripper
john man
john
sudo snap install john-the-ripper
john-the-ripper
clear
john-the-ripper --format=zip hash.txt
john-the-ripper man
john-the-ripper
john --format=zip hash.txt
john
clear
zip2john 
john-the-ripper.zip2john
john-the-ripper --format=zip hash.txt
sudo unshadow /etc/passwd /etc/shadow > johninput
john --format=crypt --wordlist=/usr/share/wordlists/rockyou.txt johninput
john --format=crypt johninput
clear
john --format=crypt hash.txt
joh-the-ripper --format=crypt hash.txt
john-the-ripper --format=crypt hash.txt
john-the-ripper --format=zip hash.txt
clear
sudo apt-get purge john
john
clear
ls
cd johnrp/
ls
cd john-1.7.9-jumbo-7-Linux-x86-64/
ls
cat README
clear
ls
run
xdg-open run
cd ..
xfg-open john-1.7.9-jumbo-7-Linux-x86-64/
ls
cd john-1.7.9-jumbo-7-Linux-x86-64/
.configure
./configure
cd ..
tar xvzf john-1.7.9-jumbo-7-Linux-x86-64.tar.gz 
./configure
sudo apt-get install john=1.8.0-4ubuntu3 
clear
sudo apt-get install john=1.7.9-jumbo
sudo apt-get install john-the-ripper
sudo apt-get install john=1.8.0-4ubuntu3 
john
john --format=zip hash.txt \
john --format=zip hash.txt
sudo john --format=zip hash.txt 
clear
john-the-ripper.zip2john test.zip > test.txt
john --format=zip test.txt
cat test.txt
clear
nano hash.txt 
nano test.txt
unshadow WAM.zip 
ls
cd Desktop/
ls
sudo apt-get purge john
tar -xzf john-1.7.9-jumbo-7-Linux-x86-64.tar.gz
cd john-1.7.9-jumbo-7-Linux-x86-64/
ls
cd run
ls
john
./john
./zip2john test.zip > test.txt
./zip2john '/home/matheo/Desktop/test.zip' > test.txt
john --format=zip test.txt
./john --format=zip test.txt
./zip2john '/home/matheo/Desktop/WAM.zip' > wam1.txt
./john --format=zip wam1.txt
./john --format=zip text.txt
./john --format=zip test.txt
./john unshadow '/home/matheo/Desktop/WAM.zip' 
./john unshadow '/home/matheo/Desktop/john-1.7.9-jumbo-7-Linux-x86-64/run/wam1.txt' 
./j
./john umask 077
umask 077 wam1.txt 
unshadow wam1.txt 
./john unshadow wam1.txt 
./john-the-ripper.zip2john '/home/matheo/Desktop/WAM.zip' > wam2.hash
clear
cd..
cd ..
john
clear
john-the-ripper.zip2john WAM.zip > test.hash
john --format=zip test.hash 
set encoding=utf-8 test.hash
john --format=zip test.hash 
base64 -d test.hash 
base64 -d test.txt
john-the-ripper.zip2john WAM.zip > test.txt
base64 -d test.txt
john --format=zip test.txt
john base64 -d test.txt
base64 -d test.txt
base64 -d test.hash
base64 test.txt
john --format=zip test.txt
base64 -d test.hash
base64 test.txt > test1.txt
john --format=zip test1.txt
base64 -d test.txt > test1.txt
base64 man
man base64
clear
base64 -d <test.txt>
./john test.txt
john test.txt