bug-slash1. Exploiting an API endpoint using documentation

Accessing the lab webpage:

Login in:

Looking at the request that intercepted using the burpsuite:

We found an API endpoint, or for example we can try it manually to see the responses, or brute force it to get a hit:

Or we can just update our email and we will get it as a request:

Lets try it:

Using options method we can use these methods:

Lets do GET:

We got a response with JSON formats:

Maybe we need to specify a user, lets try wiener:

Lets try carlos if it is exists:

And here we go:

And now as the objective, we have to delete carlos user to solve the lab, and remember we can use DELETE method as shown above:

Here we go:

Trying PATCH on wiener:

Lets do GET on /api:

Solve it using a python3 script:

Last updated