🤐Zippy
Here, we are given a zip file
zippy.zipWe can unzip the zip file using
unzipWe get 54 other zip files which are named
chunnk0.zip-chunk54.zipand a hint :if you want to find the flag, this hint may be useful: the text files within each zip consist of only "printable" ASCII characters

We could try running
stringson zippy.zip to find any printable characters

Looks like gibberish No luck there
We can try and open a chunk
We see a
data.txtfile in itWhen we try to open it, it asks for a password

We can use
fcrackziporjohnto tey and brute-force the password, but to no luckThen I noticed that all the
data.txtin every chunk zip is exactly 4 bites i.e 32bits

This got me thinking about CRC32
Zip files have CRC values, the checksum of the plaintext of contents (even if they are encrypted). If the file size is short enough (around 4 bytes because CRC32 is 32 bits), you can see the content of the encrypted zip file without the password.
There is a good script by kmyk which can extract the contents using CRC32. You can find the GitHub repo here
Cloning the script from github

We can run it for all the chunks at ones by using
python3 zip-crc-cracker/crack.py chunk*

We can get the data from the chunks

Seems like base64
We need to join all the data to get a string
For that we need to copy it into a file
ascii.txt. You can used any text editor.I am suing sublime

Save it
Now we need to extract only the base64 part and join them.
Here is the one-liner for that
sed -e 's!chunk!!':Removes the wordchunkfrom all the lines so that we can sort them properlysort -n:Then sorts them numericallysed -n "s/^.*'\(.*\)'.*$/\1/ p": extracts the content only within the single quotestr -d '\n': Joins all the text into a single lineAfter running the one-liner we get
UEsDBBQDAQAAAJFy1kgWujyNLwAAACMAAAAIAAAAZmxhZy50eHT/xhoeSnjMRLuArw2FXUAIWn8UQblChs4AF1dAnT4nB5hs2SkR4fTfZZRB56Bp/FBLAQI/AxQDAQAAAJFy1kgWujyNLwAAACMAAAAIAAAAAAAAAAAAIIC0gQAAAABmbGFnLnR4dFBLBQYAAAAAAQABADYAAABVAAAAAAA=Base64 decoding it and saving it to a file
flag.txt
When we run file command on
flag.txt, we see that it is a zip file

Renaming the file to
flag.zipand trying to unzip it.

We are again asked for a password
We can use
johnthis time to crack it.First, we need to extract the zip has and save it to
hash.txtusingzip2john

Now we can run
johnwithhash.txt

We get the password as
z1PUsing this we can unzip
flag.zipand we getflag.txtReading it will give us the flag

Last updated