Multi-step process with no access control on one step
This lab has an admin panel with a flawed multi-step process for changing a user's role. You can familiarize yourself with the admin panel by logging in using the credentials administrator:admin.
After gaining access with administrator credentials (administrator:admin), I explored the admin panel functionalities and identified the "upgrade" feature for elevating user roles. Attempting to upgrade the "carlos" user, I encountered a two-step process. First, I needed to submit the user for upgrade, and then confirm the upgrade with a second request:
Request to submit the upgrade:
POST /admin-roles HTTP/2Host:****.web-security-academy.netCookie: session=7FxCRLXLP4Jf7twGl22ZDyda1np5q9y3Content-Length:30...username=carlos&action=upgrade
Request to confirm the upgrade:
POST /admin-roles HTTP/2Host:****.web-security-academy.netCookie: session=7FxCRLXLP4Jf7twGl22ZDyda1np5q9y3Content-Length:45...action=upgrade&confirmed=true&username=carlos
Upon logging out and logging in as "wiener," I bypassed the first step's control and directly sent the second request, altering the session cookie. The modified request was:
By executing this maneuver, "wiener" was successfully upgraded to an admin, resolving the lab.