Drill Pack 08 — Steganography & Crypto¶
Prereq: generate the artifacts first —
../challenge-lab/setup-challenges.shdrops everything under~/ceh-practical-challenges/. Then setC=~/ceh-practical-challengesand keep../challenge-playbooks.mdopen. These are the challenge-lab stego/crypto artifacts turned into 10 timed, Practical-style drills — detection → extraction → decode → decrypt, easy to hard. Concepts: Module 20 — Cryptography. Timer on; expand the solution only when solved or stuck.
1. Triage: which of the four stego/ images hide data — and how? ⏱️ 3 min¶
Fingerprint vacation.jpg, cat.jpg, beach.jpg, carrier.jpg before extracting. Name the method used in each.
Solution
file $C/stego/*.jpg # oversized/appended?
strings $C/stego/vacation.jpg | grep -i CEH # plaintext in the bytes?
exiftool $C/stego/carrier.jpg | grep -i comment # metadata fields
binwalk $C/stego/cat.jpg # appended files (scan only)
steghide info $C/stego/beach.jpg # "embedded data" prompt?
vacation.jpg → cleartext flag (strings)
carrier.jpg → flag in EXIF Comment (exiftool)
cat.jpg → Zip archive after JPEG (binwalk / appended)
beach.jpg → steghide embedded data (needs a passphrase)
2. Find the flag hidden in plain sight in vacation.jpg ⏱️ 3 min¶
Solution
strings $C/stego/vacation.jpg | grep CEH
3. Read the flag hidden in carrier.jpg's metadata ⏱️ 3 min¶
Solution
exiftool $C/stego/carrier.jpg | grep -i comment
# or dump every tag: exiftool -a -u -g1 $C/stego/carrier.jpg
Comment : CEH{hidden_in_exif_metadata}
4. Carve the file appended to cat.jpg ⏱️ 4 min¶
A valid JPEG with a whole ZIP glued to the end — recover the flag inside.
Solution
binwalk $C/stego/cat.jpg # scan: JPEG image data ... + Zip archive
binwalk -e $C/stego/cat.jpg # extract embedded files
find _cat.jpg.extracted -type f -name '*.txt' -exec cat {} +
0 0x0 JPEG image data, JFIF standard
... ... Zip archive data, ... .hidden.txt
CEH{carved_from_the_image}
5. Extract the steghide-embedded flag from beach.jpg (pw hacktheplanet) ⏱️ 4 min¶
Solution
steghide info $C/stego/beach.jpg # confirms embedded data
steghide extract -sf $C/stego/beach.jpg -p hacktheplanet -xf flag.txt
cat flag.txt
wrote extracted data to "flag.txt".
CEH{steghide_embedded_flag}
6. Decode these three strings ⏱️ 3 min¶
aGVsbG8=, 68656c6c6f, uryyb — what does each decode to, and which transform is it?
Solution
Recognize the shape, then reverse it:echo 'aGVsbG8=' | base64 -d # ends in '=', A–Za–z0–9 -> Base64
echo '68656c6c6f' | xxd -r -p # only 0–9a–f, even len -> hex
echo 'uryyb' | tr 'A-Za-z' 'N-ZA-Mn-za-m' # shifted text -> ROT13
7. Decode crypto/mystery.txt to the flag ⏱️ 5 min¶
Not encryption — encoding, stacked three deep. Peel it in reverse.
Solution
The stack is `base64( rot13( hex(flag) ) )`, so undo it outside-in: Base64 → ROT13 → hex.cat $C/crypto/mystery.txt | base64 -d | tr 'A-Za-z' 'N-ZA-Mn-za-m' | xxd -r -p
8. Decrypt crypto/secret.aes.enc (key s3cr3tkey) ⏱️ 4 min¶
Real symmetric crypto: AES-256-CBC, key-derived with PBKDF2 (see crypto/README.txt).
Solution
openssl enc -d -aes-256-cbc -pbkdf2 -k s3cr3tkey -in $C/crypto/secret.aes.enc
9. Decrypt crypto/message.gpg (pw openme) ⏱️ 4 min¶
GPG symmetric (password-based, not a keypair).
Solution
gpg --batch --passphrase openme -d $C/crypto/message.gpg
gpg: AES256.CFB encrypted data
CEH{gpg_symmetric_flag}
10. Identify these hashes and name their hashcat modes ⏱️ 3 min¶
Identify 5f4dcc3b5aa765d61d8327deb882cf99, a $6$... string, and a $2b$... string.
Solution
`hashid` recognizes the format; `-m` adds the hashcat mode:hashid -m '5f4dcc3b5aa765d61d8327deb882cf99' # 32 hex -> MD5 (-m 0)
hashid '$6$ceh12345$...' # $6$ -> sha512crypt (-m 1800)
hashid '$2b$10$...' # $2b$ -> bcrypt (-m 3200)
[+] MD5
[+] SHA-512 Crypt (Hashcat Mode: 1800)
[+] bcrypt (Hashcat Mode: 3200)
Score yourself¶
Mark each: ✅ solved cold under time · ⚠️ slow or needed a peek · ❌ stuck.
| # | Drill | Tool / skill | Flag / answer | Score |
|---|---|---|---|---|
| 1 | Triage the four images | file · strings · exiftool · binwalk | strings/EXIF/zip/steghide | |
| 2 | vacation.jpg | strings | CEH{plain_strings_in_the_file} |
|
| 3 | carrier.jpg | exiftool | CEH{hidden_in_exif_metadata} |
|
| 4 | cat.jpg | binwalk -e / foremost | CEH{carved_from_the_image} |
|
| 5 | beach.jpg | steghide (hacktheplanet) |
CEH{steghide_embedded_flag} |
|
| 6 | Single-layer decode | base64 / xxd / tr | hello ×3 |
|
| 7 | mystery.txt | base64 → rot13 → hex | CEH{layered_encoding_is_not_encryption} |
|
| 8 | secret.aes.enc | openssl (s3cr3tkey) |
CEH{aes_with_a_known_key} |
|
| 9 | message.gpg | gpg (openme) |
CEH{gpg_symmetric_flag} |
|
| 10 | Identify hashes | hashid | MD5 / sha512crypt / bcrypt |
Any ⚠️/❌ → re-run setup-challenges.sh for a fresh copy and drill it again under the timer. When all ✅, move to Pack 09.
Sources¶
- CyberChef (stacked encoding/crypto, Magic, Extract EXIF/Files) — https://gchq.github.io/CyberChef/
- steghide — http://steghide.sourceforge.net/ · stegseek (cracker) — https://github.com/RickdeJager/stegseek
- binwalk (file carving) — https://github.com/ReFirmLabs/binwalk · foremost — https://foremost.sourceforge.net/
- exiftool — https://exiftool.org/ · OpenSSL — https://www.openssl.org/ · GnuPG — https://gnupg.org/ · hashID — https://github.com/psypanda/hashID