Skip to content
Business logic Write-up Beginner

How I hacked Nepal’s ecommerce site and bought huge packs of kitkats for free lol :) | subhdhungana

The ecommerce site allowed a customer to change the price or quantity parameter during checkout, so an attacker could buy items for far less than the listed price. The author used this to order chocolate at a reduced amount.

Subh Dhungana Follow

Published on infosecwriteups.com

Before few months when I was tired of doing my college assignments, I started to drill up my skills in ethical hacking. I used to practise testing the web application sites too.

Subh Dhungana, on infosecwriteups.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the server accepted client-supplied price or quantity values without validating them against the real product price.

Impact

An attacker could buy any item, including expensive ones, at a much lower price than intended.

What the attacker needed

A user account on the site; ability to intercept HTTP requests

The fix

The server should validate prices and quantities on the server side and not trust client-supplied values; the author believes it has now been fixed.

How it was found

  1. Intercept the checkout request with Burp Suite.
  2. Change the quantity or price parameter to a lower value.
  3. Complete the payment and receive the order.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

When you buy something online, your browser sends the price and quantity to the shop's server. If the server trusts those numbers without checking them, a person can change them to pay less. This is called parameter tampering.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.