Concept
Classification of SQL Injection
SQL injection can be classified into four broad categories based on how the injected SQL interacts with the application and how the attacker receives or observes the results:
1. In-Band SQL Injection — The attacker uses the same communication channel to inject the SQL and receive the results. It includes UNION-Based and Error-Based SQL Injection.
2. Blind SQL Injection — The application does not directly return the results of the injected query. Instead, the attacker infers information from differences in the application's behavior. It includes Boolean-Based and Time-Based Blind SQL Injection.
3. Out-of-Band SQL Injection — The attacker obtains information through a separate communication channel from the application's normal response, when the database environment supports such interactions.
4. Second-Order SQL Injection — Malicious input is initially stored by the application and is later retrieved and used in an unsafe SQL query, causing the injection at a later stage.