ASIS Finals 2016 p1ng Write up

Solved by sh!v

The task was challenging enough. At the first look we know its a png image. Looking a bit more deeply on the image using binwalk showed many .zlib compressed data.

$ binwalk p1ng

DECIMAL         HEXADECIMAL       DESCRIPTION
——————————————————————
0                          0x0                             PNG image, 180 x 76, 8-bit/color RGBA, non-interlaced
99                        0x63                           Zlib compressed data, best compression
4987                   0x137B                       Zlib compressed data, best compression
.

.

.
146983               0x23E27                    Zlib compressed data, best compression

On googling further with these data we found out that its a special type of png, animated png (.apng). This made me look further into the structure of the apng arranged.

Using Tweakpng tool the structure of the image was known. But the the structure had many faults. The 23 png frames were not in sequence, the number of frames was given as 1 but where as it should be 23. Then, the pixel sizes were wrong for many frames it should be  around 180 x 76. Also the offset of x should be 0. The dispose should be bkgd for all.

screenshot-from-2016-09-12-14-34-11

After making the necessary changes, save this file. Give this file as input for apng disassembler tool. It will give 23 images which contains the different parts of the flag.

Flag:

 ASIS{As_l0n9_4s_CTF_3x1sts_th3r3_w1ll_b3_ASIS_4nd_4s_l0n9_4s_ASIS_3x1sts_th3r3_w1ll_b3_PNG!} 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: