Skip to content
SQL injection Write-up Intermediate

How I Exploited Blind Sqli Without Using Any Tool Stackzero

The DVWA blind SQL injection page did not show query results, but an attacker could ask true/false questions to extract the database name, table names, column names, usernames and password hashes. The author wrote a Python script to automate this extraction without using Burp Suite.

StackZero Follow

Published on infosecwriteups.com

Hi hackers! Here is another article that will show how to exploit a known vulnerability in practice.

StackZero, on infosecwriteups.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 inserted user input directly into an SQL query without proper sanitisation or parameterisation, and the page only indicated whether a user existed, allowing boolean-based inference.

What the attacker needed

Access to a DVWA instance; security level set to low; Python 3 installed; requests and beautifulsoup4 libraries

How it was found

  1. Log in to DVWA and set the security level to low.
  2. Open the SQL Injection (Blind) page and confirm the input is vulnerable by observing that a true condition returns 'User id exists'.
  3. Write a Python function that sends a query and checks whether the response contains the word 'exist'.
  4. Use the function to determine the length of the database name and then guess each character.
  5. Enumerate table names, column names, usernames and password hashes by asking true/false questions.
  6. Crack the extracted password hash using an online service.

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 blind SQL injection is when a website puts user input into a database query but does not show the query results. Instead, the attacker asks yes/no questions, like 'is the first letter of the database name an a?', and watches how the page changes. By repeating this many times, the attacker can slowly reveal secret data such as usernames and password hashes.

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.