#4. Bug Bounty Series: Exploiting Boolean-based SQL Injection
The user parameter on a change password page was vulnerable to boolean-based SQL injection. An attacker could use a tool to extract the current database name and banner information, and the author claims this led to obtaining user credentials.
Hello guys 👋 I’ve returned with one more article that is Boolean-based SQL Injection through which I was able to get the user credentials.
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 application built SQL queries using the user parameter without proper parameterisation or input validation.
Impact
An attacker could extract database information such as the current database name and banner, and the author claims this allowed obtaining user credentials.
What the attacker needed
Access to the change password page; ability to intercept HTTP requests
How it was found
- Click the change password button and submit dummy information.
- Intercept the request with Burp Suite and send it to Repeater.
- Notice the user parameter is vulnerable to SQL injection.
- Save the POST request to a file.
- Run the Ghauri tool against the saved request, targeting the user parameter.
- After a few minutes, receive the current database name and banner information.
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, so an attacker can change the command's meaning. Here, the 'user' field on a password change form was not properly handled, letting a tool ask the database true/false questions and slowly learn its contents.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.