Critical Recon -> easy Bug Bounty (Red Bull)
A blind boolean SQL injection was found in a parameter of a JSON request on a newly discovered subdomain. An attacker could extract database information character by character, such as the SQL Server version, and potentially read the entire database.
medium.com
Published on medium.com
In scope targets: https://gist.github.com/RedBullSecurity/3eb88debcb01759eccf65ec2b799b340
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 by directly inserting user input without sanitisation, allowing injected conditions to change the query's result.
Impact
An unauthenticated attacker could read the entire database, including user data and internal documents, and potentially achieve remote code execution via xp_cmdshell.
What the attacker needed
None
The fix
The report states it was fixed in 48 hours, but does not describe the fix; it should be fixed by using parameterised queries and validating input.
How it was found
- Intercept a JSON request to the portal.
- Insert a single quote into a parameter and observe a change in behaviour.
- Test boolean conditions to confirm injection.
- Extract the database version character by character using substring queries.
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 boolean SQL injection is when an attacker inserts database commands into a web request and only sees a true or false response, not the actual data. By asking many yes/no questions, they can slowly reveal information like the database version. Here, the login portal returned true or false, letting the attacker extract data one character 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.