What are the different types of SQL injections?
There are several main types of SQL injection.
- Injection based on errors: By inputting a malicious SQL statement to make the program return error messages or exceptions, allowing access to database structure or data.
- Blind injection: obtaining data by analyzing the program’s return results without needing specific error information.
- Time-based blind injection: determine the success of the injection by analyzing the time taken for the program to return results, in order to retrieve data.
- Stacked query injection: executing multiple SQL statements in a single request.
- Second injection: Using the results of the previous injection to carry out the next injection.
- Union-based injection: merging the results of two queries using the UNION keyword in an SQL statement.
- Injection through stored procedures: Injection is achieved by modifying the parameters within stored procedures.
- Injecting through error logs: Obtaining data by triggering errors and looking at the information in the error logs.
- Injecting through error messages: gaining access to data by creating malicious SQL statements that trigger database errors.
- Boolean-based blind injection: Retrieving data by determining truth or falsehood.