Skip to content
SQL injection Write-up Beginner

Hacking Story How I Hacked My School Using Sql Injection

The student ID field on a school's online fee payment portal accepted SQL injection, and the author used an automated tool to confirm the parameter was injectable and to retrieve several databases. The author claims to have reported the issue anonymously and that the portal was later updated.

Sidhanta Palei Follow

Published on systemweakness.com

https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Ftenor.com%2Fembed%2F20517262&displayname=Tenor&url=https%3A%2F%2Ftenor.com%2Fview%2Fhacker-computer-cyberpunk-hacking-dark-gif-20517262&image=https%3A%2F%2Fmedia.tenor.com%2Feel18OEN2gIAAAAd%2Fhacker-computer.gif&key=a19fcc184b9711e1b4764040d3dc5c07&type=text…

Sidhanta Palei, on systemweakness.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

Root cause

Likely the student_id parameter was concatenated into a SQL query without parameterisation or input validation.

Impact

An attacker could read data from the school's database through the fee portal, and the same field also reflected script, so injected script could run in a victim's browser.

What the attacker needed

Access to the public fee portal; no account needed to reach the form

The fix

The portal should be fixed by using parameterised queries and output encoding for the student ID field; the author says the school updated the portal after the report.

How it was found

  1. Open the school's online fee payment portal.
  2. Enter an XSS payload in the student ID form and submit; a popup appears.
  3. Enter an SQL injection payload in the same form and submit; it succeeds.
  4. Run an automated SQL injection tool against the student_id parameter with high risk and level settings.
  5. Observe that the parameter is injectable and that several databases are retrieved.

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 form that takes a student ID was passing whatever was typed straight into the database query behind it, so special characters could change the query instead of just being looked up. That is called SQL injection: the input is treated as code rather than as plain data. The author used a tool that automates sending many such inputs to confirm the flaw and list database names.

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.