Exploiting an API endpoint using documentation
Description
To solve the lab, find the exposed API documentation and delete carlos
. You can log in to your own account using the following credentials: wiener:peter
.
Approach
After accessing the lab, I enabled the FoxyProxy extension to proxy all my requests through Burp Suite to check if there were any requests reaching an API. I found this interesting request responsible for updating the user's email:
This request reaches an endpoint /api/user/wiener
. To start analyzing, I began investigating the following paths:
/api/user/
/api/
The one that caught my attention was /api
, which provided full documentation on the API. This documentation included details on how to update the email, as shown above:
I also discovered how to delete a user:
To proceed, I crafted this request to delete the user Carlos:
I received this response, confirming that the user was deleted:
By deleting the Carlos user, the lab is solved.