CTFZONE Quals 2024 | Youtube Unlock & Youtube Unlock Revenge (GGC Exploit)
Difficulty : Easy to Medium
I solved these two tasks but I don't understand them very much, sorry if there are any inconsistencies.
Youtube Unlock :

Let's start by reading the code to understand the task.
/app/nginx/nginx.conf :
/app/dpi/dpi.py :
The nginx server hosts 2 servers each one under a service name, accessing the server normally will result to a redirect blocked.org.uk, what is needed is to use the Service name youtube.com to access the youtube video that will probably contain the flag.
So now checking the python code, we see that it acts as a proxy to our nginx server, it will block every request containing the string "youtube", but since it's case sensitive we can just bypass it by using "Youtube.com" instad of "youtube.com".
So now how do we do this ?
First we intercepted a request to the server and put in repeater.

Then you got edit target and change the check override SNI and enter Youtube.com
After it we follow the redirection and get to a youtube video

This video will contain the flag.
Pretty easy stuff
Youtube unlock | Revenge :

The second challenge is almost the same thing but with a little change to the files.
/app/nginx/nginx.conf :
/app/dpi/dpi.py :
The key difference is now file upload is allowed on the server and secondly the server will require a pair socket id. To ensure we get two sockets in our request, we can upload a blank file so it would queue the file transfer in the socket queue.
so again with the same.
and for our request.
we get the flag appended to the youtube link.
I didn't understand this challenge very well, it tried this and worked, what I wrote here is me trying to understand why it works, so sorry if I'm wrong in some points.
Last updated