Out-of-Band SQL Injection
What you'll learn: How attackers exfiltrate database information through alternative communication channels when traditional SQL injection responses aren't visible.
The Core Problem
You've learned Boolean-based and Time-based blind SQL injection—techniques for extracting data when the application doesn't directly show database errors or results. But what if even those techniques fail? What if the application doesn't respond differently to true/false conditions, or the server blocks time delays?
Out-of-Band (OOB) SQL Injection solves this by making the database server send data through a completely different channel—typically DNS lookups or HTTP requests to an attacker-controlled server.
How It Works
Think of it like passing notes in class when talking is forbidden. Instead of whispering (in-band response), you toss a note out the window to a friend waiting outside (out-of-band channel).
The attacker crafts SQL that forces the database to:
- Make a DNS query containing stolen data in the hostname
- Send an HTTP request to the attacker's server with data in the URL
For example, on Microsoft SQL Server, an attacker might inject code that triggers the database to resolve a hostname like stolen-password-abc123.attacker.com. The attacker monitors their DNS server logs and extracts "abc123" as part of the password.
When OOB Is Necessary
- Application shows no visible response differences (Boolean-based fails)
- Time delays are blocked or unreliable (Time-based fails)
- Responses are asynchronous (query runs but response never reaches user)
- The attacker needs fast, reliable exfiltration
Key Takeaway: Out-of-Band SQL Injection bypasses in-application detection by exfiltrating data through DNS queries or HTTP requests to attacker-controlled infrastructure—useful when traditional injection response channels are unavailable or blocked.