How I Found Dom Xss on School Website.
A parameter on a school website's subdomain was found to be vulnerable to DOM-based cross-site scripting. An attacker could craft a link that runs their own script in a victim's browser on that site.
Good evening everyone, I’m debug a bug bounty Hacker, so I was bored and I wanted to do something fun, I decided to check a school in my country.
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 page's client-side JavaScript wrote a URL parameter into the DOM without sanitising or encoding it.
What the attacker needed
A link the victim opens; target URL with an id parameter
How it was found
- Enumerate subdomains of the target domain
- Probe the subdomains to see which respond and what they run
- Crawl the live hosts to collect endpoints and parameters
- Pick the URL with an id parameter and test it for cross-site scripting
- Confirm the DOM-based cross-site scripting finding
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 DOM-based cross-site scripting bug means the page's own JavaScript takes something from the address bar, such as a parameter value, and puts it into the page without cleaning it. Because of that, a crafted link can make the site run code the attacker chose, inside the visitor's browser and under the site's name.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.