Skip to content
SQL injection Write-up Beginner

Sql Injection Leads To Dump The Student Pii

A download page accepted a university number and passed it into a SQL query without sanitisation, causing a MySQL error when an apostrophe was used. The author then used an automated tool to dump the database and obtain students' personally identifiable information.

Cyb3rV0lt Follow

Published on infosecwriteups.com

In this writeup I will tell you how I found the SQLi in the educational website.

Cyb3rV0lt, on infosecwriteups.com

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 read the entire database, including students' personally identifiable information; the author also tried to get an operating system shell but lacked file write permission.

What the attacker needed

Access to the download page; a valid university number

How it was found

  1. Find the download page that asks for a university number.
  2. Enter a valid university number to view the receipt history.
  3. Click a receipt link that includes a number parameter in the URL.
  4. Insert an apostrophe into the parameter and observe a MySQL error.
  5. Use an automated SQL injection tool to 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.

The website had a page where you type a student number to download a receipt. The site put that number directly into a database command without cleaning it first. By typing a special character, the author made the database show an error, which proved the input was not safe. Then they used a tool to automatically extract all the data, including private student details.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

Similar reports

View all

Same bug class and techniques, clearest first.

SQL injection

The lesson behind this report.

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.