Skip to content
SQL injection Write-up Beginner

Easiest $225 Ever: A Simple SQL Injection Win!

A subdomain had a 'page=' parameter vulnerable to error-based SQL injection, which leaked internal paths when a tilde character was injected. An attacker could use this to extract database information.

medium.com

Published on medium.com

Hi everyone, I’m Adnan Kaisar, a cybersecurity enthusiast pursuing B.Tech in CSE from Dehradun. My journey into hacking and bug bounty started in my first year of college, and ever since, I’ve been hooked on the thrill of finding vulnerabilities.

WhoAdnan, on medium.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 'page=' parameter was concatenated into a SQL query without proper sanitisation, causing database errors that leak internal paths.

Impact

The error-based SQL injection could allow an attacker to extract database information, though the text only demonstrates path leakage.

What the attacker needed

Access to the vulnerable subdomain

How it was found

  1. Enumerate subdomains of the target domain.
  2. Filter for live subdomains returning HTTP 200 or 301.
  3. Open the live subdomains and look for interesting parameters.
  4. Test the 'page=' parameter by injecting a tilde character.
  5. Observe the error message leaking internal paths.

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 when a website puts user input directly into a database command, so special characters can break the command and reveal error messages. Here, typing a tilde in a URL parameter caused the site to show internal file paths, which is a sign the database is not handling input safely.

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.