HackVent 2023 - [HV23.11] Santa's Pie

Posted on Jan 1, 2024

Difficulty: Medium

Category: Forensic

Author: coderion

Santa baked you a pie with hidden ingredients!

Zsteg doesn’t reveal anything of interest, however when looking at the numerical red values per pixel, we get the following:

3 | 1 | 4 | 1 | 5 | 9 | 2 | 6 | 5 | 3 | ...

Looks a lot like pi… The second pixel is just image data for the pie image and the third pixel seems like it contains random values.

When we XOR those two pixel values, we get the flag hidden inbetween some rickrolls:

#!/usr/bin/python3
from PIL import Image

input = Image.open('pi.png')
output = ""

for row in range(input.size[0]):
    for col in range(input.size[1]):
        pixel = input.getpixel((row, col))
        output += chr(pixel[2] ^ pixel[0])

print(output)

Flag: HV23{pi_1s_n0t_r4nd0m}