Skip to content

adarsh-bimal/docklab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ DockLab

Spin up a complete, isolated cybersecurity lab with a single command.

DockLab is a Go-based CLI that automatically deploys a vulnerable penetration testing environment using Docker. It creates a dedicated Docker network, launches multiple intentionally vulnerable applications, and provides a pre-configured penetration testing container so you can start hacking immediately.

Perfect for:

  • πŸŽ“ Cybersecurity students
  • 🏴 CTF practice
  • πŸ” Pentesting labs
  • πŸ‘¨β€πŸ« Security training
  • πŸ§ͺ Safe exploit testing

Features

  • βœ… One-command lab deployment
  • βœ… Automatic Docker network creation
  • βœ… Preconfigured penetration testing toolkit
  • βœ… Multiple vulnerable targets
  • βœ… Interactive shell into the toolkit container
  • βœ… Automatic cleanup
  • βœ… Cross-platform (Linux, macOS, Windows with Docker)

Included Containers

Container Purpose
Pentest Toolkit Attack machine containing common pentesting tools
DVWA Damn Vulnerable Web Application
OWASP Juice Shop Modern intentionally vulnerable web application
WebGoat OWASP training platform

All containers are connected to an isolated Docker network.


Architecture

                     Docker Network
                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”

        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                                              β”‚
        β”‚   Pentest Toolkit                            β”‚
        β”‚   nmap                                       β”‚
        β”‚   ffuf                                       β”‚
        β”‚   sqlmap                                     β”‚
        β”‚   nikto                                      β”‚
        β”‚   hydra                                      β”‚
        β”‚   curl                                       β”‚
        β”‚   gobuster                                   β”‚
        β”‚   feroxbuster                                β”‚
        β”‚   searchsploit                               β”‚
        β”‚                                              β”‚
        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β”‚                 β”‚                     β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   DVWA    β”‚   β”‚ Juice Shop   β”‚     β”‚ WebGoat   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Installation

Requirements

  • Docker
  • Go (only if building from source)

Verify Docker:

docker --version

Option 1 β€” Install Binary

Download the latest release.

chmod +x install.sh
./install.sh

The installer will automatically:

  • install DockLab
  • place it in your PATH
  • make it executable

After installation:

docklab

Option 2 β€” Build From Source

Clone the repository.

git clone https://github.com/YOUR_USERNAME/docklab.git

cd docklab

Build:

go build -o docklab

Run:

./docklab

Usage

Start the Lab

docklab up

Output:

Checking Docker...

Creating Docker network...

Starting DVWA...

Starting Juice Shop...

Starting WebGoat...

Starting Pentest Toolkit...

Lab Ready!

Start and Enter the Toolkit

docklab up --shell

or

docklab shell

You'll be dropped directly into the pentest container.

root@toolkit:/#

Stop Everything

docklab down

This removes:

  • all lab containers
  • Docker network

Services

After starting the lab:

Application URL
DVWA http://localhost:8080
Juice Shop http://localhost:3000
WebGoat http://localhost:8081/WebGoat

Network

DockLab creates an isolated Docker network.

Example:

cyberlab

Every container receives its own private IP.

Example:

Pentest Toolkit
172.19.0.3

DVWA
172.19.0.2

Juice Shop
172.19.0.4

WebGoat
172.19.0.5

The toolkit can directly reach every vulnerable machine by hostname or IP.

Example:

nmap dvwa
curl http://dvwa

Included Tools

The toolkit includes many common offensive security tools.

Enumeration

  • nmap
  • netcat
  • curl
  • wget
  • httpie
  • jq

Web

  • ffuf
  • gobuster
  • feroxbuster
  • whatweb
  • nikto

Exploitation

  • sqlmap
  • hydra
  • metasploit
  • searchsploit

Utilities

  • python3
  • git
  • vim
  • tmux
  • tree
  • less
  • dnsutils
  • iproute2
  • net-tools

Wordlists

  • SecLists
  • rockyou.txt

Example Workflow

Start the lab.

docklab up --shell

Scan DVWA.

nmap dvwa

Directory fuzzing.

ffuf -u http://dvwa/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt

Fingerprint.

whatweb http://dvwa

SQL Injection.

sqlmap -u "http://dvwa/vulnerabilities/sqli/?id=1&Submit=Submit"

Run Nikto.

nikto -h http://dvwa

Project Structure

.
β”œβ”€β”€ cmd
β”‚   β”œβ”€β”€ down.go
β”‚   β”œβ”€β”€ root.go
β”‚   β”œβ”€β”€ shell.go
β”‚   └── up.go
β”œβ”€β”€ images
β”‚   └── toolkit
β”‚       └── Dockerfile
β”œβ”€β”€ main.go
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ LICENSE
└── README.md

Roadmap

  • Metasploitable support
  • Custom lab profiles
  • Plugin system
  • Windows Active Directory lab
  • HTB-style machine support
  • YAML configuration
  • User-defined targets
  • Automatic updates

Contributing

Contributions are welcome.

  1. Fork the repository

  2. Create a feature branch

git checkout -b feature/my-feature
  1. Commit your changes
git commit -m "Added awesome feature"
  1. Push
git push origin feature/my-feature
  1. Open a Pull Request

Security Notice

DockLab contains intentionally vulnerable applications.

Use only:

  • on your own machine
  • inside isolated Docker networks
  • for educational purposes

Never expose these containers directly to the Internet.


License

MIT License


Acknowledgements

This project makes use of several outstanding open-source projects:

  • OWASP DVWA
  • OWASP Juice Shop
  • OWASP WebGoat
  • Docker
  • Cobra CLI

Huge thanks to the maintainers of these projects.


Author

Adarsh

If you found this project useful, consider giving it a ⭐ on GitHub!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages