HTMLI/XSS - Crafting a better PoC
An unauthenticated HTML injection/reflected XSS vulnerability existed on a search endpoint. The author used it to embed an iframe pointing to a cloned login page, aiming to capture credentials, though secure cookie settings prevented cookie hijacking.
Published on blog.riotsecurityteam.com
·Aug 30, 2022·
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 search parameter was reflected into the page without proper HTML encoding or sanitisation.
Impact
An attacker could trick a victim into entering credentials on a fake login page embedded via the injected iframe, though secure cookie settings prevented direct session cookie theft.
What the attacker needed
Victim visits attacker-crafted URL; attacker hosts cloned login page; victim enters credentials
How it was found
- Clone the authentication page for the target domain.
- Host the cloned page on a server, using NGROK to tunnel to a local Python web server.
- Craft a URL with an iframe in the search parameter pointing to the hosted page.
- Adjust the iframe width and height until it displays correctly.
- Send the URL to a victim; when they enter credentials, they are sent to the attacker's server.
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.
HTML injection lets an attacker put their own HTML into a page, and reflected cross-site scripting (XSS) lets them run JavaScript in a victim's browser. Here the author injected an iframe that loaded a fake login page, hoping to trick users into typing their credentials. Secure cookie settings stopped them from stealing session cookies directly.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.