Welcome back! You might remember that in the last blog I talked about 7 bugs in a small part of a website — this blog is about that.
And sorry, I don’t have any proof images this time (as always), because the platform com-olho blocked me. Yeah — they just blocked me. All my triage report, upcoming payment was just gone. They don’t respond to emails at all. So be careful if you’re hunting on comolho. Yes, I’m taking the name — because honestly, what worse can they do now?
Let me clear a one things. All the 7 bugs covered in these blogs were on their own platform, comolho, and all of them were successfully fixed.
Let’s talk about the website in sort. The platform has a CTF program where you can submit flags and earn some points according to level of CTF. You can also create your own CTF and earn points if it’s good enough, they will upload it to their program.
So when we submit a correct flag, we get points and the submit flag option is removed. The bug is that only the input is removed — there is no server-side validation.
POST /api/ctf/submit_answer/128 using Burp.I know you might be thinking why this is separated from point 1 — it’s because I found this later.
Please read this blog first for better understanding of how creating and submitting your own CTF works because all the below bugs are related this.
When you submit your own CTF for review, you normally cannot revert it back to draft — you can only edit the CTF.
POST /ctf/123/save_as_draft = trueHow did I know
save_as_draftwas a parameter? Because when I originally submitted the CTF as a draft, this parameter was present in the request.
Press enter or click to view image in full size
Because of the huge number of CTF submissions, they decided to limit it to only 5 CTFs per month.
So I submitted a CTF and it wasn’t good, so it got rejected. Basically, if a CTF is rejected, all actions should be blocked. But because of this bug, I was still able to submit a flag and get points.
Note: If your CTF is approved, others can solve it and submit flags, but you cannot solve your own CTF. And if the CTF is rejected, you should not be able to do anything at all.
Once a CTF is approved, we are not allowed to edit it, but there is no server-side validation in place. This is the most dangerous bug in this blog, because once a CTF is approved, it becomes publicly available and other users can interact with it.
Join Medium for free to get updates from this writer.
I was able to edit an approved CTF. I could upload a virus, add phishing links, or redirect users anywhere. Users would think it’s just a normal CTF and run it to solve, without knowing what’s really inside. I submitted this as P1, but they changed it to P2.
Press enter or click to view image in full size
Done! This blog is a bit different from my other blogs, and it may not be as clear, because I don’t remember everything perfectly and I had to put all the bugs into one post. I also didn’t want to make it too long. So if you don’t understand anything, just mail me and I’ll share the original POC.
Got questions? Email me: [email protected] or reach out on Twitter: @StrangeRwhite9