CyberForge is an automated cyber range orchestration platform. This repository contains the first MVP implementation slice:
- Challenge catalog loading and schema validation
- Lab lifecycle state machine
- Deploy/reset API endpoints
- CALDERA ability templates and sample challenge definitions
- SQLAlchemy-backed lab/session persistence (PostgreSQL-compatible)
- Local VirtualBox provisioner adapter (configurable, with dry-run)
- Minimal web control deck for challenge deploy/reset actions
- Startup preflight for repository connectivity and provisioner readiness
- Persistent deploy/reset audit events with API retrieval
- Dark mode support and richer control deck UX
- Expanded catalog: 15 independent challenges + 5 kill chains
- Generated CALDERA TTP YAML abilities for per-challenge and per-machine deployment
- 15 independent challenge definitions
- 5 AD/Linux killchain scenarios (5 vulnerabilities each)
- Deterministic lab state transitions:
idle -> deploying -> active -> resetting - Reset failure handling: transitions to
failedwith error context - PostgreSQL-compatible persistence for challenges and lab sessions
- VirtualBox provisioner implementation with mode switching
- Web UI served from
/ - Web UI supports light and dark mode
- Web UI supports content filters by type, domain, and difficulty
- Create a virtual environment.
- Install dependencies:
pip install -e .[dev]- Run the API:
uvicorn cyberforge.main:app --reload- Open API docs:
The application is configured with environment variables:
CYBERFORGE_REPOSITORY:sqlalchemy(default) ormemoryCYBERFORGE_DATABASE_URL: SQLAlchemy URL (defaultsqlite+pysqlite:///./cyberforge.db)CYBERFORGE_PROVISIONER:mock(default) orvirtualboxCYBERFORGE_VBOX_ATTACKER_TEMPLATE: VirtualBox attacker template VM nameCYBERFORGE_VBOX_TARGET_TEMPLATE: VirtualBox target template VM nameCYBERFORGE_VBOX_DRY_RUN:true(default) orfalseCYBERFORGE_CONTENT_ROOT: local mirror path of GitLab content (optional)CYBERFORGE_VALIDATE_CONTENT_STRUCTURE: validate required setup scripts at startup (true/false, defaultfalse)
Implemented content includes these domains:
- OWASP Top 10 Attacks
- Web Attack Scenarios
- AD Attacks (Kerberos, ADCS, AD enum)
- Linux OS attacks
- OT/ICS systems
- Network attacks
- Popular and relevant attacks (CVE/WiFi/bruteforce style)
- Complete cyber kill chain scenario (as 5 dedicated killchains)
- WAF bypass attacks
- Python and PowerShell attack workflows
$env:CYBERFORGE_DATABASE_URL = "postgresql+psycopg://postgres:postgres@localhost:5432/cyberforge"
$env:CYBERFORGE_REPOSITORY = "sqlalchemy"
uvicorn cyberforge.main:app --reload$env:CYBERFORGE_PROVISIONER = "virtualbox"
$env:CYBERFORGE_VBOX_DRY_RUN = "false"
$env:CYBERFORGE_VBOX_ATTACKER_TEMPLATE = "cf-attacker-template"
$env:CYBERFORGE_VBOX_TARGET_TEMPLATE = "cf-target-template"
uvicorn cyberforge.main:app --reloadGET /api/v1/audit/eventsreturns paginated audit events.
Supported query params:
action:deployorresetstatus:requested,success,faileduser_id,lab_idrequest_idstart_at,end_at(ISO-8601)limit(1-500),offset
Event fields include action, status, lab_id, user_id, details, and created_at.
Response shape:
{
"items": [],
"total": 0,
"limit": 100,
"offset": 0
}All API requests support optional X-Request-ID header. If provided, it is echoed in the response and persisted in deploy/reset audit event details for end-to-end traceability.
GET /api/v1/challenges: all deployable content (independent + killchain)GET /api/v1/killchains: killchain-only catalogGET /api/v1/catalog/summary: counts by content type and domain
GET /api/v1/caldera/abilities: flat ability listGET /api/v1/caldera/export/index: grouped bundle indexGET /api/v1/caldera/export/independent: ready-to-import YAML bundleGET /api/v1/caldera/export/killchain-scenarios: ready-to-import YAML bundleGET /api/v1/caldera/export/killchain-machines: ready-to-import YAML bundleGET /api/v1/caldera/export/all: full ready-to-import YAML bundle
This repository includes a generator that builds:
- 15 independent challenge definitions
- 5 killchain definitions
- CALDERA ability YAMLs (per challenge, per killchain, and per killchain machine)
Run generator:
python tools/build_content_catalog.pyWhen CYBERFORGE_VALIDATE_CONTENT_STRUCTURE=true, startup fails if required setup scripts are missing in the configured local GitLab mirror path (CYBERFORGE_CONTENT_ROOT).
Example:
$env:CYBERFORGE_VALIDATE_CONTENT_STRUCTURE = "true"
$env:CYBERFORGE_CONTENT_ROOT = "C:\\gitlab-mirror\\cyberforge-content"
uvicorn cyberforge.main:app --reloadpytestIf you are looking to run this in a production environment (with PostgreSQL, Nginx, Systemd, and real VirtualBox environments), please consult the detailed Deployment Guide.
src/cyberforge: API and orchestration implementationcatalog/challenges/independent: YAML challenge definitions (15)catalog/killchains: killchain scenario definitions (5)catalog/caldera/abilities: CALDERA ability templatescatalog/caldera/abilities/generated: generated deployable CALDERA TTP YAML filesschemas: JSON schema for challenge definition validationtests: unit and API teststasks: implementation checklist and review notes