SEKAI CTF 2024 | Intruder (Web, Linq Injection)

Difficulty : Easy

Reversing the code :

A peculiar challenge that I managed to solve in the Sekai CTF 2024.

We start by downloading the files, and we get a bunch of DLL files with a dockerfile and a docker-compose file, we only need to check the dockerfile to see that it's an asp.net application.

We can reverse the CRUD.dll using dnSpy.

when reversing the book controller we come across this piece of code :

this signifies that the Add book function is just a decoy and that our objective is to do a Linq injection in the search method.

While searching the internet you can come across the CVE-2023-32571, which is an RCE exploit to linq that we will exploit.

I used this POC to create my payload :

Exploitation :

Since the challenge is disconnected from the internet we couldn't run a rev shell or send the flag via http, one way to exploit it is to copy the flag to the /app/src/wwwroot/img/covers, this so we can access it.

we copy that payload into the search bar and we get our flag by accessing http://<CTF-Instance>/img/covers/flag.txt

Last updated