Skip to content
SQL injection Write-up Intermediate

My Experience Hacking My College System

A URL parameter on the college's resume-viewing page was vulnerable to SQL injection, allowing the author to dump the database and recover an admin password hash. After cracking the hash, the author used the admin credentials from an internal lab machine to take over the server.

Rahul Kumar Follow

Published on systemweakness.com

Hey Welcome to my blog, where I’ll be sharing my exhilarating experience of hacking into my college’s computer system and the valuable lessons I learned along the way.

Rahul Kumar, 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 id parameter was concatenated into a SQL query without proper parameterisation or validation.

Impact

An attacker could read the whole database, including admin password hashes, and with a cracked password could take over the server from the internal network.

What the attacker needed

Access to the public website; admin page reachable from internal network

How it was found

  1. Collect URL parameters from the site's web archive history with a parameter-mining tool.
  2. URL-encode a SQL injection wordlist and fuzz the collected URLs with a fuzzing tool.
  3. Filter responses with status 200 and manually test the remaining parameters.
  4. Confirm the id parameter on the resume view page is injectable and run sqlmap against it.
  5. Enumerate and dump the database, finding an admin password hash in one table.
  6. Crack the hash with hashcat, then log in to the admin page from an internal lab computer.

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 often puts values from the address bar into database queries. If it does not clean those values, a user can sneak in extra database instructions, called SQL injection, and read data they should not see. Here that let the author pull out password data and then log in as an administrator.

What is SQL injection?

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

More by Rahul Kumar

View all

2 more disclosed reports, best first.

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.