Web vulnerabilities and exploitation
In the previous section, we learned how we can perform web vulnerability scanning; let’s now focus on how we exploit common vulnerabilities and compromise web servers, web applications, databases, user sessions, and so on.
SQL injection
SQL injection is a common and important web application vulnerability that allows an attacker to interact with a backend database through SQL queries. These SQL queries are used to retrieve user data in form of rows and columns.
So, let’s demonstrate how we can compromise a login page via SQL injection:
- Enter the
1'or'1'='1
query in the Name and Password fields of the login page, as shown in the following screenshot:
Now, as shown in Figure 14.14, the SQL login query is entered in the username and password field.
- The following screenshot shows that the login page is exploited...