tl;dr

  • Analysing layers for an image
  • PIL

Description

description

As the challenge name suggests, use GIMP we will proceed with it. After opening the image in GIMP, we can see another layer in the image. So on choosing/making that layer visible we can see the content in that layer.

layer 2

Initial Analysis

We can see the “Nothing here” layer present in the image but we cannot understand the contents in it. These type of files also gives an additional advantage that the contents present in them are visible in original file data in form hex or in normal text. So after using strings we can see that there is a hex data present in it.

strings output

Further Analysis

The hex data is a zip file, so copying that data and making a file out it, we got an another file present in it. And that file contains of only 1’s and 0’s. First thought that it would an esolang(spoon) but didn’t anything. So there are somany 1’s and 0’s we thought of making an image from it. But we need the size of the image. And the len(whole binary string) is exactly the square of 370, we will use it as the image height & width. Assuming 0 = (255, 255, 255) and 1 = (0, 0, 0).

So performed the operation in ipython and got an QR code. Here is the code;

from PIL import Image
f=open('data.txt','r').read()
t=[]
for i in range(len(f)):
    if(f[i]=='0'):
        t.append((255, 255, 255))
    else:
        t.append((0, 0, 0))
im = Image.new('RGB',(370,370))
im.putdata(t)
im.save('test.png')

On running the above code in python got a QR code and after scanning it got the flag.

Flag

Flag: d4rk{L0t5_0f_th1ng5_t0_d0_1n_th15_chAll@ng3}c0de

If you like my solution, please do share it. I’m availabe on Twitter: @NihithNihi