1.Boot up your Ubuntu.
- sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade.
2.Access your Ubuntu
- Now you must to access your Ubuntu server via SSH from your host machine,because we have no graphic on Ubuntu Server.
- ssh username@ubuntu-server-ipaddress (somethings such like this: ssh dvwa@192.168.1.25)
- if it ask Are you sure you want to continue connecting (yes/no)?
- just yes
- then you must enter Ubuntu Server password
- Done!!!
3.Download DVWA to /var/www/html.
- Install apache2 on Ubuntu that make you can move to /var/www/html
- sudo -s
- apt-get install apache2
- cd /var/www/html
- apt-get install git
- git clone https://github.com/ethicalhack3r/DVWA.git
- mv DVWA-master dvwa
4.Start apache2 service and access DVWA.
- service apache2 start
5.Install PHP.
- apt-get install libapache2-mod-php7.0 libapache2-mod-fastcgi php7.0-fpm php7.0 php-mysql php7.0-mbstring
6.Edit PHP function.
- vim /etc/php/7.0/apache2/php.ini
- Find and edit this line allow_url_include = Off -> Change Off to On
7.Install PHP modules gd.
- apt-get install php7.0-gd
8.Edit MySQL password you have set before.
- vim /var/www/html/dvwa/config/config.inc.php
- find this line $_DVWA[ 'db_password' ] = 'p@ssw0rd';
and replace “p@ssw0rd” with your MySQL password.
9.Give the write permission to folder and file.
- chmod 777 /var/www/html/dvwa/
10.Create DVWA database.
- mysql -u root -p
- Enter your mysql password
- create database dvwa;
- exit
11.Restart apache2 and access to DVWA
- Open browser and type localhost(127.0.0.1)/dvwa/
- scrolling down and find the button Create / Reset Database
- service apache2 restart
12.Reload and enjoy.
- Press F5 in your browser.
- Now you can login
- username: admin
- password: password

great tutorial, there are many out there, and this one was about as smooth as it gets. Just follow the instructions and you'll have your own little web hack-lab in about 10 minutes.
ReplyDeleteThanks
ReplyDelete