My First Bounty: A story of a Blind SQL Injection
A subdomain hosting a third-party analytics service had a blind SQL injection in the login_name parameter of its admin login page. An attacker could use time-based inference to extract database information, though a WAF initially blocked common payloads.
Published on medium.com
Hello guys! My name is torious, and I want to share how God helped me get my first bounty after lots of N/As, duplicates, and many months of hunting.
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_name parameter was concatenated into a SQL query without parameterisation, allowing injected SQL to run.
Impact
An attacker could extract database contents through time-based inference, but only after bypassing the WAF via the origin IP; the text does not claim full data exfiltration beyond database name enumeration.
What the attacker needed
Access to the admin login page; ability to reach the origin IP directly; WAF bypass via origin IP
How it was found
- Enumerate subdomains and probe them with httpx to find technologies and IP addresses.
- Find an admin login page on a subdomain running PHP and MySQL.
- Capture the login POST request and append a single quote to the login_name value, observing a 500 error.
- Bypass the WAF by sending requests directly to the origin IP discovered earlier.
- Send a time-based payload that makes the database sleep for 10 seconds and observe the delay.
- Use Ghauri to confirm the injection and enumerate 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.
A blind SQL injection is when a website puts user input into a database query without proper checks, but the site does not show error messages or data directly. Instead, an attacker asks the database true/false questions and watches for indirect signs, like a deliberate delay, to learn information one bit at a time.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.