{"id":4882,"date":"2020-01-04T22:38:32","date_gmt":"2020-01-04T19:38:32","guid":{"rendered":"https:\/\/kifarunix.com\/?p=4882"},"modified":"2024-03-13T07:48:08","modified_gmt":"2024-03-13T04:48:08","slug":"install-and-setup-dvwa-on-centos-8","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-and-setup-dvwa-on-centos-8\/","title":{"rendered":"Install and Setup DVWA on CentOS 8"},"content":{"rendered":"\n

In this guide, we are going to learn how to install and Setup DVWA on CentOS 8. As you already know, DVWA, an acronym for Damn Vulnerable Web Application<\/a> is a very vulnerable PHP\/MySQL web application designed to help security professionals, students, web application developers to test their security skills, learn web application security and understand web application security processes respectively.<\/p>\n\n\n\n

Installing DVWA on CentOS 8<\/h2>\n\n\n\n

Update system packages<\/h3>\n\n\n\n

To begin with, ensure that your system packages are up-to-date<\/p>\n\n\n\n

dnf update<\/code><\/pre>\n\n\n\n

Install LAMP Stack on CentOS 8<\/h3>\n\n\n\n

Since DVWA is web application, you basically need to have a LAMP stack installed before setting DVWA. Follow the link below to learn how to install LAMP stack on CentOS 8.<\/p>\n\n\n\n

How to Install LAMP Stack on CentOS 8<\/a><\/p>\n\n\n\n

Create DVWA Database and Database User<\/h3>\n\n\n\n

After you have installed LAMP stack, proceed to create DVWA database and database user.<\/p>\n\n\n\n

mysql -u root -p<\/code><\/pre>\n\n\n\n

Create DVWA database. You can use any database name.<\/p>\n\n\n\n

create database dvwadb;<\/code><\/pre>\n\n\n\n

Create DVWA database user with all the privileges assigned on the DVWA db. Again replace the user and the password accordingly.<\/p>\n\n\n\n

grant all on dvwadb.* to dvwamgr<\/strong>@localhost identified by 'mypassword<\/strong>';<\/code><\/pre>\n\n\n\n

Reload the privileges table and exit the database.<\/p>\n\n\n\n

flush privileges;<\/code><\/pre>\n\n\n\n
quit<\/code><\/pre>\n\n\n\n

Configure PHP for DVWA<\/h3>\n\n\n\n

Install other required PHP-GD module.<\/p>\n\n\n\n

dnf install php-gd<\/code><\/pre>\n\n\n\n

PHP 7.2 is used in this demo.<\/p>\n\n\n\n

php -v<\/code><\/pre>\n\n\n\n
PHP 7.2.11 (cli) (built: Oct  9 2018 15:09:36) ( NTS )\nCopyright (c) 1997-2018 The PHP Group\nZend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies<\/code><\/pre>\n\n\n\n

Proceed to edit php.ini<\/strong><\/code><\/strong> and make the following changes.<\/p>\n\n\n\n

vim \/etc\/php.ini<\/code><\/pre>\n\n\n\n