How I found my first bug in 2 hours : (Blind SQLi)Time based SQL Injection.
A PHP endpoint accepted a page_name parameter without validation, allowing a time-based SQL injection. The attacker could confirm the injection via a deliberate delay and then use a tool to dump many database tables containing sensitive data.
In this write-up, I want to share my first bug hunting experience with you. I discovered a time-based SQL injection vulnerability on a target.
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 concatenated the page_name parameter directly into a SQL query without validation or parameterisation.
Impact
The attacker could confirm the injection and then use a tool to access many database tables containing sensitive data, though the write-up notes the exploited database representation was altered.
What the attacker needed
Access to the target web application; a vulnerable page_name parameter
How it was found
- Route application traffic through Burp Suite and explore the site.
- Review captured traffic to find sensitive endpoints.
- Send a request with a quote mark at the end of the page_name value and observe a server error.
- Send a time-based payload and observe a response delay of about 21 seconds.
- Use sqlmap to exploit the confirmed injection and enumerate database tables.
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 website often builds database queries from user input. If it does not check that input, an attacker can add extra database instructions. Here the attacker added a command that makes the database wait, and the delay proved the injection worked.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.