How Recon → SQLi Made €€€€ Bounty
A SQL injection vulnerability was found in the 'selectedSources' parameter of a web application, allowing an attacker to execute arbitrary SQL queries and retrieve database names. The attacker used SQLmap to confirm boolean-based and time-based blind SQL injection.
medium.com
Published on medium.com
With a boooooooooring evening and zero plans, I sat there contemplating life choices — should I fix my sleep schedule or start another anime marathon?
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 failed to sanitise or parameterise user input in the 'selectedSources' parameter before using it in SQL queries.
Impact
An attacker could extract database names and potentially other data from the backend database.
What the attacker needed
Access to the web application; no authentication required
How it was found
- Perform manual reconnaissance using tools like waybackurls, katana, and gauplus to collect URLs.
- Bypass 403 Forbidden responses using 403 bypasser tools, encoding backslashes as %5c for a Java app on Apache Tomcat.
- Discover hidden parameters (SelectedSources, SelectedNames, SelectedTemplate) by examining JavaScript files.
- Test the selectedSources parameter for SQL injection using SQLmap with options for PostgreSQL and a session cookie.
- SQLmap identifies boolean-based blind and time-based blind SQL injection and retrieves 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 a flaw where user input is inserted into database commands without proper handling, letting an attacker change the query. Here, the 'selectedSources' parameter was vulnerable, so the attacker could ask the database to reveal its structure, like listing database names.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.