IDORiot
Writeup for IDORiot (Web) - Imaginary (2023) 💜
Description
Some idiot made this web site that you can log in to. The idiot even made it in php. I dunno.
Challenge name indicates an IDOR vulnerability. There's no source code, so let's investigate the site
Recon
We are immediately greeted by a login screen. I would normally try some default creds, SQLi etc but based on the challenge name, I decide to skip straight to user registration.
I register cat:cat
and see a message Welcome, User ID: 154308130
.
The source code is also displayed on-screen.
Accordingly, our goal is to gain access to the admin's account. If our $_SESSION['user_id']
matches that of the admin, we get the flag.
Solution
Tried to MD5 the user ID to see if matches the session value: 5b2deaedb34c1bbd66856710f647c1db
.
No match, tried to register another user cat2:cat2
and get Welcome, User ID: 275541975
with a session id ef64cdce8f1247feb73ceddf86027774
.
Checking the registration login request, the user ID is specified.
Tried sending the registration request to burp's repeater.
The flag is displayed.
Flag: ictf{1ns3cure_direct_object_reference_from_hidden_post_param_i_guess}
Last updated