URL-based access control can be circumvented
This website has an unauthenticated admin panel at /admin
, but a front-end system has been configured to block external access to that path. However, the back-end application is built on a framework that supports the X-Original-URL
header.
Attempting to access /admin resulted in being blocked. Notably, the response appeared straightforward, hinting at a front-end system origin. To investigate further, I sent the request to Burp Repeater. Modifying the URL to / and introducing the HTTP header X-Original-URL: /example yielded a "not found" response, indicating back-end system processing of the X-Original-URL header.
The Response was like:
Continuing, I adjusted the X-Original-URL header value to /admin, enabling access to the admin page. To initiate the deletion of "carlos," I appended ?username=carlos to the actual query string and altered the X-Original-URL path to /admin/delete. This sequence of steps allowed for successful navigation through the security measures and accomplished the task of deleting the user "carlos" and that's how the lab is solved.
Last updated