scanrub
Blind SQL Injection

Blind SQL Injection

4 min read 1 reports analyzed ScanRub Research
Share
Live Playground · Powered by this research
SQL Injection Pattern Detector
Quote charactersDETECTED
Comment syntaxNot present
UNION/SELECTNot present
Boolean logicDETECTED
Time delay functionsNot present
Stacked queriesNot present
2 injection pattern(s) detected. This input should be blocked or parameterized.

Summary

Blind SQL injection is the subset of SQL injection where the application is genuinely vulnerable, but the database's error messages and query results never make it back into the HTTP response. There's no visible syntax error, no leaked table dump, nothing an attacker can read directly, which is exactly what makes it harder to find than the classic error-based or UNION-based variants: a naive test that only looks for reflected data or a stack trace will walk right past a blind injection point and report the endpoint as clean. The two working techniques both rely on inference rather than direct observation. Boolean-based blind injection asks the database a true/false question and reads the answer off some indirect signal in the response, commonly a difference in page content, length, or a specific element being present or absent depending on whether the injected condition evaluated true or false. Time-based blind injection sidesteps the need for any visible difference at all by injecting a payload that makes the database sleep for a set duration when a condition is true, then measuring response time instead of response content.

◈ flow diagram
User InputApplication …SQL Query Co…Database Eng…Query ResultApplication …

Top Affected Components / Targets

  • Login and search forms where a query result renders differently based on match success, but no error text or data is echoed
  • Filter, sort, and pagination parameters that reach a query but whose output is otherwise identical regardless of the underlying data
  • API endpoints returning a generic 200/404 pair with no descriptive body

Common Attack Vectors

  • Submit a pair of boolean payloads, one that should evaluate true and one that should evaluate false, and compare the two responses for any consistent difference in content, length, or status
  • Submit a time-based payload designed to delay the response by a fixed number of seconds only if the injected condition is true, then compare elapsed time against a baseline request with no payload
  • Extract data one bit or character at a time by repeating either technique against a conditional expression that tests part of a string (for example, whether the first character of a table name is greater than or less than a given letter)

Common Payloads

  • ' AND '1'='1 (should behave like the baseline) vs. ' AND '1'='2 (should behave differently)
  • ' AND SLEEP(13)-- for MySQL, '; WAITFOR DELAY '0:0:13'-- for MSSQL, ' AND pg_sleep(13)-- for PostgreSQL
  • ' AND SUBSTRING((SELECT table_name FROM information_schema.tables LIMIT 1),1,1)='a as a building block for character-by-character extraction

Detection Strategy

Send a matched pair of boolean payloads per parameter and compare the two responses directly against each other rather than against a single baseline, since the meaningful signal is the difference between the true and false cases, not either response in isolation. Where no consistent boolean difference shows up, retry with a time-based payload and compare elapsed time against a per-target baseline measured from several ordinary requests, since network jitter alone can produce false positives if only a single baseline sample is used. A time-based result should be confirmed by repeating the same payload and requiring the delay to reproduce consistently before treating it as a finding, since a single slow response is exactly as likely to be a coincidental network hiccup as it is to be a genuine injection.

Tip: Testing tools that run these checks in parallel across every discovered endpoint can cut the time required substantially compared to fully manual testing, as long as they confirm findings with more than one signal to keep the false-positive rate down.

False-Positive Notes

  • A single slow response is not evidence of time-based injection on its own; confirmation requires the delay to reproduce across repeated identical requests, and ideally to scale proportionally when the requested delay value is changed.
  • Boolean-based differences need to be checked against unrelated control payloads too (values that shouldn't affect the query logic at all), since some endpoints legitimately return different content for reasons unrelated to injection, like caching, load balancing across backend instances with different data, or A/B testing.

How to Test

Manual Testing Methodology

Here is a systematic approach to identifying Blind SQL Injection vulnerabilities in a target application.

Step 1: Reconnaissance and Surface Mapping

Before testing, map all input vectors that could be affected. Identify parameters, headers, cookies, and request bodies that interact with the vulnerable component. A proxy such as Burp Suite or OWASP ZAP, paired with normal browsing of the target, is usually enough to build this list.

Step 2: Baseline Request

Send a legitimate request and record the normal response: status code, content length, response time, and any identifying tokens. This baseline matters because it's what you'll compare later responses against once payloads are involved.

Step 3: Payload Injection

Inject test payloads into each identified input vector one at a time. Start with benign detection payloads before escalating to anything that could actually trigger the vulnerability. For Blind SQL Injection specifically, Test boolean-based (OR 1=1 vs OR 1=2), time-based (SLEEP(5) / WAITFOR DELAY), and UNION-based payloads against every parameter, one at a time, and in a database-neutral form before switching to DBMS-specific syntax once the backend is fingerprinted.

Step 4: Response Analysis

Compare the response against your baseline, looking specifically for a differential response between the true and false boolean payloads, a reproducible delay proportional to the injected sleep value on a second independent trial, or a UNION result set that reflects extra columns back into the page — a single slow response is not enough on its own, since network jitter produces the same signal.

Step 5: Confirmation

Once a potential vulnerability is detected, confirm it with at least a few independent test cases to rule out coincidence. Document the exact request and response as proof. For Blind SQL Injection, a confirmed finding typically means showing that attacker-controlled input changes the application's behavior in a way that matters for security, not just that a payload was reflected somewhere harmless.

Real-World Impact

Real-World Impact

SQL injection remains one of the most damaging vulnerability classes in production systems. When exploited, attackers gain direct access to the underlying database, which opens the door to mass data exfiltration (customer records, credentials, financial data), privilege escalation to database administrator, and in some configurations, operating system command execution through xp_cmdshell on MSSQL or LOAD_FILE and INTO OUTFILE on MySQL.

In disclosed bug bounty reports, SQL injection findings consistently receive critical severity ratings, and the window of exploitation before a bug is even discovered often stretches to weeks or months, even though patches tend to follow quickly once a report lands.

Organizations affected by SQL injection also face regulatory consequences under frameworks like GDPR, CCPA, and PCI DSS, on top of the direct costs of incident response and customer notification.

Prevention & Remediation

Prevention and Secure Coding

Preventing Blind SQL Injection takes a defense-in-depth approach — no single control below is sufficient alone, but together they close off both the primary path and the most common bypasses.

Parameterized queries. Use parameterized queries or prepared statements as the primary control for every database call — never build SQL by concatenating or interpolating user input into a query string.

ORM query builders. Where an ORM is already in use, keep all query construction inside its builder API; a single raw-SQL escape hatch inside otherwise-safe code is a common source of the bug slipping back in.

Least-privilege database accounts. Run the application under a database account limited to exactly the tables and operations it needs — a successful injection against a read-only, single-schema account does far less damage than one against a shared admin login.

Stored procedures, reviewed. Stored procedures are not inherently safe; audit them for dynamic SQL built from parameters before treating them as a mitigation.

Defense in depth, not the primary control. Input validation and a WAF rule can catch obvious payloads, but treat them as a second layer — they are not a substitute for parameterization.

Frequently Asked Questions

What is Blind SQL Injection?
Blind SQL injection is the subset of SQL injection where the application is genuinely vulnerable, but the database's error messages and query results never make it back into the HTTP response.
How common is Blind SQL Injection in bug bounty reports?
Scanrub's research corpus for this playbook is built from 1 disclosed HackerOne report in this category, synthesized for detection and prevention guidance rather than reproduced verbatim.
How do I test for Blind SQL Injection?
Map every input vector, record a baseline response, then inject targeted test payloads one field at a time and compare the response for timing, length, error, or reflection differences from that baseline. The "How to Test" section above walks through the full methodology for this specific vulnerability class.
What is the single most effective fix for Blind SQL Injection?
Use parameterized queries or prepared statements for every database call — never build SQL by concatenating user input into a query string.
Weekly security research

New vulnerability playbooks, tool updates, and bug bounty insights - delivered to your inbox. No spam.

Unsubscribe anytime. We respect your inbox.
Press ⌘K to search×