Git Product home page Git Product logo

dvwa_hacking_lab's Introduction

Creating your Very First Local Ethical Hacking Lab with Damn Vulnerable Web Application


image

DVWA is made with PHP and MySQL for security professionals or aspiring security professionals to discover as many issues as possible and exploit some of the most common vulnerabilities of web platforms like SQL injection, Cross Site Scripting (XSS), Cross Site Request Forgery (CSRF), and more.

DVWA Preconfiguration

Note: This guide is for beginners. If you’re unable to complete any of the steps or encounter any error message during the installation. I encourage you to use StackOverflow for an answer.

Prerequisites

  • Hypervisor: VirtualBox

  • Linux Distro: Kali Linux (preferably) or any other linux-based distro.

  • IMPORTANT : we need to use a virtual machine and not a connected server because DVWA is really vulnerable and should only be installed on your virtual machine with NAT.

Upgrading the System

Because DVWA is an open-source project, it's constantly being updated and improved. That's why we need to make sure that our system is up-to-date. We just need to run the following commands:

$ sudo apt update && sudo apt upgrade -y

Configuring our Web Server (in our case Apache2)

To install apache2, we just need to run the following command:

$ sudo apt install apache2

To test it out, we just need to start it.

$ sudo systemctl start apache2

Now we just need to access http://127.0.0.1.

image

Setting up DVWA

image

In this step we need to get the container from DockerHub.

Installing Docker

The easiest way to get the DVWA working is through a ready-to-use Docker Container and for that we need to have Docker Engine Installed. We just need to run the following command:

$ sudo apt install docker.io -y

Getting the DVWA Docker Container

We just need to use docker pull to get the container.

$ docker pull vulnerables/web-dvwa

Running the Docker Image

The best thing when it comes to Docker, is that with just a simple command we can run the container.

11

$ docker run --rm -it -p 80:80 vulnerables/web-dvwa

Accessing the Damn Vulnerable Web Application Platform

Now after running the Docker image, we have a ready-to-use DVWA Platform via our localhost. We just have to access http://localhost/login.php.

Accessing the Platform from the Docker Host (in our case the VM)

image

We just have to access http://localhost/login.php.

Accessing the Platform from the Any Network Host

This is somewhat of the trickiest part in the guide. We need to make sure that:

  • The Virtual Machine's Network mode is on Bridged so that it can be accesible from the Host machine.
  • Making sure that we're connected to a network so that it can have an IP (even if we don't have Internet)

In our case, our machine's IP is

  • IP: 192.168.1.156

We just have to access the http://192.168.1.156.

image

Epilogue

I advise you to take your time with the Low difficulty and working your way up from there. I also found an interesting repo made by @keewenaw.

dvwa_hacking_lab's People

Contributors

videxrealone avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.