How I Offered Free 1 Lakh Rupees Through Government Website
The search form on a government website reflected user input without sanitisation, allowing an attacker to inject an HTML link. An attacker could craft a URL that, when visited, displayed a fake government offer and redirected the victim to a malicious site.
Published on infosecwriteups.com
Hey Hackers, It’s Me Krishnadev P Melevila, a 19-Year-old self-learned cyber security researcher.
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 HTML encoding, allowing arbitrary HTML to be rendered.
Impact
An attacker could use the trusted government domain to show fake offers and redirect victims to phishing or malicious sites, damaging the site's reputation.
What the attacker needed
Victim clicks a crafted link
The fix
The vulnerability was fixed by the National Informatics Center after the report.
How it was found
- Go to the website and find the search form.
- Enter an HTML link into the search field and submit.
- Observe that the link is rendered on the page.
- Copy the resulting URL, optionally shorten it, and send it to a victim.
- When the victim clicks the link, they see the fake offer and are redirected to a malicious page.
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 is when a website takes what you type and puts it directly into the page without cleaning it. Here, the search box let someone insert a clickable link that looked like part of the government site. A victim could be tricked into clicking it and taken to a scam page.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.