CTF Micro Storage

The password

I have a zip file but I don’t have the password, I have to find it.

The password is the numbers in the next file, so the password for 37366 is 5900.
I can extract the password like this:

Loop to extract

I will create a loop too extract the file, because there is a .zip into a .zip, I can’t do it manualy.

1
2
3
4
5
6
7
8
9
#!/bin/bash
current_file="37366.zip"
while true;
do
password=$(strings $current_file |tail -1 | cut -d '.' -f1)
unzip -P $password $current_file
current_file=$password".zip"
echo "$current_file" >> track.txt
done

In the file track.txt I have the list of the names of the files, I’m using this file to know wish file is the last one.
The last file is 6969.zip and there is a file called DoNotTouch.zip.
I don’t have the password for this one, I have to crack it.
I have to put rockyou in my directory.

1
fcrackzip -u -D -p rockyou.txt 6969.zip

Output:

1
PASSWORD FOUND!!!!: pw == letmeinplease

Open the last zip file

1
unzip -P letmeinplease 6969.zip

Now we have the file DoNotTouch.

1
file DoNotTouch

Output:

1
DoNotTouch: SQLite 3.x database, last written using SQLite version 3021000, page size 1024, file counter 26, database pages 864, cookie 0x22, schema 1, UTF-8, version-valid-for 26

SQL file, I will use strings :).

1
strings DoNotTouch|grep HTB

Output:

1
1969-01-01 00:00:002069-01-01 00:00:00Chillin with SatanHellHTB{z1p_and_unz1p_ma_bruddahs}