User Tools

Site Tools


public:dvwa

Install Damn Vulnerable Web Application under Ubuntu 12.04

This short how-to will guide you through the installation process of DVWA on Ubuntu 12.04 LTS

Prerequisites

Install a Virtual Machine with Ubuntu 12.04 LTS Server. Next install the additional software packages below.

Ubuntu Software Packages:

sudo apt-get install php5 php5-common php5-cli php5-mysql libapache2-mod-php5 mysql-server php5-mysql apache2 libapache2-mod-php5 firefox

Give the mysql superuser root the password: toor

root@stesting:~# dpkg -l  | grep php5
ii  libapache2-mod-php5              5.3.10-1ubuntu3.6                   server-side, HTML-embedded scripting language (Apache 2 module)
ii  php5                             5.3.10-1ubuntu3.6                   server-side, HTML-embedded scripting language (metapackage)
ii  php5-cli                         5.3.10-1ubuntu3.6                   command-line interpreter for the php5 scripting language
ii  php5-common                      5.3.10-1ubuntu3.6                   Common files for packages built from the php5 source
ii  php5-mysql                       5.3.10-1ubuntu3.6                   MySQL module for php5
root@stesting:~# dpkg -l  | grep mysql
ii  libdbd-mysql-perl                4.020-1build2                       Perl5 database interface to the MySQL database
ii  libmysqlclient18                 5.5.29-0ubuntu0.12.04.2             MySQL database client library
ii  mysql-client-5.5                 5.5.29-0ubuntu0.12.04.2             MySQL database client binaries
ii  mysql-client-core-5.5            5.5.29-0ubuntu0.12.04.2             MySQL database core client binaries
ii  mysql-common                     5.5.29-0ubuntu0.12.04.2             MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-server                     5.5.29-0ubuntu0.12.04.2             MySQL database server (metapackage depending on the latest version)
ii  mysql-server-5.5                 5.5.29-0ubuntu0.12.04.2             MySQL database server binaries and system database setup
ii  mysql-server-core-5.5            5.5.29-0ubuntu0.12.04.2             MySQL database server binaries
ii  php5-mysql                       5.3.10-1ubuntu3.6                   MySQL module for php5
root@stesting:~# dpkg -l  | grep apache2
ii  apache2                          2.2.22-1ubuntu1.3                   Apache HTTP Server metapackage
ii  apache2-mpm-prefork              2.2.22-1ubuntu1.3                   Apache HTTP Server - traditional non-threaded model
ii  apache2-utils                    2.2.22-1ubuntu1.3                   utility programs for webservers
ii  apache2.2-bin                    2.2.22-1ubuntu1.3                   Apache HTTP Server common binary files
ii  apache2.2-common                 2.2.22-1ubuntu1.3                   Apache HTTP Server common files
ii  libapache2-mod-php5              5.3.10-1ubuntu3.6                   server-side, HTML-embedded scripting language (Apache 2 module)

Login into the newly created VM and download this script:

ssh -Y <username>@newly-created-vm.inf.unibz.it

-Y is important to allow for graphical window (firefox) to open

dvwa-installer.sh

Now stop the apache2 and mysql service

service apache2 stop
service mysql stop

Now you are ready to execute the dvwa-installer.sh script

./dvwa-installer.sh

This will download the DVWA Program, set it up and open firefox to create/reset the Database.

/data/www/wiki.inf.unibz.it/data/pages/public/dvwa.txt · Last modified: 2019/01/16 10:03 by 127.0.0.1