Complex Attack Types: Sample Scenarios 43
The report describes a web application with a race condition in the gold transfer API, allowing an attacker to send more gold than they own by sending multiple simultaneous requests. It also details a server-side template injection in a calculator feature that leads to remote code execution, and a privilege escalation via a writable cleanup script.
A new article and a new challenge. This time, we will attempt to infiltrate the other machine by using the system code infrastructure and vulnerabilities on the web.
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 application did not properly synchronise concurrent requests to the gold transfer endpoint, and the calculator feature evaluated user input as code without sanitisation.
Impact
An attacker could gain unlimited virtual currency, execute arbitrary commands on the server, and escalate privileges to root.
What the attacker needed
A free account; victim clicks a link; none
The fix
The application should use atomic operations or locking for the gold transfer, sanitise calculator input, and secure the cleanup script with proper permissions.
How it was found
- Register two accounts on the target site.
- Intercept the gold transfer request to see the API endpoint and parameters.
- Create a wordlist with the number 1 repeated.
- Use ffuf to send many simultaneous POST requests to the givegold API with amount=1.
- Check the recipient account to confirm extra gold was received.
- Use a Python script to automate sending gold back and forth until reaching 10000 gold.
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.
This is a walkthrough of a hacking challenge. It shows how a flaw in how a website handles multiple requests at the same time can let someone cheat a virtual currency system, and how a calculator page can be abused to run commands on the server.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.