Skip to content
SQL injection Write-up Beginner

Exploring a New SQLi Vulnerability: A Ghauri Experience

Several pages of a politician's website were vulnerable to time-based and boolean-based SQL injection, which the author found using an automated tool. The author says they extracted admin panel credentials, user email lists and internal webmail credentials.

medium.com

Published on medium.com

I’m back with a brand-new article on SQL injection vulnerabilities. In this ethical hacking experiment, I decided to use Ghauri instead of SQLMap.

Erkan Kavas, 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 user input on several pages was inserted into database queries without proper parameterisation or escaping.

Impact

The author says they could extract sensitive data including admin credentials, user email lists and internal webmail credentials, though the injection methods were not fast.

What the attacker needed

Target pages accept user input; automated SQLi tool such as Ghauri

How it was found

  1. Pick a target URL and run the tool against it to list databases.
  2. List the tables in a chosen database.
  3. List the columns in a chosen table.
  4. Dump the data from the chosen table.

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 into a database query without cleaning it, so crafted input can change the query. Here the author used a tool that guesses the database contents by watching how long pages take to respond or whether they change. That let them pull out stored data such as login details.

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.