This lab challenges you to combine password cracking, steganography, and open source intelligence techniques to uncover a hidden treasure.
Welcome to the lab that challenges you to combine password cracking, steganography, and open source intelligence techniques to uncover a hidden treasure. In this lab, you will extract a password-protected ZIP file, decode a secret message embedded in an image, and analyze image metadata to locate the treasure.──────────────────────────────
The first challenge involves an old map secured inside a password-protected ZIP file (treasure.zip) located in the root directory. Your mission is to crack the ZIP file’s password and extract its content. Once extracted, save the discovered password along with the file q1.txt in the root directory.Begin by converting the ZIP file into a hash format that John the Ripper can process using the zip2john tool:
Copy
Ask AI
kali-host ➜ zip2john treasure.zip > treasure.txt
Now, use John the Ripper to crack the password:
Copy
Ask AI
kali-host ➜ john treasure.txt
You should see output similar to the example below, indicating that the password has been successfully cracked:
Copy
Ask AI
Using default input encoding: UTF-8Loaded 1 password hash (PKZIP [32/64])Will run 16 OpenMP threadsProceeding with single, rules:SinglePress 'q' or Ctrl+c to abort, almost any other key for statusAlmost done: Processing the remaining buffered candidate passwords, if any.Proceeding with wordlist:/usr/share/john/password.lstProceeding with incremental:ASCIIadmin1231g 0:00:00:034 DONE 3/3 (2023-07-02 16:12) 0.029048g/s 11579Kc/s 11579Kc/s adongutt..adr14777Use the "--show" option to display all of the cracked passwords reliablySession completed.
Once the password (admin123) is retrieved, unzip the file by providing the password when prompted:
Step 2: Uncover the Hidden Secret Message Using Steganography
The next challenge requires you to extract a secret message hidden within an image file (DSCN0042.jpg). To achieve this, we will crack the passphrase used for embedding the message with the help of the stegcracker tool and a popular wordlist (rockyou.txt).Start by running stegcracker to obtain the passphrase:
Copy
Ask AI
kali-host ➜ stegcracker DSCN0042.jpg /usr/share/wordlists/rockyou.txtStepCracker 2.1.0 - (https://github.com/Paradoxis/StegCracker)Copyright (c) 2020 - Luke Paris (Paradoxis)StepCracker has been retired following the release of StegSeek, whichwill blast through the rockyou.txt wordlist within 1.9 seconds as opposedto StegCracker which takes ~5 hours.Counting lines in wordlist...Attacking file 'DSCN0042.jpg' with wordlist '/usr/share/wordlists/rockyou.txt'..Successfully cracked file with password: password123Tried 1806 passwordsYour file has been written to: DSCN0042.jpg.outpassword123
With the revealed passphrase (password123), use the steghide tool to extract the hidden data from the image:
Copy
Ask AI
kali-host ➜ steghide extract -sf DSCN0042.jpgEnter passphrase: password123wrote extracted data to "message.txt".
Finally, review the hidden message by displaying the contents of the extracted file:
Copy
Ask AI
kali-host ➜ cat message.txtThe key is hidden under the third brick on the left at
Use the extracted message as the clue for locating the treasure.
Step 3: Analyze Image Metadata to Reveal the Treasure Location
The final step involves analyzing the metadata of an image (e.g., clue.jpg) to determine the treasure’s exact location. Use exiftool or a similar metadata extraction utility on the image file to extract GPS coordinates and other relevant details.Below is a sample output from a metadata extraction using exiftool:
Copy
Ask AI
Gain Control : NoneContrast : NormalSaturation : NormalSharpness : NormalSubject Distance Range : UnknownGPS Version ID : 2.3.0.0GPS Latitude Ref : NorthGPS Longitude Ref : EastGPS Altitude Ref : Above Sea LevelGPS Time Stamp : 14:57:41.37ZGPS Satellites : 04GPS Img Direction Ref : Unknown ()GPS Map Datum : WGS-84GPS Date Stamp : 2008:10:23Compression : JPEG (old-style)Thumbnail Offset : 4472Thumbnail Length : 6472XMP Toolkit : Image::ExifTool 12.76Rating Percent : Image Width : 640Image Height : 480Encoding Process : Baseline DCT, Huffman codingBits Per Sample : 8Color Components : YCbCr:2:2 (2 1)Aperture : 4.4Image Size : 0.387Megapixels : 0.307Scale Factor To 35 mm Equivalent: 1.0Shutter Speed : Thumbnail Image : (Binary data 6474 bytes, use -b option to extract)GPS Date/Time : 2008:10:23 14:57:41.37ZGPS Latitude : 43 deg 27' 52.04" NGPS Longitude : 11 deg 52' 53.32" ECircle Of Confusion : 0.006 mmField Of View : Focal Length : 15.0 mm (35 mm equivalent: 70.0 mm)GPS Position : 43 deg 27' 52.04" N, 11 deg 52' 53.32" EHyperfocal Distance : 7.94 mLight Value : 11.6
This GPS data and the additional metadata will guide you directly to the treasure location.
Always handle sensitive data with caution and ensure you have proper authorization before extracting or analyzing image metadata.