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
- β 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)
| 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.
Docker Network
ββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Pentest Toolkit β
β nmap β
β ffuf β
β sqlmap β
β nikto β
β hydra β
β curl β
β gobuster β
β feroxbuster β
β searchsploit β
β β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββββββ
β β β
βββββββββββββ ββββββββββββββββ ββββββββββββββ
β DVWA β β Juice Shop β β WebGoat β
βββββββββββββ ββββββββββββββββ ββββββββββββββ
- Docker
- Go (only if building from source)
Verify Docker:
docker --versionDownload the latest release.
chmod +x install.sh
./install.shThe installer will automatically:
- install DockLab
- place it in your PATH
- make it executable
After installation:
docklabClone the repository.
git clone https://github.com/YOUR_USERNAME/docklab.git
cd docklabBuild:
go build -o docklabRun:
./docklabdocklab upOutput:
Checking Docker...
Creating Docker network...
Starting DVWA...
Starting Juice Shop...
Starting WebGoat...
Starting Pentest Toolkit...
Lab Ready!
docklab up --shellor
docklab shellYou'll be dropped directly into the pentest container.
root@toolkit:/#
docklab downThis removes:
- all lab containers
- Docker network
After starting the lab:
| Application | URL |
|---|---|
| DVWA | http://localhost:8080 |
| Juice Shop | http://localhost:3000 |
| WebGoat | http://localhost:8081/WebGoat |
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
The toolkit includes many common offensive security tools.
- nmap
- netcat
- curl
- wget
- httpie
- jq
- ffuf
- gobuster
- feroxbuster
- whatweb
- nikto
- sqlmap
- hydra
- metasploit
- searchsploit
- python3
- git
- vim
- tmux
- tree
- less
- dnsutils
- iproute2
- net-tools
- SecLists
- rockyou.txt
Start the lab.
docklab up --shellScan DVWA.
nmap dvwaDirectory fuzzing.
ffuf -u http://dvwa/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txtFingerprint.
whatweb http://dvwaSQL Injection.
sqlmap -u "http://dvwa/vulnerabilities/sqli/?id=1&Submit=Submit"Run Nikto.
nikto -h http://dvwa.
βββ cmd
β βββ down.go
β βββ root.go
β βββ shell.go
β βββ up.go
βββ images
β βββ toolkit
β βββ Dockerfile
βββ main.go
βββ go.mod
βββ go.sum
βββ LICENSE
βββ README.md
- Metasploitable support
- Custom lab profiles
- Plugin system
- Windows Active Directory lab
- HTB-style machine support
- YAML configuration
- User-defined targets
- Automatic updates
Contributions are welcome.
-
Fork the repository
-
Create a feature branch
git checkout -b feature/my-feature- Commit your changes
git commit -m "Added awesome feature"- Push
git push origin feature/my-feature- Open a Pull Request
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.
MIT License
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.
Adarsh
If you found this project useful, consider giving it a β on GitHub!