Step by step basic SQL Injection
We saw in Chapter 4, Finding Vulnerabilities, how to detect an SQL Injection. In this recipe, we will exploit an injection and use it to extract information from the database.
How to do it...
- We already know that DVWA is vulnerable to SQL Injection, so let's login using OWASP-Mantra and go to
- After detecting that an SQLi exists, the next step is to get to know the query, more precisely, the number of columns its result has. Enter any number in the ID box and click Submit.
- Now, open the HackBar (hit F9) and click Load URL. The URL in the address bar should now appear in the HackBar.
- In the HackBar, we replace the value of the
idparameter with 1' order by 1 -- ' and click ...