Download docs/RUNBOOK.md from PolytechCyInstitute/cyber-range: direct link, hf CLI and curl.
- Browser
- Download file 4.75 kB
-
https://huggingface.co/PolytechCyInstitute/cyber-range/resolve/main/docs/RUNBOOK.md
- Command line
-
hf download hf://PolytechCyInstitute/cyber-range/docs/RUNBOOK.md
-
curl -L -o RUNBOOK.md https://huggingface.co/PolytechCyInstitute/cyber-range/resolve/main/docs/RUNBOOK.md
Cyber Range Runbook
Safety checks before every session
- Run
python lab.py preflight. - Keep Security Onion and GOAD stopped while using heavyweight container profiles.
- Use only
127.0.0.1bindings and host-only VM networks. - Scan only lab services or systems you own/are authorized to test.
- Snapshot VMs before attacks and restore them afterward.
WAF + Juice Shop exercise
Start the lightweight stack:
python lab.py up core
- Browse
http://127.0.0.1:8080and confirm it is Juice Shop. - Send a normal request and record the response.
- Send the controlled SQLi-like test from the README and inspect the WAF result.
- Work through a Juice Shop challenge using the official companion guide.
- Inspect logs without mounting the Docker socket:
docker compose logs waf
For detection-only comparison, copy .env.example to .env, set WAF_MODE=DetectionOnly, and recreate the core profile. Restore WAF_MODE=On afterward. DetectionOnly is a learning mode, not protection.
Nmap exercise
The controller accepts IPs, CIDRs, hostnames, and Compose service names. It rejects shell metacharacters, unexpected options, and implicit targets.
python lab.py scan juice-shop
python lab.py scan waf -- -sV --top-ports 100
python lab.py scan juice-shop -- -sT -p 3000
Allowed flags are -sV, -sT, -sS, -Pn, -O, --open, --top-ports, and -p. Run arbitrary Nmap options manually only inside your own range if you understand their impact; the controller intentionally uses a small allowlist.
Wazuh exercise
Install once with python lab.py wazuh-setup, then open https://127.0.0.1:5443.
- Explore the manager, indexer, and dashboard in Threat Hunting.
- Add a disposable endpoint VM using the official Wazuh agent documentation.
- Keep agent ports localhost-only unless the endpoint is an explicitly isolated VM. If remote agent access is needed, create a separate host-only override rather than binding to
0.0.0.0. - Generate harmless events such as failed local authentication attempts and file-integrity changes on the disposable endpoint.
- Correlate endpoint events with WAF
error.log, which the manager reads from the shared read-only volume.
The official local dashboard default is admin / SecretPassword. Change credentials before any non-local use; this package intentionally does not expose the stack remotely.
AI analyst exercise
Start python lab.py up ai. Optionally download the local model with python lab.py pull-model.
/healthzreports liveness./reports.jsonreturns processed reports, newest first./shows escaped report cards and refreshes every 15 seconds.- Reports are stored in the
copilot_reportsnamed volume astriage.jsonl. - Only Wazuh alerts at rule level 10 or above are processed by default.
- Existing alerts are skipped on first startup; set
PROCESS_EXISTING_ALERTS=1only when intentionally importing them.
Stop Ollama or withhold the model to test deterministic fallback. Reports then contain analysis_source: deterministic-fallback and may contain ai_error. No report triggers a response action.
Offline fallback test:
python lab.py triage examples/alerts.json
Security Onion and GOAD
Use their separate VM guides. They are not fake Compose services and are not included in all-containers.
Backup
Stop the relevant profile first. The following example backs up WAF logs on a host with Docker:
docker run --rm -v cyber-range-waf-logs:/data:ro -v "${PWD}:/backup" alpine:3.22 tar -czf /backup/waf-logs.tar.gz -C /data .
Back up Wazuh using its official persistent-volume guidance. Copilot reports can be copied from the copilot_reports volume with the same read-only mount pattern. Store backups outside the range and protect any sensitive alert content.
Non-destructive stop
python lab.py down
This preserves named volumes and downloaded Wazuh files.
Destructive reset
A reset permanently deletes evidence, reports, models, and application state. First make backups and stop every related service.
Root Compose volumes:
docker compose down -v --remove-orphans
External shared volumes must be removed explicitly, only after Wazuh is stopped:
docker volume rm cyber-range-wazuh-logs cyber-range-waf-logs
For Wazuh's remaining volumes, use its official Compose file from .vendor/wazuh-docker/single-node with down -v. Do not delete .vendor while containers still reference it.
For VMs, revert to a clean snapshot or use the official GOAD destroy workflow. Never delete VM files while the hypervisor is running them.