Understanding the art of hiding in plain sight
Steganography is the practice of hiding secret data inside ordinary-looking files. Unlike encryption (which scrambles data so it's unreadable), steganography hides the fact that secret data exists at all.
Every digital image is made of pixels. Each pixel has color values (Red, Green, Blue) stored as numbers from 0-255.
Each color value (0-255) is stored in 8 bits (binary digits). The last bit is called the LSB.
Changing the LSB changes the color by only 1 unit (e.g., 156 → 157). This change is invisible to humans.
Example: Hiding a bit in a pixel
Color change: → Can you see the difference? Neither can anyone else.
By changing the LSB of thousands of pixels, we can hide entire files. 8 pixels = 1 byte of hidden data (since each pixel contributes 1 bit).
Attackers use steganography to:
What makes steganography different from encryption?
Master each detection tool step by step
"JPEG image data" - The file really IS a JPEG (magic bytes match)
"JFIF standard 1.01" - Specific format variant
Red flags: If it says "data" (unknown type), or the type doesn't match the extension (e.g., file.jpg is actually "Zip archive")
sudo apt install exiftool (Linux) or brew install exiftool (Mac)
strings suspicious.jpg - Find all readable text in the file
| tail -10 - Show only the last 10 lines (hidden data is usually appended at the END)
Why the end? Attackers append data after the image's EOF (end-of-file) marker. Image viewers stop reading at EOF, but the extra data is still there.
sudo apt install binwalk (Linux) or brew install binwalk (Mac)
DECIMAL column - Byte offset where the signature was found
0x0: JPEG image data - Normal, image starts at byte 0
0x24E5EB: Zip archive - A ZIP file found at byte 2,418,523! This is WAY past where the JPEG should end.
Verdict: Someone appended a ZIP archive after the JPEG's end. Classic "append steganography."
sudo apt install steghide
capacity: 45.2 KB - Maximum data this image could hide
embedded file "data.txt" - FOUND! Hidden file detected
encrypted: rijndael-128 - AES-128 encryption (need password to extract)
To extract: steghide extract -sf suspicious.jpg -p "password"
gem install zsteg (requires Ruby)
b1,rgb,lsb,xy - Bit 1, RGB channels, LSB, row-by-row scan
text: "SECRET:..." - Readable text = likely hidden message!
text: "\x7f#K@..." - Garbage = probably just noise, ignore
Key insight: Real hidden data produces readable text or valid file signatures. Random characters are false positives.
Apply your skills to a realistic scenario
SOC Analyst Investigation Brief
Your Data Loss Prevention (DLP) system flagged suspicious outbound traffic from an employee workstation. Large image files are being sent to personal email accounts.
Your mission: Analyze the flagged files and determine if data exfiltration is occurring.
Use the tools you learned to analyze the evidence files. Type commands or click the hints below.
Based on your analysis, answer these questions:
Q1: Does vacation_photo.jpg contain hidden data?
Q2: What technique was used on vacation_photo.jpg?
Q3: What hidden message did zsteg find in logo.png?