Deploy dvwa Vulnerability Testing Platform on Kali
1. Obtain and decompress the dvwa installation package
2. grant permissions to the dvwa folder
3. Configure the MySQL database
4. Start apache2 and MySQL services
5. Configure dvwa on the webpage
6. log on to dvwa
1. Obtain and decompress the dvwa installation package
1. Obtain the dvwa package from GitHub:
wget https://github.com/ethicalhack3r/DVWA/archive/master.zip
2. decompress and release the package to the specified folder/var/www/html.
unzip -o -d /var/www/html master.zip
3. Enter the/var/www/html folder and rename the decompressed folder dvwa-master to dvwa.
2. grant permissions to the dvwa folder
Stop The apache2 service first, just in case, enter:
service apache2 stop
Grant the 755 permission to the dvwa folder, and then enter:
chmod -R 755 /var/www/html/dvwa
Grant the 755 permission to the file in the dvwa folder, and then enter:
cd /var/www/html/dvwa/chmod 755 hackable/uploads/chmod 755 external/phpids/0.6/lib/IDS/tmp/phpids_log.txtchmod 755 config/
3. Configure the MySQL database
Kali2018 is the mariadb database by default. It is not mysql and cannot be configured according to MySQL. Otherwise, an error is reported.
Start the MySQL service and enter the following command on the terminal:
service mysql start
Run the following command to connect to MySQL. The default value is mariadb.
Note that the password to be entered is empty by default. Skip enter.
mysql -uroot -p
Enter MySQL and change the password of MySQLPassword
use mysqlupdate user set password=PASSWORD(‘password‘) where User=‘root‘;
Run the following command line by line:
create user dvwa;grant all on dvwa.* to [email protected] identified by ‘password‘;flush privileges;grant all on dvwa.* to ‘dvwa‘@‘%‘;flush privileges;
exit;
Modify configuration file
vi /var/www/html/dvwa/config/config.inc.php
Modify the internal database link configuration. According to the previous settings, the user name is dvwa and the password is password.
Change the following content to dvwa and password.
‘db_user‘ = ‘dvwa‘;‘db_password‘ = ‘password‘;
4. Start apache2 and MySQL services
Run the command line to start apache2 and MySQL services.
service apache2 startservice mysql start
5. Configure dvwa on the webpage
Open the Kaili browser and enter localhost/dvwa in the address bar to go to the following page:
Click Create/Reset database to configure the dvwa database.
Successful page:
Failed page: (check the database configuration and configuration in the config file)
6. log on to dvwa
The default username and password are admin/password.
Successfully logged on to the target
Deploy dvwa Vulnerability Testing Platform on Kali