Install DVWA in Kali Linux


Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is damn vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, help web developers better understand the processes of securing web applications and aid teachers/students to teach/learn web application security in a class room environment.It is a best platform to practice web application hacking and security.

This is Our New Updated Tutorial on DVWA. You can find out our old DVWA Tutorial Here

1. Download DVWA : Click Here
(Click image for large view)

2. Downloaded Zip File

3. Unzip download file

4. Go to DVWA -1.0.8 → DVWA -1.0.8 and Rename DVWA -1.0.8 to dvwa then copy "dvwa" folder. We will paste this folder in our Kali Linux OS. If your Host OS is not shared with your Guest OS then you can use a Pendrive for moving this folder. (If your folder has different name then rename it as dvwa)

5. In Kali Linux Go to Computer → File system → var → www then Paste dvwa folder. Please be sure your folder path is same as mine and Folder name should be also same.


6. Set permission of dvwa into 755. Open Terminal and type
chmod -R 755 /var/www/dvwa and Press enter

7. Run Apache, Go to Application → Kali Linux → System Service → HTTP → apache2start

8. Apache run successfully

9. Run My SQL, Go to Application → Kali Linux → System Service → MySQL → mysql start

10. My SQL run successfully

11. Now Create Database for dvwa
→ Open Terminal  
→ type mysql –u root –p  and Press enter
→ when it ask for Password leave it blank and simply Press enter
→ now type create database dvwa; and Press enter
→ Type exit and Press enter

12. Open Your Internet Browser and Write 127.0.0.1/dvwa in your web address then Press Enter. There you will see an error unable to connect to the database mysql_error ( ). May be this error will be fix by developer within next update. Well Now time to Setup Database.

13. Click on Create/Reset Database

14. Still getting Error Could not connect to the database - please check the config file.

15. For Fixing these errors Go to Computer → File system → var → www → dvwa → config → config.inc.php. Open config.inc.php with text editor (leafpad) then find db_password and remove P@ssword for the line and save it.

16. Open Your Internet Browser and Write 127.0.0.1/dvwa in your web address then Press Enter. There you will see your login page. Write Username - admin and Password - password then Click on Login.

17. We got one more error. - Table 'dvwa_users' doesn't exist

18. Open Your Internet Browser and Write 127.0.0.1/dvwa/setup.php in your web address then Press Enter. You will see your dvwa database setup page. Click on Create/Reset Database after clicking on Create/Reset database button you will get setup successful message.

19. Open Your Internet Browser and Write 127.0.0.1/dvwa in your web address then Press Enter. There you will see your login page. Write Username - admin and Password - password then Click on Login.

20. You have logged in as Admin.
(Click image for large view)
Note - You have to repeat Step 7 - Step 10 each time whenever you will restart your Kali Linux only then 127.0.0.1/dvwa will be work in your browser. 


Like it ? Share it.