Skip to main content
  1. Posts/

THCon 2025 CTF - Scattered Socials, Steganography Writeup

·627 words·3 mins
Lacroix Raphaël (Chepycou)
Author
Lacroix Raphaël (Chepycou)
I’m Raphaël LACROIX, a French computer scientist developping various applications in my free time ranging from definitely useless to somewhat usefull. I also do quite a lot of Capture the flag and cybersecurity challenges.

What’s that about ?
#

The THCon (Toulouse Hacking convention), is a French cybersecurity conference that brings together hobbyists, professionals and researchers every year at Toulouse in April.

This edition (2024), I was one of the challenge creators and created a 6-part geosINT challenge, a few steganography challenges, as well as making all challenges lore-accurate.

Note : in the case the CTFd is not up anymore, if you did not participate, or you don’t remember the challenges you can take a look at https://ctftime.org/event/2660/tasks/ although not all of them may be listed sadly :/

Global explanation
#

In this challenge we learn that the XSS (the baddies) have managed to take control of the THCon’s socials ! We need to piece back images that they have posted on the THCon’s socials :

alt text

Precise Step by Step
#

So, this is socINT, we have two things to check first :

If we start with the obvious (this challenge is marked as steganography let’s remember !) we can list the official accounts :

alt text

You are of course wholeheartedly encouraged to subscribe to our socials if you want to support our work and/or come back next year 😊😊😊

If we look at The most obvious ones we get :

If you want to get into OSINT, I highly recommend creating sock puppets accounts for social networks such as Instagram, X or LinkedIn since all of these block non-registered users.

Let’s take a closer look : The thread is quite simple and contains two images :

alt text
alt text

In it, we learn that the XSS are playing games such as LOL or Marvel Rivals (great, probably not useful) but we also get two files. At this point the steganography part starts, and we can take a look at the files.

A few remarks :

  • These are noise files
  • The bigger file has dimensions 1000x1000 while the smaller is 100x100
  • the bigger file seems to contain 10x10 repetitions of some noise pattern
  • They seem to be created by a tool or something (hence their weird format when being analyzed)

One first though would be to xor the images together and since the bigger file seems to be a repetition of smaller noise, we can try xor-ing the bigger file with a repeated smaller file.

Here is a POC python script that does exactly that :

from PIL import Image

noise100x100 = Image.open("./noise.png")
pixel_noise100x100 = noise100x100.load()

im = Image.open("./hidden-image2.png")
pixel_image = im.load()

for i in range(im.size[0]): # for every pixel:
    for j in range(im.size[1]):
        r,g,b,_ = pixel_image[i,j]
        # r,g,b,_ = pixel_image[i,j] # Sometimes platforms (such as Signal) add a transparency
        r_x, g_x, b_x = pixel_noise100x100[i%100,j%100]
        # r_x, g_x, b_x, _ = pixel_noise100x100[i%100,j%100] # Sometimes platforms (such as Signal) add a transparency
        r = r ^ r_x
        g = g ^ g_x
        b = b ^ b_x
        pixel_image[i,j] = (r,g,b)

im.save("./out.png")

When we xor the image in the X thread with the smaller noise sample from the same thread we get :

alt text

We then use the picture we found in the LinkedIn post to get :

alt text

Resolutions
#

I saw people do a lot of crazy stuff with this like xor-ing the picture with itself but with the offset (so that the columns of noise cancel one another) or xor the two biggest noise images which gave them a superposition of both image, that was really fun 😅

Congratulations to the 6 that flagged it !

alt text