はまやんはまやんはまやん

hamayanhamayan's blog

Matryoshka doll [picoCTF 2021]

調査

binwalkで何やら気になる感じになってる。

$ binwalk -e dolls.jpg  
  
DECIMAL       HEXADECIMAL     DESCRIPTION  
--------------------------------------------------------------------------------  
0             0x0             PNG image, 594 x 1104, 8-bit/color RGBA, non-interlaced  
3226          0xC9A           TIFF image data, big-endian, offset of first image directory: 8  
272492        0x4286C         Zip archive data, at least v2.0 to extract, compressed size: 378952, uncompressed size: 383937, name: base_images/2_c.jpg  
651610        0x9F15A         End of Zip archive, footer length: 22  

出てきたjpgに対して改めてbinwalkする

$ binwalk -e 2_c.jpg  
  
DECIMAL       HEXADECIMAL     DESCRIPTION  
--------------------------------------------------------------------------------  
0             0x0             PNG image, 526 x 1106, 8-bit/color RGBA, non-interlaced  
3226          0xC9A           TIFF image data, big-endian, offset of first image directory: 8  
187707        0x2DD3B         Zip archive data, at least v2.0 to extract, compressed size: 196042, uncompressed size: 201444, name: base_images/3_c.jpg  
383804        0x5DB3C         End of Zip archive, footer length: 22  
383915        0x5DBAB         End of Zip archive, footer length: 22  

ok.マトリョーシカね。
この要領でどんどん潜っていくと最終的にflag.txtというファイルになり、フラグが書いてある