Boolean-Based Blind SQL Injection
You'll learn: How attackers extract hidden database information one bit at a time by triggering true/false responses in the application.
The Core Idea
In Boolean-Based Blind SQL Injection, you can't see database errors or direct query results—but you can observe whether the application behaves differently based on whether your injected condition is true or false. Think of it like playing "20 Questions": you ask yes/no questions and piece together the answer from the responses.
When you inject a condition like ' AND 1=1--, the page might load normally (true condition). When you inject ' AND 1=2--, the page might show no results or change slightly (false condition). This behavioral difference becomes your communication channel.
Extracting Data Bit by Bit
To extract actual data, attackers use conditional SQL functions. For example, to guess the first character of a database username:
Conceptual approach:
- Inject:
' AND SUBSTRING(username,1,1)='a'--→ Page loads normally? Then first char is 'a' - Inject:
' AND SUBSTRING(username,1,1)='b'--→ Page acts differently? Not 'b', keep guessing - Repeat for each character, each table, each column
This is extremely slow—extracting one byte might take up to 256 guesses (or ~7 guesses using binary search). But when you can't see error messages or use UNION attacks, it's often your only option.
Why It's "Blind"
You never see the database response directly. You only observe the application's behavioral changes—perhaps content appears or disappears, response times differ, or HTTP status codes change. The injection is "blind" but the true/false logic gives you sight.
Key Takeaway: Boolean-Based Blind SQL Injection extracts data by asking yes/no questions through injected SQL conditions and observing application behavior changes—slow but effective when direct database output isn't visible.