Reconstruction

Category

Misc

Description

I received an interesting file that’s supposed to create a picture, but I’m not exactly sure how. Wanna give it a shot?

Solution

Attached is a text file containing a bunch of decimal values. Converting each value to a byte and writing the result to a file using the follownig script we get some binary data.

#!/usr/bin/env python3

with open('data.txt', 'r') as file:
    data = file.read().replace(';', '')[:-1]

    split = data.split(',')

    read_data = bytearray()
    for val in split:
        read_data.append(int(val))

    with open('out.dat', 'wb') as out:
         out.write(read_data)

Now we can open the raw data in GIMP, and after changing the width and height of the image we end up with the following.

“GIMP Settings”

After opening and rotating the image we get the readable flag.

“Flag”

flag{411_7h3_king5_h0rs3s_and_a11_th3 _kings_m3n}

n00bz

Home of the n00bz CTF team.


By n00bz, 2022-02-20