How I found my 2nd SQL injection vulnerability on the Indian Government website!
A login page on a Tamil Nadu government education fee payment portal was vulnerable to SQL injection, and entering a crafted username caused a database error. The author then used an automated tool to dump data and reported the issue, which was acknowledged by the national CERT.
Last night, while casually poking around the internet (totally not looking for trouble), I stumbled upon a government website. Curiosity kicked in and with a few well-placed SQL payloads, boom — access granted!
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 login form inserted user input directly into a database query without parameterisation, so crafted input altered the query and produced a database error.
Impact
Attackers could retrieve, modify or delete sensitive citizen records held in the portal's database, though the text gives no proof of how much data was actually exposed.
What the attacker needed
Internet access to the portal; no account needed
The fix
The author says the issue was reported and patched, but the text gives no technical detail on how it was fixed; properly, the queries should be parameterised.
How it was found
- Enumerate the target's domains and subdomains with a passive enumeration tool.
- Filter the subdomains down to ones that respond with live HTTP status codes.
- Run an automated scanner against the live hosts, which did not flag the issue.
- Manually browse the hosts and spot a login page.
- Submit a crafted username containing SQL syntax and observe a database error.
- Run an automated SQL injection tool against the endpoint to dump data.
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 login form sends what you type to a database as part of a command. If the site builds that command by gluing your text straight in, special characters can change the command's meaning, which is called SQL injection. Here the author typed a crafted username, the site showed a database error, and a tool then pulled data out.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.