How I Stumbled Into an SQLi at 2 AM (Instead of Doing My Job)
A GET parameter on a cybersecurity training institute's website was vulnerable to SQL injection, as shown by a syntax error when a single quote was added. The author confirmed boolean-based blind SQLi and used SQLMap to extract database names.
medium.com
Published on medium.com
I was deep into a routine network pentest — tools running, logs flying, and Nessus doing its usual “I’ll be done when I’m done, bro” routine.
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
Impact
An attacker could extract database names and potentially other data, though the author stopped after confirming the vulnerability.
What the attacker needed
None
The fix
The text does not state that the issue was fixed; it should be fixed by using parameterised queries and sanitising input.
How it was found
- Find a URL with an id parameter.
- Add a single quote to the parameter value and observe a database error.
- Add two single quotes and see the error disappear.
- Use Burp Suite to intercept and test boolean conditions.
- Confirm boolean-based blind SQL injection by comparing true and false responses.
- Run SQLMap to extract database names.
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.
SQL injection is when a website puts user input directly into a database command without checking it. An attacker can trick the database into revealing or changing information. Here, adding a single quote broke the database query, showing the input was not handled safely.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.