Blackhat Mea 2023 ctf writeup
We participated this ctf as Chasing X fr334aks X L3v3l 6 and managed to get pos 178. It wasn’t easy. I Managed to solve the web challenge below.
Authy
For this challenge we are provided with an api endpoint and challenge source
According to the LoginController.go file we can create a user and login , the user password length should not be less than 6
The vulnerability occurs when the user passowrd value in the registration function is not the one being compared in the login function. To get the flag we have to login with a password of length < 6.
The vulnerable code:
|
|
With my vast ctf experience i could tell what i needed to do :)
THe logic is :
|
|
So i sent the request for registration with the password as two smileys and login with the same password. In the backend the register will see a length of 8 and login will see a length of 2 thus solving the challenge
|
|
The ctf was great and see you in the next one