PoC: Bypass Input with SQL Injection to Gaining Information in SM
Two school websites had input fields for looking up student records that were vulnerable to SQL injection. By entering a crafted query, the author could retrieve information such as class group links and graduation details for students.
(For the SMK Maarif, i only have few screenshoots and proof, cus the website has gone)
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 lookup input was concatenated directly into a database query without parameterisation or validation, so the client-side hint word was the only barrier.
Impact
The author could retrieve student information such as class group links and graduation records, which could be abused further, though the second case is described as not critical.
What the attacker needed
Access to the public lookup page; no account needed
How it was found
- Open the class-division page on the school website.
- Enter a crafted SQL query into the student ID field instead of a real ID.
- Read the returned information, including a link to the class group.
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 looks up a student by their ID number should only ever return that one student. Here, the site built its database query by pasting in whatever the visitor typed, so a visitor could type extra database instructions to make it return other records. This is called SQL injection: tricking a database by sneaking commands into an input field.
What is SQL injection?
Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.