Skip to content
SQL injection Disclosed report Intermediate

Blind Based SQL Injection in 3d.sc.money

A URI path on the site was passed into a SQL query without proper quoting, letting an attacker inject boolean conditions that change the response. By observing 404 versus 200 responses, the reporter extracted the database version number character by character.

sawmj Follow

Originally disclosed on HackerOne

  • Disclosed after 56 days

Greetings, Hope Y'all good and fine!

Summary:

I found a Boolean Blind based SQL Injection in your website => 3d.cs.money

It's a URI path injection.

The vulnerability tested on the Original IP behind the CloudflareWAF and I've already reported this in my other report #1105673

The Affected URI :

http://51.83.253.82/item/default %INJECTION_POINT_HERE%

Steps To Reproduce:

Go to

"http://51.83.253.82/item/default'and%20UPPER('asd')='asd'--" => It will give you 404 BUT "http://51.83.253.82/item/default'and%20UPPER('asd')='ASD'--" => It will give you 200

As a PoC I extracted just the version number which is : 20.9.2.2

and the steps to produce that :

http://51.83.253.82/item/default'and%20substr(version(),1,1)='2'-- ==> will give you 200 OK http://51.83.253.82/item/default'and%20substr(version(),2,1)='0'-- ==> will give you 200 OK So on so fourth until you get the full version number.

Impact

Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data. This can be used to alter query logic to bypass security checks, or to insert additional statements that modify the back-end database, possibly including execution of system commands.

The original report as published on HackerOne, by sawmj. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the URI path segment was concatenated into a SQL query without parameterisation or escaping, so injected SQL syntax altered the query logic.

Impact

An attacker could alter query logic to bypass security checks or read database contents; the reporter notes it could possibly lead to modifying the database or executing system commands, and the testing was done against the origin IP behind the Cloudflare WAF.

What the attacker needed

Reachable origin IP

The fix

The query should be fixed by using parameterised statements or escaping user input.

How it was found

  1. Send a request to the item path with a boolean condition that evaluates false and observe a 404 response.
  2. Send the same request with a condition that evaluates true and observe a 200 response.
  3. Use substring comparisons against the database version to confirm extraction one character at a time.

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 report has not been written yet. The Original tab links to the source.

A website often builds database queries by gluing together text, including parts of the address you type. If that text is not cleaned, you can slip in extra database instructions. Here the attacker asked the database true/false questions and watched whether the page returned normally or showed a 404 error, which slowly leaks secret data such as the database version.

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 from CS Money

View all

The newest disclosed reports for this program.

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.