What is CTFLearn?
CTFLearn is
a jeopardy-style CTF where points are received after solving the
problems and gaining the flag. The player with highest number of points
is on top of the leader-board. However, unlike other CTFs where a party
makes the question and players solve it, CTFLearn allows you to post
your own questions too.
What was the vulnerability?
The edit functionality in the application allows the problem creator to edit the problem. If an user tries to edit a problem that he doesn't own then he will be redirected to the view problem functionality. However, in the redirection HTTP response, the body of edit problem functionality is thrown. Hence, the edit problem functionality discloses the flag when accessed by user who didn't create the problem. I will go into details of this on the upcoming parts. This was an information disclosure vulnerability caused due to broken access control.
What was the impact?
The
flag was being disclosed which means that the players could get flags without solving problems. This impacted highly in platform confidentiality.
How to exploit the vulnerability by yourself?
1. Login to CTFLearn
2. Note the problem id of a problem
4. Replace the problem_id parameter in the following URL to the problem_id you noted in Step 2: https://CTFLEARN_V1_URL/view/index.php?action=show_edit&problem_id=1
5. Open the URL you created at Step 4 in a web browser, intercept the request in Burp Suite and send it to repeater
6. Find the request in repeater tab and send it. Do not follow redirection.
7. Find the flag in HTTP Response:
Conclusion
I reported this vulnerability and it has already been patched. However, you
can clone the old version by visiting LukeLaScala's Github repository on this link and try to exploit this vulnerability by yourself.




Comments
Post a Comment