Skip to main content

Quality gate OpenSSF Scorecard

🎤 Accepted to Black Hat USA Arsenal 2026, SecTor Arsenal 2026, and SecTor 2026 Briefings. Live Arsenal demos at both conferences, plus the SecTor Briefing talk APTL for Agentic Purple Teaming.

APTL—Advanced Purple Team Lab

Purple-team lab where AI agents drive the red and blue sides against an enterprise target stack.

One aptl lab start brings up: a fictional company's infrastructure (AD, web, DB, file share, and DNS), a Kali red-team box, a SOC stack (Wazuh + Suricata + MISP + TheHive + Cortex + Shuffle), and MCP servers giving AI agents programmatic control over it. Scenarios are Reproducible Agentic Environments SDL documents, selectable at startup; the Compose topology is realized from the nodes the scenario declares rather than a fixed preset, and each run captures a telemetry archive. Mail and reverse-engineering services are optional profiles and are not part of the default techvault-operational scenario.

Use cases: autonomous cyber-operations research, purple-team training, AI threat-actor assessment.

Status

🚧 Active development. Not for production. Not hardened. This lab gives AI agents access to real penetration-testing tools and runs intentionally vulnerable services. Container escapes and other security issues are possible—keep it on a host you can rebuild and a network you control. Always monitor red-team agents during scenarios.

Quick Start

Install the released CLI and materialize a lab, no clone required:

pipx install aptl-labs          # the released CLI, isolated in its own environment
aptl lab init my-lab            # materialize the lab assets into ./my-lab
cd my-lab
aptl lab start

aptl lab init <dir> copies the bundled lab assets (the Compose topology, scenarios, config templates, and container build contexts) out of the installed package into <dir>, which becomes your lab project directory. The published wheel ships those assets, so a PyPI install alone can run a lab. pipx installs the CLI into its own virtualenv, so the system-pip block on modern Debian/Ubuntu/WSL2 hosts (PEP 668) never applies. Install pipx with sudo apt install pipx if you do not have it.

To run from source instead (for development), clone the repo and use a virtualenv editable install (the python3 -m venv step needs python3-venv on Debian/Ubuntu). The checkout is itself the project directory, so no lab init is needed:

git clone https://github.com/Brad-Edwards/aptl.git
cd aptl
python3 -m venv .venv && source .venv/bin/activate
pip install -e .
aptl lab start

aptl lab start creates .env automatically when it is missing and replaces template placeholder values with lab credentials that match the running containers. The startup output points to .env for passwords and tokens. Run aptl lab info later to reprint the same access summary.

By default it boots the full techvault-operational scenario. List the catalog and start a smaller curated topology with:

aptl lab scenarios                                   # list startup scenarios
aptl lab start --scenario techvault-attacker-target  # or --scenario-path <file>

See Scenarios for the catalog.

Once it's up:

Surface URL / command
Wazuh Dashboard https://localhost:443 (admin / your INDEXER_PASSWORD from .env)
Victim shell aptl container shell aptl-victim
Kali shell aptl container shell aptl-kali

Lifecycle:

aptl lab status   # running containers
aptl lab info     # URLs, usernames, and .env credential references
aptl lab stop     # graceful stop
aptl lab stop -v  # ⚠ destroys all lab data (Wazuh indexes, MISP, TheHive, configs)
aptl kill         # emergency: kill MCP server processes
aptl kill -c      # emergency: kill MCP processes AND all lab containers

Requirements

  • Docker + Docker Compose + Docker Buildx
  • Python 3.11+
  • OpenSSH client (ssh-keygen on PATH): generates the lab SSH keys at standup. Preinstalled on Linux and macOS; on Windows install the built-in "OpenSSH Client" optional feature (or Git for Windows / WSL2).
  • RAM: 8 GB runs the smaller curated scenarios; the full techvault-operational stack needs more than 20 GB
  • 20 GB+ disk
  • Linux, macOS, or Windows with Docker Desktop/WSL2
  • Open ports: 443, 8443, 9000, 9001, 9200, 55000 (and the rest of the published ports in docker-compose.yml)

Architecture

flowchart TD
    AI([AI Agents])

    subgraph MCP[MCP Server Layer]
        direction LR
        m1[mcp-red] ~~~ m2[mcp-wazuh] ~~~ m3[mcp-indexer] ~~~ m4[mcp-network]
        m5[mcp-casemgmt] ~~~ m6[mcp-soar] ~~~ m7[mcp-threatintel] ~~~ m8[mcp-reverse]
    end

    Kali[Kali Red Team]
    Reverse[Optional Malware Analysis<br/>not in the default scenario]

    subgraph Scenario[Scenario Environment]
        Targets[Scenario-defined target topology<br/>AD · web · DB · file share · DNS · mail · victim hosts · etc.]
    end

    subgraph SOC[SOC Stack]
        direction LR
        S1[Wazuh SIEM] ~~~ S2[Suricata IDS] ~~~ S3[MISP TI]
        S4[TheHive + Cortex] ~~~ S5[Shuffle SOAR]
    end

    AI <--> MCP
    MCP --> Kali
    MCP --> SOC
    MCP --> Reverse

    Kali -->|attack| Scenario
    Scenario -.->|logs / telemetry| SOC

The scenario environment is whatever the SDL scenario defines. The default techvault-operational topology (AD, web, DB, file share, DNS, mail, victims) is one shape, and other scenarios compose different ones. Component-by-component breakdown: docs/architecture/index.md.

Scenarios

Scenarios are Reproducible Agentic Environments SDL documents under scenarios/. aptl lab scenarios lists the catalog; aptl lab start --scenario <id> (or --scenario-path <file>) selects one. The Compose profiles that come up are realized from the nodes the SDL declares—the topology follows the scenario's content, including dependency closure, rather than a preset keyed off its name.

The SDL language and the reusable environment-pack format live in the RAES companion repositories—OpenRAE/rae (SDL and semantics) and OpenRAE/env-packs (pack definitions, templates, schemas, and authoring support). APTL consumes those definitions and realizes them as a running Docker lab; the lab lifecycle and runtime stay APTL-owned.

The default comes from the installed TechVault environment pack. The APTL catalog also ships three curated slices:

Scenario id Boots Omits
installed techvault pack TechVault enterprise, Kali, and SOC (default) Optional backend OTel stack when native evidence is sufficient
techvault-attacker-target Kali + one monitored victim + Wazuh core Enterprise web tier, wider SOC stack, backend apparatus
techvault-enterprise-web Vulnerable webapp + DB + AD + Wazuh core Red-team apparatus, wider SOC stack, backend apparatus
techvault-defensive-min Wazuh manager / indexer / dashboard Attacker and enterprise components, wider SOC stack, backend apparatus

Authoring and selection details: SDL Reference · Curated TechVault Variants.

AI Agents (MCP)

aptl lab start builds the seven MCP servers for the default scenario and creates a private .mcp.json client configuration with the generated lab credentials. Start your AI client from the project directory so its relative entry points resolve correctly.

To rebuild the MCP artifacts without restarting the lab:

./mcp/build-all-mcps.sh

The repository still builds the optional reverse MCP artifact, but the generated default client config omits it because the default SDL has no reverse node. Full setup: MCP Integration.

Smoke-test the wiring once the lab is up:

  • Red side: ask the agent "Use kali_info to show me the lab network"
  • Blue side: ask the agent "Use wazuh_query_alerts to show me recent alerts"

Optional: Web UI

Localhost-only web UI for lab control and scenario runs.

pip install -e ".[web]"        # in the same .venv from Quick Start
aptl web serve                 # API server
cd web && npm install && npm run dev   # frontend (separate terminal)

Access at http://localhost:5173 (dev) or http://localhost:3000 (prod). The API container needs the host Docker socket; do not expose to untrusted networks.

Documentation

Getting started: Installation · Prerequisites · Quick Start Guide

Architecture: Overview · Networking · Enterprise Infrastructure

Components: Wazuh SIEM · Kali Red Team · Victim Containers · Reverse Engineering · MCP Integration · Default Defensive Posture

Scenarios & SDL: SDL Reference · Curated TechVault Variants · Pack authoring (OpenRAE/env-packs) · SOC Architecture Spec

Reference: TechVault Scenario Overview · TechVault Company Profile · TechVault OSINT Readiness · Container Template Guide

Ops: Troubleshooting · Release Candidate Manual QA

Ethics & Disclaimers

APTL uses commodity services and basic integrations. AI agents get Kali access—no enhancements to their latent capabilities beyond that. No red-team enhancements will be added to this public repository. An autonomous cyber-operations range is under development as a separate project.

You are responsible for following all applicable laws. The author takes no responsibility for your use of this lab. The repository contains intentional test credentials (covered by .gitguardian.yaml) for lab functionality—dummy values for educational use, not production secrets.

License

MIT


10-23 AI hacker shenanigans 🚓

Release files for aptl-labs 5.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aptl-labs 5.5.0
File Size Uploaded
aptl_labs-5.5.0.tar.gz 10.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for aptl-labs 5.5.0
File Interpreter ABI Platform
aptl_labs-5.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 MB

Release files / aptl_labs-5.5.0.tar.gz

Download URL aptl_labs-5.5.0.tar.gz
Size 10.2 MB
Tags Source
SHA-256 checksum
How to use checksums
b8644eaa5af0796c4141ad4340ca0bf6ce7be85f6c9813383502055b262e3821
BLAKE2b-256 checksum
How to use checksums
ab6b6160a4c3d0c2c359cc5449f521e1b6f84e499921aa565bab4989c00f3f27
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / aptl_labs-5.5.0-py3-none-any.whl

Download URL aptl_labs-5.5.0-py3-none-any.whl
Size 3.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
952070f8a6c3c906ee676c61570ebe1f6e35ba72dcc58d613840bb58716d9c2b
BLAKE2b-256 checksum
How to use checksums
e70b89f52890589d8de7bec9760fa330607da91ce820dd4eaba480386d5b9284
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

6.0.0

2 release files

5.6.0

2 release files

This release

5.5.0 This release

2 release files

5.4.0

2 release files

5.3.1

2 release files

5.3.0

2 release files

5.2.0

2 release files

5.1.1

2 release files

5.1.0

2 release files

5.0.0

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page