Hidden Message in a JPEG
Recover a message hidden in a JPEG by following a clue in its comment field.
1. Read the JPEG comment
Use the original img.jpg. The JPEG comment contains printable text encoded in Base64.
shell
file img.jpgOutput
comment: "c3RlZ2hpZGU6Y0VGNmVuZHZjbVE9" (excerpt)
2. Decode both fields
The first decode names the extraction tool. Only the text after the colon needs a second decode.
shell
clue=$(printf %s c3RlZ2hpZGU6Y0VGNmVuZHZjbVE9 | base64 -d)
printf '%s\n' "$clue"
pass=$(printf %s "${clue#*:}" | base64 -d)Output
steghide:cEF6endvcmQ=
3. Extract the message
Pass the decoded password to steghide. It writes the embedded message to standard output.
shell
steghide extract -sf img.jpg -p "$pass" -xf -Output
[REDACTED]
Extraction succeeded. The recovered flag is withheld.