Petshop Pro
The write-up covers a Hacker101 practice CTF where the price of an item could be changed to zero, and a login endpoint was found by directory brute-forcing and then attacked with username and password guessing. An attacker could buy items for free and, if credentials were guessed, log in as another user.
Published on medium.com
ffuf -u https://aa1a4ce451abaa6349ea51c9a469b3b9.ctf.hacker101.com/login -w username -X POST -d “username=FUZZ&password=admin” -H “Content-Type: application/x-www-form-urlencoded” -mr “Invalid password”
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 trusted a price value sent by the client and had no rate limiting on login attempts.
Impact
An attacker could buy items for free and could gain access to accounts whose passwords were guessed.
What the attacker needed
A free account; ability to intercept requests; wordlists for guessing
How it was found
- Change the item price to zero in the purchase request.
- Find the login endpoint by directory brute-forcing.
- Brute-force usernames against the login form.
- Brute-force passwords against the login form.
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.
A price field was trusted by the shop, so a user could send a lower price and pay nothing. Separately, the login page could be found by guessing common file and folder names, and then passwords could be guessed repeatedly because nothing slowed the attacker down.
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.