Challenge
Steganography
关卡页只给出 Download the image Here,下载链接指向一个
ZIP 文件:
https://www.hackthissite.org/missions/stego/lvl/stego7.zip。
The image contains the password in one of its Photoshop layers.
Solution
Analysis
先下载并检查外层 ZIP:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| $ curl -sL -b "$HTS_COOKIE" \ -o stego7.zip \ 'https://www.hackthissite.org/missions/stego/lvl/stego7.zip' $ unzip -l stego7.zip Archive: stego7.zip Length Date Time Name --------- ---------- ----- ---- 69392 2008-04-27 01:36 stego7.tif --------- ---------- ----- ---- 69392 1 file $ unzip -t stego7.zip testing: stego7.tif OK No errors detected in compressed data of stego7.zip. $ unzip -o stego7.zip
|
ZIP 没有加密,里面只有一个 stego7.tif。外层 ZIP
只是把真正的载体再包了一层,直接对 ZIP
本身做图片隐写分析不会得到结果。
Step 1: 确认 TIFF 的图层信息
1 2 3 4
| $ file stego7.tif stego7.tif: TIFF image data, little-endian, direntries=22, width=175, \ height=36, bps=278, compression=none, PhotometricInterpretation=RGB, \ orientation=upper-left
|
普通 TIFF 信息只能看到一张 175×36 的 RGB
图;tiffinfo 也只列出一个正常的 TIFF directory。继续查看
Photoshop 私有数据块:
1 2 3 4 5 6 7 8 9 10 11
| $ exiftool -a -G1 -s stego7.tif | grep -E \ 'Layer|Software|ImageWidth|ImageHeight|BitsPerSample|Compression' [IFD0] ImageWidth : 175 [IFD0] ImageHeight : 36 [IFD0] BitsPerSample : 8 8 8 [IFD0] Compression : Uncompressed [IFD0] Software : Adobe Photoshop CS2 Windows [Photoshop] LayerCount : 3 [Photoshop] LayerRectangles : 0 0 36 175, 9 0 36 175, 0 0 35 175 [Photoshop] LayerNames : Layer 2, Layer 0, Layer 1 [Photoshop] LayerVisible : Yes, Yes, Yes
|
关键点是:图层不在普通 TIFF directory 中,而是存放在 Photoshop 的
Image Resource
数据里。普通图片查看器只显示合成结果,密码所在的图层/alpha
通道会被背景干扰。
Step 2: 导出图层的 alpha 通道
ImageMagick 会把 Photoshop 图层作为额外的 TIFF scene 导出。逐个取
alpha 通道并放大:
1 2 3 4
| $ for n in 0 1 2 3; do convert "stego7.tif[$n]" -alpha extract -resize 1000% \ "alpha-$n.png" done
|
前几个 scene 主要是合成图或空白/干扰内容;最后一个 alpha
图中出现清晰的点阵字形。可以直接目视读取
Key points
这关的载荷不在 ZIP 的压缩数据、TIFF 的普通像素或常规 EXIF
字段里,而在 Photoshop 保存的图层数据中。排查顺序应是:
- 解开外层 ZIP,确认真正的载体;
- 用
exiftool 检查 Photoshop 图层元数据;
- 导出各图层及其 alpha 通道;
4aH5CEta