Skip to content
XSS Write-up Beginner

Account takover of an online casino

An unauthenticated admin dashboard for managing affiliate landing pages allowed creation of pages with a stored cross-site scripting (XSS) payload. An attacker could run JavaScript in the context of authenticated users visiting the landing page and steal their cookies.

medium.com

Published on medium.com

Here’s a story about how I almost took over an entire online casino’s player base out of boredom.

0xglss, on medium.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 admin dashboard lacked authentication and the landing page content was not sanitised, allowing stored JavaScript to execute.

Impact

An attacker could run JavaScript on behalf of authenticated users visiting the landing page and extract their cookies, potentially leading to account takeover.

What the attacker needed

No authentication on admin dashboard; victim visits crafted landing page

The fix

The company now appears to have implemented authentication on the admin dashboard.

How it was found

  1. Find subdomains and notice a 404 page on lp.hackedcasino.com.
  2. Fuzz the 404 page to discover an unauthenticated admin dashboard at /admin.
  3. Create a new affiliate landing page with a JavaScript payload in an input field.
  4. Visit the newly created landing page and observe the script executing.

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.

The casino had a hidden admin page that anyone could open without logging in. That page let the author create a public landing page containing a script. When a logged-in user visited that page, the script ran in their browser and could read their session cookie, which is like a temporary password that keeps them logged in.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.