Lab: Finding and exploiting an unused API endpoint
Pre
- login as user
wienerusing credentialwiener:peter - open burp suite
Observe
Observe Checkout Flow
- find a product named
"Lightweight l33t Leather Jacket." - Add this product to cart
- click
"Place Order"and we got error because our store balance is not enough for buy this product
Observe Proxy HTTP History
- in HTTP History, we notice that when we open product detail page, it will call http request to
/api/products/1/pricewith methodGETfor get price and message based on product. - send to Repeater and try to Send this
- now what if we use it to update price ?
Solution
Update product price
- In Repeater, change the request method to
PATCHfor update price - add request body as json with this
{"price": 0}, because we want to update the product price to0 - add header
Content-Type: application.json, because we will send json data - and send the request and we got response success
Checkout product
- add to cart again product
"Lightweight l33t Leather Jacket." - open cart and we will se the product price is
$0.00 - since our store credit is
$0.00, we will able to order this product - click
"Place order"
lab solved