-->

How to install DVWA on Kali Linux 2020.2 | Damn vulnerable Web Application

How to Install and configure Damn vulnerable web app(DVWA).
Note:This trick is only for Educational purposes only and never misuse this trick for illegal purposes 
Where DVMA is a awesome tool is supported on kali linux used for Pentesting Purposes.
DVWA Stands Damn vulnerable web app .You can use this tool to Practise your Ethical Hacking Skills on your Personal Computer. 


According to name of the tool DVWA means vulnerable which is used for Pentesting Purposes mainly for Xss Cross scripting, Sql Injection, remote file Transfer,Sniffers,bruteforce etc.You need not to Setup any Virtual machine on your Pc to test your Ethical hacking skills for Purposes like Bug Bounting and Pentesting .Lets follow this tricky way to install dvma 
Step1:install Kali Linux Software
Step2: Now download 
Step3: Apache web server(already available In Kali Linux)

where the downloaded dvma file in zip format you have to unzip it by this way.
now open the directory where dvma zip file is available.check the path of the file. Where i downloaded file in Computer  folder so i type this cd captainsmac command in terminal
if your file in download folder type
tap enter.
Now type command ls
now we have to unzip DVWA file 
then enter this command in terminal
root@seven:~/Desktop# unzip DVWA-1.9.zip
Now type command ls and hit enter 
then downloaded dvma file in zip format will becomes unzipped.

For Further process we need 2 servers Apache and MySql



First of all we start Apache web server enter this command commandroot@seven:~# service apache2 start
now lets checkout whether apache2 server is working or not whether it is running or not enter this command 
root@seven:~# service apache2 status
Now it shows that apache2 is up and running which is highlighted with text (Active and running).

now enter this command inyour terminal to start MySql Server
root@seven:~#  service mysql start
now lets checkout whether mysql server is working or not whether it is running or not enter this command
root@seven:~# service mysql status
it shows with highlighted green texts.Now we need to move total directory (DVWA-1.9) to the /var/www/html because in kali linux 2.0 default server for web pages in apache is /var/www but in this case it is going to be /var/www/html .

So we need to move our extracted directory DVWA-1.9 to /var/www/html directory
now copy the dvwa file and paste to html directory.Or do this command in linux terminal.




The command willl complete 2 tasks
where it moves to this directory /var/www/html.

it also rename DVWA-1.9 to dvwa reason for renaming is that it is easy to remember.later we could type on browser.

You must show path of directory as DVWA-1.9 to execute this command
root@seven:~/Desktop# mv DVWA-1.9 /var/www/html/dvwa
Now we need to give permissions to read,write and execute dwva directory.

your present working directory must be /var/www/html.So change your directory to html first with following command:

root@seven:~# cd /var/www/html
now type this command to give read , write and execute permission to dvwa


root@seven:/var/www/html# chmod -R 755 dvwa

Now we need to configure config.inc.php file which is present inside config directory.So change directory to config directory.
root@seven:/var/www/html# cd dvwa/config

now Open config.inc. file in nano editor with the following command:
nano config.inc.php
Remove  the default username and password field leave it blank. press ctrl+o to Save and ctrl+x to exit.

now we have to create password for root user enter this command.Make sure that you are inside the same directory as me(config).When you are asked to enter password just tap enter leave password as blank
root@seven:/var/www/html/dwva/config# mysql-u root -p
When this command executed successfully you will be displayed with mysql shell. 
Now we need to create another database.enter this command
create database dvwa1;
you can Type exit to back mysql shell.
Now we need to reset our database on our local server.Do it properly else your pc becomes panic conditions so copy below command .


curl --data  'create db=create+%2F+Reset+Database' http://127.0.0.1/dvwa/setup.php# --cookie PHPESSID=1

Now go to the browser and paste this url:http://localhost/dvwa/login.php

enter it in linux terminal tap enter 
Now go open web browser and paste this url:http://localhost/dvwa/login.php
If you do all these steps correctly then a login page should open.If you are not then i suggest go back do it from the scratch.Use these credentials to login:
Username:Admin
Password:password

Also Read

Post a Comment