Detecting SQL injection issues
In this section, we're going to learn how to detect SQL injections and how to alternate this in Python. We're going to look at what the different methods for detecting an SQLi in a web application are. Then, we'll proceed to automate the detection of these issues based on one of the methods. Finally, we'll enumerate the columns used in the query and also identify valid column names in the table.
Methods for detecting SQLi
In order to detect SQLi, we have three methods available:
- Error based: This method injects payloads that break out of the original query and generate an SQL error on the server, which can be detected in the content of the returned pages:

- Boolean: This method injects payloads that alter the outcome of the original query, which makes the application return different page content. Basically, we'll identify the size of a valid page versus the size of an invalid page, and then we perform Boolean queries like the one we can see here:

If the first number...