Blind SQL Injection Alternative

Bengsky
2 min readAug 6, 2023

Introduction

In this write-up, we will explore an alternative approach to exploit Blind SQL injection, specifically targeting the username session. Our objective is to discuss a technique to effectively dump Blind SQL injection vulnerabilities.

SQLMAP Detection

During the investigation, SQLMAP is capable of detecting and exploiting a time-based blind SQL injection technique. Here is an excerpt from the detection report:

---
Parameter: #1* ((custom) POST)
Type: time-based blind
Title: MySQL >= 5.0.12 AND time-based blind (query SLEEP)
Payload: username=' AND (SELECT 2574 FROM (SELECT(SLEEP(5)))IDrj) AND 'sJLy'='sJLy&password=123
---
```

Requirement:

For a comprehensive understanding of the requirements, please refer to the analysis provided on

Exploiting the Vulnerability:

Upon analyzing the requirements, we observed that the response displays “Logged in as admin

By replacing “admin” in the payload with any string

we successfully demonstrated that the exploitation allows us to change the username to anything. This behavior occurs because the Username Sessioning logic is based on the result of the SQL row, thereby enabling us to pass our second payload into the USERNAME column

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Bengsky
Bengsky

No responses yet

Write a response