Break into a shop. Legally.
Duka Demo is a fake online shop with three classic security bugs, the same kinds I find in real penetration tests. Find all three flags. Hints are there if you get stuck.
// Fully simulated in your browser. There's no real server, and nothing you type is run or sent.
Get into the admin account
You don't know the admin's password. Watch the panel on the right: it shows the database command the shop builds from what you type.
๐ Solve level 1 to unlock
Read someone else's order
You're logged in as guest and can see your own order. Customers' names, phone numbers and addresses are supposed to be private.
if (!session.loggedIn) return 401;
order = db.orders.find(id);
return order;
Spot what's missing?
๐ Solve level 2 to unlock
Make every visitor's browser run your code
Product reviews are shown to everyone who visits the page. The shop saves exactly what you write.
- Nakato S.โ
โ
โ
โ
โ
Strong motor, a bit loud.
<p>{{ review.text }}</p> // printed as-is๐ All three flags captured.
You just did what a penetration tester does. These three bugs are among the most common I find in real apps. Does yours have them?