OpenCTF 2015 - magic_eye.dat (stego,forensics 50) Writeup

Hint:

magic_eye.dat 50 --- I'm pretty sure it's a schooner - magic_eye-e5a34090f3a6fe71248e30720132aaad

The file is a corrupted PNG file.

The solution is the following:

  1. Open the file using pypng.
  2. Extract the data from the IDAT chuck.
  3. Decompress the extracted data with gzip.zlib.
  4. Flag is at the end of the text.

The solution code is:

 1 #!/usr/bin/env python
 2 
 3 import png
 4 import gzip
 5 
 6 image = png.Reader("./magic_eye-e5a34090f3a6fe71248e30720132aaad")
 7 
 8 preamble = image.preamble()
 9 (t, d) = image.chunk()
10 
11 print(gzip.zlib.decompress(d))

Flag: some_flag_goes_here

Posted on Aug. 12, 2015, 9:06 a.m. by hackworth