Skip to content

Build DVWA application for pen testing using Docker and CentOS

Notifications You must be signed in to change notification settings

f1nl0wt3ch/dvwa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STEP BY STEP TO SETUP DVWA IN DOCKER FOR PEN TESTING

Description

  • This project is created to help people to easily launch the DVWA application in Docker to improve their pentest skills.

References

Date

  • Created: Mon 11/4/2022
  • Release: Tue 12/4/2022

Technologies

  • Docker, CentOS, Apache, MariaDB, PHP, Web Application, Pentesting.

Configuration

  • docker build -t f1nl0wt3ch/dvwa-on-centos -f Dockerfile . build an image and give it a name as dvwa and version as v1 from Dockerfile. If you don't want to cache the build, please add more argument like this --no-cache=true.
  • docker images check if the image was created or not by listing all images locally.
  • docker run --name f1nl0wt3ch -p 1234:80 -t -i f1nl0wt3ch/dvwa-on-centos run a container from the image.
  • docker exec -it f1nl0wt3ch /bin/bash enter the container.

Docker Hub Install

  • docker search dvwa-on-centos search images with dvwa keyword.
  • docker pull f1nl0wt3ch/dvwa-on-centos pull the image from Docker Hub.

Screenshot

dvwa.png

Troubleshooting

  • /usr/bin/systemctl: line 4: from: command not found install these packages yum install -y systemd initscripts
  • Failed to get D-Bus connection: Operation not permitted replace /usr/bin/systemctl with systemctl.py and run RUN chmod a+x /usr/bin/systemctl
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) server wasn't not yet started. Use systemctl start mariadb to start server.
  • Could not reliably determine the server's fully qualified domain name
sudo vim /etc/httpd/conf/httpd.conf
Insert the following line at the httpd.conf: ServerName localhost:80
  • Could not connect to the database service. Please check the config file. Database Error #2003: Can't connect to MySQL server on '127.0.0.1' (111). this means database service wasn't started. Access to the container docker start && docker exec -it bash in case the container is stopped and execute sudo systemctl restart mariadb.

Author

  • Thinh Dinh
  • Software Developer at OP Finance Group

Copyright

About

Build DVWA application for pen testing using Docker and CentOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages