3. Finding and exploiting an unused API endpoint
Lets open the vulnerable lab:

Lets sign in if we want:

Now lets navigate through the website, to crawl some pages and functionalities:




After logging in again:

Lets move on to burpsuite to see the history:
We found a get request with these object fields, or paramters, that are not presented in the next image which are the post parameters:

And a post request with some parameters:

Lets send it to the repeater, and see if we can change the item price so we can buy it:

So we have to set a number:

And as a string:

It works correctly with numbers but maybe there is some validation because the price did not change if we change the request to GET:

But we have something else in the hidden parameters, we have a chosen_discount parameter, lets try to exploit it:


Here we go if we add it it does not occur an error.
Lets try use a string:
Here we have an error:

And here we go:

Here is the vulnerability, where we got a hidden parameter, and then send it with a string and a number for example, and it errors with a string but with a number it works perfectly, so we can abuse it and set the discount to 100 to get it for free.
We solved the lab:

Solve it using a python3 script:
Last updated