How I Hacked IIT Delhi
A login page had a URL parameter that was base64-encoded and passed to a SQL query, allowing time-based blind SQL injection. An attacker could extract database names, table names, and host information.
medium.com
Published on medium.com
I will outline all the triggers and how I validated my findings without any automated tools just by manual approach.
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
Impact
An attacker could extract database schema information and host details, potentially leading to further data exposure.
What the attacker needed
A free account; victim clicks a link
The fix
The application should use parameterised queries or stored procedures to prevent SQL injection, and avoid concatenating user input into SQL statements.
How it was found
- Enumerate subdomains and browse manually to find a login page with a 'q' parameter.
- Register on the site to receive a verification link and access the vulnerable page.
- Decode the base64 value of 'q' and inject a single quote to observe a 500 error.
- Inject two single quotes to get a 200 OK response, confirming SQL injection.
- Craft a time-based payload using WAITFOR DELAY and base64-encode it to cause a delay.
- Use a script to enumerate table names via time-based blind SQL injection.
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.
The website took a value from the web address, decoded it, and put it directly into a database command without checking it. By crafting special inputs, an attacker could make the database wait before responding, which reveals 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.