Hands-on, containerized cybersecurity lab for learning and practicing offensive + defensive workflows in a controlled environment.
- Modernized Python automation scripts with safer subprocess handling and CLI arguments
- Improved lab verification workflow with explicit health checks
- CI quality gates (lint, syntax, and Ansible checks)
- Cleaner onboarding path for students, instructors, and self-learners
- SSH brute-force practice using Hydra + Nmap
- RDP brute-force practice using Hydra + service checks
- bWAPP vulnerable web target deployment
- End-to-end lab orchestration and cleanup with Ansible
-
Start Colima and select its Docker context:
colima start docker context use colima
-
Install Python dependencies:
pip install -r ssh-brute-lab/requirements.txt
-
Run environment preflight checks:
python labctl.py doctor
-
Deploy full lab:
python labctl.py setup
Setup automatically writes an HTML report to
reports/. To open it (lightweight "GUI" view):python labctl.py setup --open
-
Verify readiness:
python labctl.py verify
-
Clean up when finished:
python labctl.py cleanup
Cleanup automatically writes an HTML report to
reports/. To open it:python labctl.py cleanup --open
python labctl.py setup— deploy all lab targetspython labctl.py verify— run health checkspython labctl.py attack-ssh -- --target target_ssh --username root— run SSH workflow in Kalipython labctl.py attack-rdp -- --target rdp_target --username admin— run RDP workflow in Kalipython labctl.py shell— open an interactive shell inkali_attackerpython labctl.py lesson --track ssh— guided instructor/student flow with prompts + expected outputspython labctl.py lesson --track ssh --run— execute each lesson step automaticallypython labctl.py cleanup— tear down labpython labctl.py harden— apply remediation/hardening (post-lesson)python labctl.py gui --up --open— open a simple GUI to view container logs livepython labctl.py scan --type fs— supply-chain scan (repo) with Trivypython labctl.py scan --type images— supply-chain scan (lab images) with Trivy
If you prefer Make targets:
make doctor
make setup
make verify
make lesson
make lesson-run
make cleanup
make report
make setup-report
make cleanup-report
make gui-open
make harden-open
make scan-fs-
Reports are written to
reports/(ignored by git). -
Generate a standalone status report anytime:
python labctl.py report --open
For learners who want to inventory their own home/small-business lab network (authorized use only):
python3 labctl.py audit --targets 192.168.1.0/24 --mode discovery --yes --openTo let learners see what’s happening (live container logs in a browser):
python3 labctl.py gui --up --openCapture traffic signals to a target container and generate an HTML report:
python3 labctl.py detect --container target_ssh --seconds 90 --openAfter completing lessons, apply hardening and re-test:
python3 labctl.py harden --open
python3 labctl.py lesson --track remediate --runpython3 labctl.py scan --type fs --openIf you see errors referencing FileNotFoundError or /var/run/docker.sock, ensure Colima is active and selected:
colima start
docker context use colima
python labctl.py doctorThen retry:
make setup- SSH flow:
python3 /opt/lab/ssh-bruteforce.py --help - RDP flow:
python3 /opt/lab/rdp-bruteforce.py --help
Use this project only in environments you own or are explicitly authorized to test. Do not run these workflows against public or unauthorized systems.
See contribution and policy docs:
Run locally:
pip install -r requirements-dev.txt
ruff check .
python -m compileall -q verify-lab.py ssh-brute-lab/ansible/scripts
ansible-playbook --syntax-check ssh-brute-lab/ansible/lab/lab-setup.yml