Skip to content
SQL injection Write-up Intermediate

Sql Injection via hidden parameter

A hidden 'status' parameter on a report-download endpoint was vulnerable to SQL injection, allowing an attacker to execute arbitrary SQL queries and dump the entire database.

Rutvik Hajare Follow

Published on hajarerutik9.medium.com

Hello Everyone, I am Rutvik Hajare and I am new in the cyber field.This is my first write-up on one of critical findings. usually i hate blog writing but anyways.

Rutvik, on hajarerutik9.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 application concatenated the hidden 'status' parameter directly into a SQL query without parameterisation or input validation.

Impact

An attacker could read the entire database, as the author dumped all data using an automated tool.

What the attacker needed

A free account; ability to intercept HTTP traffic

How it was found

  1. Register on the target and reach the dashboard.
  2. Generate and download a trading report while intercepting traffic in Burp.
  3. Identify the report-download request that includes bank id and user id.
  4. Brute-force directories on the endpoint and find the 'bankacc' directory.
  5. Use a parameter-mining tool to discover the hidden 'status' parameter.
  6. Send an arbitrary value to 'status' to trigger a SQL error, then confirm with a time-delay payload.

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 user input is inserted into a database query without proper handling, letting an attacker change the query's meaning. Here, a parameter that wasn't visible in the normal interface accepted input that caused a database error, and a time-delay test confirmed the attacker could run their own database commands.

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.