Damn Vulnerable Web Application (DVWA) - installation 2018
for anyone trying today to install DVWA, thing changed a little, took me a while to get it working, so here it is:
IMPORTANT - su if you are not root user (i.e. not kali)
1. download the latest version
to get it working with MariaDB and PHP v7.x
wget https://github.com/ethicalhack3r/DVWA/archive/master.zip && unzip master.zip
unzip under /var/www/html, rename folder to dvwa
2. config file
cd /var/www/html/dvwa/config
cp config.inc.php.dist config.inc.php
gedit config.inc.php
create captcha keys
https://www.google.com/recaptcha/intro/index.html
and set in $_DVWA[ 'recaptcha_public/private_key' ]
start at low difficulty
$_DVWA[ 'default_security_level' ] = 'low';
3. set user in MariaDB
sudo service mysql start
mysql -u root -p
db commands...
mysql > create database dvwa;
mysql > CREATE USER dvwa@localhost IDENTIFIED BY 'p@ssw0rd';
mysql > grant all on dvwa.* to dvwa@localhost;
mysql > flush privileges;
mysql > exit
4. enable file inclusion
gedit /etc/php/7.2/apache2/php.ini
find and set
allow_url_fopen = On
allow_url_include = On
5. copy files to "root" folder
cp -a /var/www/html/dvwa/dvwa/. /var/www/html/dvwa/
the end is just a new beginning
service apache2 restart && service mysql restart
exit if you are in su and
firefox 127.0.0.1/dvwa/setup.php
i added to my .bashrc the following to run dwva from terminal easy
echo "type 'dvwa' to init and open dvwa"
alias dvwa='sudo service apache2 restart && sudo service mysql restart && firefox 127.0.0.1/dvwa'
BONUS
if you are annoyed loke me for the help/source buttons opening in popups and not in new tabs:
sudo gedit /var/www/html/dvwa/js/add_event_listeners.js
and change (twice)
popUp(url);
to
window.open(url);
IMPORTANT - su if you are not root user (i.e. not kali)
1. download the latest version
to get it working with MariaDB and PHP v7.x
wget https://github.com/ethicalhack3r/DVWA/archive/master.zip && unzip master.zip
unzip under /var/www/html, rename folder to dvwa
2. config file
cd /var/www/html/dvwa/config
cp config.inc.php.dist config.inc.php
gedit config.inc.php
create captcha keys
https://www.google.com/recaptcha/intro/index.html
and set in $_DVWA[ 'recaptcha_public/private_key' ]
start at low difficulty
$_DVWA[ 'default_security_level' ] = 'low';
you need to clean cookies if the dvwa was running
3. set user in MariaDB
sudo service mysql start
mysql -u root -p
db commands...
mysql > create database dvwa;
mysql > CREATE USER dvwa@localhost IDENTIFIED BY 'p@ssw0rd';
mysql > grant all on dvwa.* to dvwa@localhost;
mysql > flush privileges;
mysql > exit
4. enable file inclusion
gedit /etc/php/7.2/apache2/php.ini
find and set
allow_url_fopen = On
allow_url_include = On
5. copy files to "root" folder
cp -a /var/www/html/dvwa/dvwa/. /var/www/html/dvwa/
the end is just a new beginning
service apache2 restart && service mysql restart
exit if you are in su and
firefox 127.0.0.1/dvwa/setup.php
i added to my .bashrc the following to run dwva from terminal easy
echo "type 'dvwa' to init and open dvwa"
alias dvwa='sudo service apache2 restart && sudo service mysql restart && firefox 127.0.0.1/dvwa'
BONUS
if you are annoyed loke me for the help/source buttons opening in popups and not in new tabs:
sudo gedit /var/www/html/dvwa/js/add_event_listeners.js
and change (twice)
popUp(url);
to
window.open(url);
Comments
Post a Comment