Testing SQL injection vulnerability
Testing SQL injection vulnerability
Lab 1 Assignment.
Step 1: Power up the metasploitable and the kali virtual machines and login with the default
password on both. Use the ‘ifconfig command’ to get the ip address of the metasploitable
machine.
Plugins:
Apache server
HTTP server
Php version5.2.4-2ubuntu5.10
Interesting findings:
Oudated technologies and plugins. This makes the ever vulnerable to cross site scripting, sql
injection, remote code execution and denial of service.
Task 2: SQL Injection on DVWA Login Form
Try to perform a basic SQL injection like fetching the users table concatenating the SQL
statement with an always true condition.
SELECT * FROM users where userid = 1’ OR ‘1 == 1’
The injected code has returned the list of users with id ‘1’, the admin users. The credentials
can be used to carry out further extraction on the database.
Step 1: Scan the target URL using the sqlmap -u command to check for the presence of SQLi
vulnerability. The cookie is retrieved from the developer option of the web browser.
The result shows there is sql injection vulnerability in the web application. Next the database
will be triggered to reveal the tables.
Unfortunately no tables were found for dvwa.
Comparing the sqlmap and the manual SQLi, I feel more comfortable with the manual
methodsnce I am pretty sure of theexistence of at least users table yet nothing was fetched/
The result shows the sight might not be injectible, however there is an option to use –tamper .
Let’s try that and see the result