Flag Hunt! - Steganography
Task
Hunt your way through the challenge and Capture The hidden Flag!!!
Flag Format: KCTF{S0m3th1ng_h3re}
Solution
We get the following file:
szczygielka@hacks$ file attch1.zip
attch1.zip: Zip archive data, at least v1.0 to extract, compression method=storeWhen trying to unpack the archive, we are asked to enter a password that we do not know:
szczygielka@hacks$ unzip attch1.zip
Archive: attch1.zip
creating: challenge/
[attch1.zip] challenge/img182.jpg password:So we can try to brute force the password using the fcrackzip tool and rockyou.txt wordlist:
szczygielka@hacks$ fcrackzip -u -D -p /usr/share/wordlists/rockyou.txt attch1.zip
PASSWORD FOUND!!!!: pw == zippo123The password has been cracked. So we can unpack the contents of the archive. The unpacked directory contains 1004 items:
szczygielka@hacks$ ls | wc -l
1004All files in the extracted directory look the same at first glance:

Let's try to identify if some files are different from the others. So calculate the MD5 hashes for all files in the entire directory:
We can see that the img725.jpg file has a different hash than the other images:

It turns out that this directory also contains files in other formats. These are: key.wav, n0t3.txt and nooope_not_here_gotta_try_harder.txt:

Let's display the contents of the files n0t3.txt and nooope_not_here_gotta_try_harder.txt:
Apparently, the flag is here somewhere and we should keep looking for it. Let's analyze what's inside the key.wav file. After listening to the recording, we can assume thekey.wav file contains a message encoded using Morse code. We can try to decode it using this website. After decoding the file contents, we receive the following message:
Let's go back to the img725.jpg file. Visually, it does not seem to differ from other images. So we can use the steghide tool to check if another file is embedded in this image:
After entering morsecodetotherescue!! as the password, we can see that the flag.txt file is hidden in the img725.jpg file. Let's extract it using the following command:
Let's display the contents of the flag.txt file using the cat command:
Flag:
Last updated