In the depths of the ocean, fish in general, are hard to come by due to global warming. However, I just found a red herring, with a weird brusied QR code attached on its skin? I don't assume it could be of use to you?
This challenge had a lot of tricks. We can use binwalk to extract any hidden files embedded in the jpg file. In this case it was 4 zip files.
┌──(tev㉿kali)-[~LNC]└─$binwalk-eqrcode.jpgDECIMALHEXADECIMALDESCRIPTION--------------------------------------------------------------------------------3640x16CCopyrightstring:"Copyright (c) 1998 Hewlett-Packard Company"1521960x25284Ziparchivedata,atleastv2.0toextract,name:red_herrings/red_herring_1/152253 0x252BD Zip archive data, at least v2.0 to extract, compressed size: 104618, uncompressed size: 104716, name: red_herrings/red_herring_1/red_herring.jpeg
2569440x3EBB0Ziparchivedata,atleastv2.0toextract,name:red_herrings/red_herring_2/257001 0x3EBE9 Zip archive data, at least v2.0 to extract, compressed size: 5177, uncompressed size: 5386, name: red_herrings/red_herring_2/red_herring.jpeg
2622510x4006BZiparchivedata,atleastv2.0toextract,name:red_herrings/red_herring_3/262308 0x400A4 Zip archive data, at least v2.0 to extract, compressed size: 4915, uncompressed size: 5107, name: red_herrings/red_herring_3/red_herring.jpeg
2672960x41420Ziparchivedata,atleastv2.0toextract,name:red_herrings/red_herring_4/267353 0x41459 Zip archive data, at least v2.0 to extract, compressed size: 2625603, uncompressed size: 2625603, name: red_herrings/red_herring_4/red_herring.zip
28930280x2C24E4Ziparchivedata,atleastv2.0toextract,name:red_herrings/red_herring_5/2893085 0x2C251D Zip archive data, at least v2.0 to extract, compressed size: 10501, uncompressed size: 13304, name: red_herrings/red_herring_5/red_herring.jpeg
29044680x2C5194EndofZiparchive,footerlength:22
At this point, we know that 1 out of the 10000 fake flags, will give us the real flag. We can use a script to filter out all the fake flags.txt.
CREDS: Syn Kit (teammate) for the script!
#!/bin/bash# Define the output fileoutput_file="out.txt"# Iterate over directories and read flag.txt filesfor dir in*/; doif [ -f"$dir/flag.txt" ]; thenecho-n"$dir">>"$output_file"cat"$dir/flag.txt">>"$output_file"echo"">>"$output_file"fidoneecho"All flag.txt contents have been written to $output_file."