Method-based access control can be circumvented

Description

This lab implements access controls based partly on the HTTP method of requests. You can familiarize yourself with the admin panel by logging in using the credentials administrator:admin.

Reproduction and proof of concept

  1. Log in using the admin credentials administrator:admin.

  2. Browse to the admin panel, promote carlos, and send the HTTP request to Burp Repeater.

  3. Open a private/incognito browser window, and log in with the non-admin credentials wiener:peter.

  4. Attempt to re-promote carlos with the non-admin user by copying that user’s session cookie into the existing Burp Repeater request, and observe that the response says “Unauthorized”.

  5. Change the method from POST to POSTX and observe that the response changes to “missing parameter”.

  6. Convert the request to use the GET method by right-clicking and selecting “Change request method”.

  7. Change the username parameter to your username and resend the request.

Exploitability

An attacker will need to exploit the flawed access controls to become an administrator.