Skip to content
SQL injection Write-up Advanced

Breaking Past 403: A Deep Dive into Out-of-Band SQL Injection Dis

A login form was vulnerable to out-of-band SQL injection through the email field, allowing an attacker to make the database server send DNS requests to an attacker-controlled domain. This let the attacker extract the database name, current user and server name.

RyuuKhagetsu Follow

Published on systemweakness.com

Hi everyone! Hope you’re all doing well.

RyuuKhagetsu, on systemweakness.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 email input was concatenated into a SQL query without parameterisation, and the database user had permission to run the xp_dirtree procedure, which can trigger network requests.

Impact

An attacker could extract information from the database, such as its name, the current user and the server name, and potentially escalate further, though the report does not demonstrate data modification or remote code execution.

What the attacker needed

A free account; access to the admissions login page; database user can run xp_dirtree

How it was found

  1. Discover the admissions login page by directory fuzzing.
  2. Register an account and try SQL injection payloads in the email field.
  3. Notice a different response length for one payload, suggesting the query behaved differently.
  4. Split the payload to work around a possible character limit and receive a DNS callback on Burp Collaborator.
  5. Craft payloads that include database functions in the DNS request to extract the database name, current user and server name.

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 treated as part of a database command, so an attacker can change what the database does. Out-of-band means the attacker does not see the result in the web page; instead the database is tricked into making a network request, such as a DNS lookup, to a server the attacker controls, and the attacker reads information from that request.

What is SQL injection?

Input reaches a database query as code, letting an attacker read or change data the application never meant to expose.

More by RyuuKhagetsu

View all

8 more disclosed reports, best first.

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.