This project features some of my practical web application security testing on Damn Vulnerable Web Application (DVWA)
DVWA is a PHP/MySQL web application specifically designed for learning and practicing web security
- Kali Linux (or any Linux-based OS, preferably installed on a virtual machine)
- Apache Web Server
- PHP version 7.x or above (with php-mysql, php-gd, php-xml, php-mbstring modules enabled)
- MySQL/ MariaDB Database Server to store DVWA data
- Optional Tools: Burp Suite, sqlmap, Nmap, OWASP ZAP
- Install Apache, PHP, Mariadb:
sudo apt update && sudo apt upgrade -y
sudo apt install apache2 mariadb-server php php-mysql php-gd php-xml php-mbstring -y
- Clone the DVWA repository:
cd /var/www/html
sudo git clone https://github.com/digininja/DVWA.git
sudo chmod -R 755 DVWA
- Configure the Database setting:
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mysql -u root -p
- Create the dvwa database and user:
CREATE DATABASE dvwa;
CREATE USER 'dvwauser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dvwa.* TO 'dvwauser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
- Configure DVWA:
cd /var/www/html/DVWA/config
sudo cp config.inc.php.dist config.inc.php
sudo nano config.inc.php
- Update the following values:
$_DVWA['db_user'] = 'dvwauser';
$_DVWA['db_password'] = 'password';
$_DVWA['db_database'] = 'dvwa';
- Save and exit the config file:
Ctrl + O, Enter
Ctrl + X
- Start Apache Server:
sudo systemctl start apache2
sudo systemctl enable apache2
- Access DVWA in the browser:
http://localhost/DVWA
- Log in with the default credentials:
Username: admin
Password: password
- SQL Injection
- Command Injection
- JavaScript Attack
- File Upload Vulnerability
- Weak Session ID
- S. S. Teja Modalavalasa (Myself)