HTB: Da Vinci Challenge
Da Vinci - HackTheBox Challenge Writeup
Challenge Information
| Field | Value |
|---|---|
| Challenge Name | Da Vinci |
| Category | Misc |
| Difficulty | Easy |
| Author | d3vn0mi |
Description
This challenge asks you to find a secret hidden inside pictures and learn the truth about Mona Lisa. The initial download contains multiple image files that require careful analysis and extraction techniques to reveal the flag.
Solution Overview
This challenge combines multiple steganography and cryptography techniques layered together. The solution path involves:
- Extracting a hidden ZIP archive from the main image
- Cracking password-protected archives with bruteforce
- Using stegseek to recover hidden steganographic data
- Decoding multiple layers of base64 encoding
Key Steps
Step 1: Reconnaissance and File Analysis
Start by examining the challenge files:
cd /path/to/challengels -launzip -l a12c7398-de4c-4b50-8b69-a244187bThe challenge contains several image files including monalisa.jpg, Plans.jpg, and a cryptic hint image Thepassword_is_the_small_name_of_the_actor_named_Hanks.jpg.
Step 2: Extract the Hint and Identify the Password
The hint image tells us the password is the “small name of the actor named Hanks.” Tom Hanks’ nickname is TOM, but the actual password is discovered through bruteforce attempts.
# Test steghide extraction on hint imagesteghide extract -sf Thepassword_is_the_small_name_of_the_actor_named_Hanks.jpgStep 3: Extract Hidden ZIP from Main Image
The monalisa.jpg file contains an embedded ZIP archive:
# Copy and extract the imagecp monalisa.jpg /tmp/monaex/cd /tmp/monaex/
# Extract the embedded ZIPunzip -o monalisa.jpgunzip -l famous.zipStep 4: Crack the Password-Protected Archive
Use 7z with bruteforce attempts. After testing various Leonardo da Vinci-related keywords:
# Create wordlist with related termscat > wordlist.txt << 'EOF'leonardodavinciDaVincimonalisaMonaLisaflorenceitalytomTOMhanksEOF
# Extract using 7z with password7z x -p"leonardo" -y -o/tmp/monaex/final famous.zipThe password is leonardo. This extracts Mona.jpg.
Step 5: Extract Steganographic Data with StegSeek
Use StegSeek to find and extract hidden data from the extracted image:
cd /tmp/monaex/final
# StegSeek bruteforce with wordliststegseek Mona.jpg /path/to/wordlist.txtOutput:
[i] Found passphrase: "Guernica"[i] Original filename: "key".[i] Extracting to "Mona.jpg.out".Step 6: Decode Multiple Layers of Base64
The extracted file contains base64-encoded data with multiple layers:
# Read the extracted filecat Mona.jpg.out# Output: VTBaU1EyVXdNSGRpYTBKbVZFUkdObEZHT0doak1UbEZUVEJDUldaUlBUMD0=
# Decode layer 1echo "VTBaU1EyVXdNSGRpYTBKbVZFUkdObEZHT0doak1UbEZUVEJDUldaUlBUMD0=" | base64 -d# Output: U0ZSQ2UwMHdia0JmVERGNlFGOGhjMTlFTTBCRWZRPT0=
# Decode layer 2echo "U0ZSQ2UwMHdia0JmVERGNlFGOGhjMTlFTTBCRWZRPT0=" | base64 -d# Output: SFRCe00wbkBfTDF6QF8hc19EM0@EfQ==
# Decode layer 3echo "SFRCe00wbkBfTDF6QF8hc19EM0BEfQ==" | base64 -d# Output: HTB{REDACTED}Automated decoding loop:
D=$(cat Mona.jpg.out)for i in 1 2 3 4 5; do D=$(echo "$D" | base64 -d 2>/dev/null) echo "layer $i: $D"doneTools Used
- unzip - Extract and list ZIP archives
- 7z - Extract password-protected archives with bruteforce capability
- stegseek - Fast steganography detection and extraction from JPEG files
- base64 - Decode base64-encoded data
- exiftool - Examine image metadata
- binwalk - Analyze binary files for embedded data
Key Learnings
-
Layered Steganography: This challenge demonstrates how steganographic hiding techniques can be stacked—a ZIP within an image, within an archive, with multiple encoding layers.
-
Password Hints: Thematic hints (Mona Lisa, da Vinci, Guernica, Leonardo) point to art history knowledge. The password “leonardo” references Leonardo da Vinci, the artist of the Mona Lisa.
-
StegSeek is Efficient: StegSeek’s bruteforce capability significantly outperforms manual steghide attempts and is essential for time-efficient CTF challenges.
-
Multiple Encoding Layers: Base64 encoding applied repeatedly requires iterative decoding. Writing a loop to automatically decode multiple layers saves time and errors.
-
File Analysis Flow: Proper reconnaissance (checking file types, examining images) before attempting extraction prevents wasted effort and guides the solution path.
Flag
HTB{REDACTED}