Time-based SQL Injection: This technique involves causing the database to delay its response, allowing the attacker to infer information based on the response time. By injecting malicious SQL code that includes time-delay functions (such as WAITFOR DELAY in Microsoft SQL Server or SLEEP() in MySQL), the attacker can observe whether the web application's response time changes, indicating a successful injection.
Union-based SQL Injection: This technique involves exploiting a vulnerability in the SQL query to manipulate the structure of the query and retrieve data from other database tables. The attacker uses the UNION SQL operator to combine the results of their malicious query with the original query, extracting data from different tables and columns. The attacker can use boolean conditions to test whether certain conditions are true or false.