Home CTFs | 404CTF_2023 | Reverse | L’inspiration en images
Post
Cancel

CTFs | 404CTF_2023 | Reverse | L’inspiration en images

L’inspiration en images

image

In this challenge, we are given this executable. We need to recover the RGBA float values of the painting. But when we look at the paining, either by extracting the image using binwalk or running the program, we see only a black background:

image

So I started looking at the code for something referring to the color and found that:

image

This is the only function that contains the word color. So I looked at this function and found that the glad_glClearColor function is part of the OpenGL library and is used to specify the clear color for the color buffer. When you render graphics using OpenGL, the color buffer holds the pixel data for the current frame being displayed. The glClearColor function sets the color value that will be used to clear the color buffer before rendering the next frame.

So I decoded the hexadecimal values 0x3e4ccccd,0x3e99999a,0x3e99999a,0x3f800000 using the online tool Scadacore and found the float values:

image

So the flag is 404CTF{vect4(0.2,0.3,0.3,1.0)}

This post is licensed under CC BY 4.0 by the author.