SQL Injection in 5 mins //Just because of CURIOSITY //
A SQL injection vulnerability was found in a college web application's fee details endpoint, allowing an attacker to enumerate and dump the entire database including sensitive student and admin information.
Assalamu alaekum gentlemen, I am happy to share that I found a SQL Injection in one of the web application of college . I was able to enumerate the whole DATABASE including information about students, admins, etc. ,etc. and lots of sensitive data was available.
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 'sem' parameter before using it in SQL queries.
Impact
An attacker could access and dump the entire database, including sensitive student and admin information, which could be used to disrupt college management and for further exploitation.
What the attacker needed
Valid student login credentials; ability to intercept HTTP requests
How it was found
- Log in with student credentials and browse to the fee details page.
- Intercept the request to the fee details endpoint with a proxy tool.
- Insert a single quote into the 'sem' parameter and observe a 500 Server Error.
- Insert two single quotes and observe a 200 OK response, confirming SQL injection.
- Save the full request to a file and run an automated SQL injection tool against it.
- Use the tool to enumerate and dump the database.
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 directly into database commands, letting an attacker change the meaning of those commands. Here, the 'sem' parameter was not properly sanitised, so adding a single quote caused a server error, and automated tools could then extract all data from the database.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.