0x4148 — Blind SQL Injection
The password reset form was vulnerable to blind SQL injection because user input was inserted into a database query without sanitisation. An attacker could use boolean-based responses to confirm table existence and extract the admin password character by character.
Published on medium.com
In this write-up, we’ll walk step-by-step through solving the 0x4148 - Blind SQL Injection challenge.
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 the SQL query by directly concatenating the username input instead of using parameterised queries.
Impact
An attacker could extract the admin password from the database, which could lead to account takeover.
What the attacker needed
Access to the password reset form; no authentication needed
The fix
The application should use prepared statements or parameterised queries and avoid detailed responses during authentication.
How it was found
- Submit a classic SQL payload in the username field of the password reset form.
- Observe whether the response says a reset email was sent or that the username is invalid.
- Use a boolean condition against information_schema.tables to confirm the users table exists.
- Automate character-by-character extraction of the admin password using a Python script that checks the response text.
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 what you type into a database command without cleaning it first. Even if the site does not show database errors, you can ask yes/no questions through the page's behaviour to learn secret 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.