The challenge provides a GIF file (CHALL.gif).
Inspecting the file with standard tools reveals a 12-frame
animation.
File Analysis: Running
identify -verbose CHALL.gif shows that the image uses an
8-color Global Color Table (3-bit).
Palette Anomaly: The palette contains redundant
entries for almost identical colors. Specifically, the dark blue color
of the water (11, 41, 71) is mapped to both index
1 and index 3.
Solution
In many steganography challenges involving GIFs or indexed PNGs,
redundant palette indices are used to hide data. I wrote a script to
isolate these two specific indices by extracting the frames and
visualizing the pixels.
1 2 3 4 5 6 7 8 9 10 11
import PIL.Image import numpy as np
# 'P' 代表 Palette(调色板)模式 img = PIL.Image.open('frame-0.gif').convert('P') data = np.array(img)
# Visualize index 1 as '#' and everything else as '.' for r inrange(100): row_str = "".join(["#"if x == 1else"."for x in data[r]]) print(row_str)
By printing the pixel grid of the water area and specifically looking
for the “hidden” index (Index 1 vs Index 3), a clear ASCII art
representation of the flag appeared: