redStackPRO README

The project's README from github.com/devZero-Security/redStackPRO. As one markdown file: README.md.

redStackPRO: red team infrastructure and cyber ranges

MIT license version 0.9.1 providers GCP and AWS status prerelease beta Terraform and Ansible

redStackPRO

A web canvas where you build infrastructure as a topology, then export a complete, runnable working directory of Terraform and Ansible. You run it from your own machine. redStackPRO never holds your cloud credentials.

[!IMPORTANT] redStackPRO is in prerelease (beta). Features are still moving before 1.0. GCP and AWS are tested end to end; Azure, Proxmox, and ESXi are on the roadmap. Expect rough edges, and pin to a released version if you need stability.

Hit a rough edge, or have feedback? Open an issue at Issues. If it was a deploy, attach the scrubbed logs/deploy-*.log the run wrote (it records versions, provider, and where it stopped, with secrets removed) so it can be analyzed fast. Your reports shape the release.

redStackPRO puts attack infrastructure and target ranges on the same canvas. The two canvas modes are Offense (attack infrastructure) and Defense (defensive AD ranges); the export names its handoff OFFENSE-BRIEFING.md or DEFENSE-BRIEFING.md to match.

Split horizon C2, attack infrastructure: two front doors that do not share a fate, Apache fronting Sliver and Nginx fronting Mythic, each redirector on its own peered network, with the teamservers, collector, and operators behind a jumpbox.

Split horizon C2 on the canvas: two redirector networks, Apache fronting Sliver and Nginx fronting Mythic, over a shared C2 subnet with the teamservers, an OpenSearch collector, operators and a jumpbox.

Multiple operators, one stack. An attack-infrastructure jumpbox can name a list of operators (handle plus role), and each gets a Guacamole portal login on the shared lab password. Set the jumpbox's access_mode to wireguard or openvpn (default is a public portal) and every operator also gets a personal VPN credential generated on the jumpbox at apply: the keys never leave the box or enter the export, only the client config file does. The portal logins today share the one lab password, so per-operator isolation comes from each operator's own VPN credential, not the portal login; individual portal passwords are on the roadmap. On a VPN access mode the portal closes to the internet and moves behind the tunnel, while SSH stays open so the admin can keep deploying and managing the box. Add or remove a teammate on a running jumpbox with sudo rsp-operator add <handle>. See the wiki Deploying a Range.

Harbor, a target range: a small corporate forest, a root domain and a child over a parent-child trust, with the ordinary path from a phished workstation to the forest.

The Harbor range on the canvas: the harbor and freight domains over an intra-forest trust, four Windows hosts and a jumpbox.

GOAD, the full lab: three domains across two forests, five machines and their trusts, the reference range the written solution follows.

The GOAD lab on the canvas: sevenkingdoms, north and essos across two forests, their intra and cross-forest trusts, five machines and a jumpbox.

[!IMPORTANT] The export is the boundary. The canvas generates files; you run them under your own credentials. redStackPRO never deploys anything and never holds a secret.

[!CAUTION] Authorized use only. redStackPRO builds offensive infrastructure and deliberately vulnerable ranges. Use it only in lab environments you own or are explicitly authorized to test, never against systems you do not have written permission for.


🧭 Status

Pre-release, with more to come before 1.0. The pipeline itself works end to end: a topology compiles to Terraform and Ansible, and the export deploys.

Provider State
GCP, AWS Supported and tested end to end, for both target ranges and attack infrastructure.
Azure, Proxmox, ESXi On the roadmap, not yet supported.

🐳 Run with Docker

The whole canvas in one container, the API and the web app on one port:

docker compose up                    # builds from this repo, http://127.0.0.1:8000

Or pull the published image instead of building it:

docker run -p 8000:8000 -v redstackpro-data:/data \
  ghcr.io/devzero-security/redstackpro:latest

The canvas listens on 8000 inside the container. To serve it on a different host port, change the left half of the mapping (-p 8787:8000), or set REDSTACKPRO_PORT for compose (REDSTACKPRO_PORT=8787 docker compose up).

Compose also carries an optional Postgres backend for a shared deployment:

REDSTACKPRO_DATABASE_URL=postgresql+psycopg://redstackpro:redstackpro@db:5432/redstackpro \
  docker compose --profile postgres up

The image is the composition layer only. It does not carry Terraform or Ansible and never holds your cloud credentials: you run the export it produces from your own machine, exactly as in the from-source flow below.


⚙️ Run from source

Python 3.11 or newer, and Node 24 for the canvas.

git clone <this repo> && cd redStackPRO
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"

The canvas is two processes, the API and the web app:

redstackpro serve                            # http://127.0.0.1:8000
cd frontend && npm install && npm run dev

redstackpro serve --port 8787 moves the API to a different port. Point the canvas dev server at it with REDSTACKPRO_API=http://127.0.0.1:8787.

Open it, use Load blueprint (the button, or the mode palette) to open a shipped starting point, choose your cloud in the toolbar provider selector (GCP or AWS), open the Export tab (it compiles as you go), then Download. You get a zip of the working directory described below.

Or skip the canvas entirely and compile a shipped blueprint from the command line, same compiler, same output:

redstackpro compile frontend/public/goad/goad-light.json -o export

The command line defaults to GCP. Pass --provider aws for AWS.

That writes about 200 files: Terraform for the cloud, Ansible for everything that happens on the boxes, a deploy.sh, and a DEFENSE-BRIEFING.md telling you the credentials and what is planted where. goad-light is a two-domain Active Directory range: sevenkingdoms and its child north, a parent-child trust in one forest, two domain controllers and a member server, plus a jumpbox.

[!IMPORTANT] Two things before you deploy. Your cloud identity needs permission to create the resources the export builds (VPCs or networks, subnets, security groups or firewall rules, instances, elastic or static IPs), and your machine needs terraform, ssh, tar, and Python 3.11 or newer. redStackPRO generates the code and installs none of that for you; Ansible installs itself on the jumpbox.

New to the AWS CLI or gcloud? Quick setup for whichever you target:

AWS

aws configure
aws sts get-caller-identity

Attach the AmazonEC2FullAccess managed policy to the IAM user or role you configure.

GCP

gcloud auth login
gcloud auth application-default login
gcloud config set project <project-id>
gcloud services enable compute.googleapis.com --project <project-id>

Grant your account roles/compute.admin on the project.

Full permission tables, install links, and the GCP vCPU quota note (CPUS_ALL_REGIONS, default 32 per project) are in the wiki Cloud Prerequisites. See Getting Started for the full checklist.

To deploy it, fill in export/deploy.tfvars (at the export root) and run:

cd export && bash deploy.sh

deploy.sh copies deploy.tfvars into terraform/terraform.tfvars at apply time and aborts if deploy.tfvars is missing, so edit the root file, not the one under terraform/.

On Windows, run .\deploy.ps1 instead: bash deploy.sh at a PowerShell prompt launches WSL, a different filesystem with different credentials. See the wiki Deploying a Range for detail.

deploy.sh applies the Terraform and then provisions from the range's own jumpbox, because the managed hosts sit on a private subnet nothing else can reach. Your cloud credentials stay on your machine throughout.

Every run writes a timestamped, secret-scrubbed log to logs/deploy-<timestamp>.log in the export. If a deploy fails or a range comes up wrong, attach the newest one to a GitHub issue; deploy.sh prints its path and a link when something goes wrong.

Check it worked. The export ships verify.py next to deploy.sh. Run it against the deployed range to confirm the path end to end:

python verify.py doors .     # redirector front doors, from outside
python verify.py stack .     # the range over SSH from the jumpbox

Each exits 0 when every check passes. On an offense range, the generated OFFENSE-BRIEFING.md holds the C2 payload recipe (callback domain, URI prefix, and gating header per redirector), and sudo rsp-check on a redirector checks the same path from the box itself.

Manage and tear down. The export also ships lifecycle scripts, manage.sh (and manage.ps1 on Windows), for the running range. They take status, start, stop, and teardown: stop pauses billing without destroying the range, and teardown destroys it.

./manage.sh status
./manage.sh start
./manage.sh stop
./manage.sh teardown

☁️ Plan AWS quotas per region

AWS quotas are per region, and a compile does not check them. Scope them before a large or concurrent deploy, so an apply does not fail partway and leave infrastructure running and billing.

All of this is per region. Running several ranges at once? Give each a distinct prefix so its host names stay clear; the few account-global names (the key pair and the auto-stop role) auto-suffix per deployment, so ranges never collide in one account. The full quota table, the increase commands, and the pre-deploy checklist are in the wiki: Providers and Deploying a Range.


🤖 API and agents

Everything the canvas does is available headless, so an agent can operate redStackPRO without a person clicking through it. A topology is plain JSON against a published schema (src/redstackpro/schema/topology/, also served at /api/v1/registry/schema), the registry endpoints report the vocabulary of node kinds, providers, and roles, and the validate and compile steps the canvas calls are the same REST endpoints. The API is documented at /docs and /openapi.json, which a model can read as tools.

redstackpro serve                                  # http://127.0.0.1:8000
curl 127.0.0.1:8000/api/v1/registry/schema         # the topology schema
curl -X POST 127.0.0.1:8000/api/v1/validate \
  -H 'content-type: application/json' \
  -d '{"document": {...topology...}, "provider": "gcp"}'
curl -X POST 127.0.0.1:8000/api/v1/compile \
  -H 'content-type: application/json' \
  -d '{"document": {...topology...}, "provider": "gcp"}'

Validation returns structured findings, each with a stable code, the target, prose and a remedy, and the compiler refuses a document with errors and hands back those same findings. The loop is read the schema, compose a topology, validate, fix what the findings name, compile. A model iterates on the outcome rather than scraping prose, and the validate call stores nothing along the way. The command line is the same pipeline for a shell agent, redstackpro validate and redstackpro compile.

The running instance trusts the local caller, which suits a single-user or self-hosted deployment. Authenticated, multi-tenant agentic access over the API is part of the enterprise edition. redStackPRO holds no cloud credentials on any path: the export is the handoff, and you run it yourself.


💡 Why

redStack proved the pattern but the topology is fixed in code. redStackPRO makes it composable, adds multi-provider support, and puts attack infrastructure and target ranges on the same canvas.


📚 Docs


🗂️ Repo layout

src/                     the Python package and everything it ships
  redstackpro/           the composition layer: validator, compiler, API
    schema/              the document schema, registry data, worked examples
    tools/               command line tools (compile, validate, dev tooling)
    assets/              Ansible roles and static files baked into the export
frontend/                the web canvas (Vite + React)
tests/                   the suite: compiler, validator, API, export
docs/                    architecture, schema, validation, solutions, images
pyproject.toml           package metadata, deps, and the console entry points
alembic.ini              migration config for the Postgres backend
Dockerfile               the one-container build (API plus built canvas)
docker-compose.yml       local run, with an optional Postgres profile
.dockerignore            build context trim
README.md                this file
LICENSE                  MIT, with the GOAD templates under GPLv3
.github/                 CI workflows

License

MIT. See LICENSE.

The GOAD range templates under frontend/public/goad/ are the exception: they are derived from GOAD (GPLv3) and are distributed under GPLv3, with the license and attribution in that directory. They are data, not code: the canvas loads them as native ranges that compile through redStackPRO's own terraform and ansible. The rest of the project is MIT.

A devZero Security Project.

redStackPRO (devZero-Security/redStackPRO)

Searching Database…

这是什么?redStackPRO 是一个用于设计红队攻击基础设施和防御型 Active Directory 网络靶场的网页画布;你可以可视化地编排拓扑,它会导出一个开箱即用的 Terraform 和 Ansible 工作目录,由你自行部署。
这是部署服务,还是只生成基础设施代码?它是一个网页应用(外加配套的 CLI 和 API),只负责把你的拓扑编译成 Terraform/Ansible 工作目录;redStackPRO 本身从不部署任何东西,也不碰你的云账户,导出的脚本由你在自己的机器上运行。
怎么把画布跑起来?最简单的路径是 `docker compose up`(或拉取 `ghcr.io/devzero-security/redstackpro:latest`),它会在 8000 端口同时提供 API 和网页应用;从源码运行则需要 Python 3.11+ 和 Node 24,然后执行 `pip install -e ".[dev]"`,用 `redstackpro serve` 启动 API,并在 `frontend/` 里运行 `npm install && npm run dev` 启动画布。
导出靶场之后,真正部署需要装好什么?你的机器需要 terraform、ssh、tar 和 Python 3.11 或更新版本,还要配置好有权创建 VPC、安全组和实例的 AWS 或 GCP 凭据(`aws configure` / `gcloud auth login`)。
目前哪些云提供商真正可用?目前只有 GCP 和 AWS 得到支持,并在攻防两类靶场上完成了端到端测试;Azure、Proxmox 和 ESXi 在路线图上但尚未实现,而且整个项目在 1.0 之前仍处于预发布(beta)阶段。
redStackPRO 会看到或存储我的云凭据吗?不会——导出即是边界:redStackPRO 把拓扑编译成你机器上的文件,然后由你用本地配置的凭据自行运行 Terraform/Ansible。
进攻(Offense)和防御(Defense)画布模式有什么区别?进攻模式构建攻击基础设施,例如藏在重定向器和跳板机后面的分离解析 C2(以 Apache 前置 Sliver、以 Nginx 前置 Mythic),并导出 OFFENSE-BRIEFING.md;防御模式构建用于训练的存在漏洞的 Active Directory 靶场(比如 GOAD 实验环境),并导出 DEFENSE-BRIEFING.md。
GOAD 是什么?GOAD 是以蓝图形式提供的参考 Active Directory 实验环境:两个森林中的三个域、五台机器及其信任关系,作为书面解决方案所依据的完整防御靶场示例。
AI 智能体能不开网页界面就操控 redStackPRO 吗?可以——拓扑就是符合已发布模式的纯 JSON,画布使用的同一套验证/编译逻辑也以 REST 端点形式暴露,文档见 /docs 和 /openapi.json,因此智能体可以读取模式、构建拓扑、验证并无头编译。
可以把它指向任意目标吗?不行——README 明确警告,redStackPRO 构建的是攻击性基础设施和故意留有漏洞的靶场,只能在你拥有或明确获准测试的实验环境中使用。
What are similar projects?Decepticon, sliver, flowsint, algo, strix, theHarvester, Cybermes, prowler
Size
4.2 MB
Stars
161
Age
22d
Commits · 90 Days