You are provided an apng (animate PNG) file. Find flag.


Prior work:

  • run apngdis on movie.apng to get all included pngs
  • sort files by size -> later files are bigger, but 2 files stand out from size: 438 and 580

  • manual inspection of bitplanes with -> confirmation in next plot
import cv2 as cv
import matplotlib.pyplot as plt
from bitstring import BitStream, BitArray

with open("", "wb") as f:
    for name in ["apngframe0438.png", "apngframe0580.png"]:
        img = cv.imread(name)
        blue_plane = img[:,:,0] & 1 # get LSB from 0'th channel (blue)
        plt.imshow(blue_plane);  # debug printing so that we know we have the correct files
        bits = "".join(blue_plane.flatten().astype(str))  # flatten 1920x1080 array of 0/1 to string
        by = BitArray(bin=bits).tobytes()  # bitstring to bytes

Results in a zip containing a video: