Home / Learn Secure SQL / Classic (In-Band) SQL Injection, Explained
Classic (In-Band) SQL Injection, Explained
The most direct form: the result comes back in the same response.
The idea, explained simply
The basic idea
In-band SQL injection is the category where the altered query's result is visible directly in the application's normal response — for example, extra rows appearing in a list, or a login succeeding when it should not. It is called "in-band" because the attacker observes the effect through the same channel the application normally uses to answer requests.
Why this comes up
Understanding this category first builds the mental model for every other variant covered in this lesson group: a boundary meant to separate code from data was not enforced, and the consequence surfaces somewhere the attacker can directly observe.
The mechanics
When reviewing a reported injection finding, first ask whether the impact was observed in-band (in the response itself) or required one of the indirect techniques covered in the following lessons, since that shapes how severe and how easy to detect the issue is.
Where it is used
- Web application code review
- Backend development
- Database administration
// This shape is what closes every variant covered in this lesson group,
// regardless of how the altered structure would have been triggered:
db.execute("SELECT * FROM accounts WHERE username = ?", [username]);
// The placeholder and the value travel to the database separately.
// Whatever the value contains, it is never parsed as part of the command.| Term | Meaning |
|---|---|
| In-band | The effect is observable through the application's normal response channel |
| Out-of-band | The effect is observed through a separate channel (covered later in this group) |
| Blind | No direct result is visible at all; only an indirect signal (covered later in this group) |
Quick check
1. "In-band" SQL injection means the effect is observed...
In-band = visible in the same response channel.