-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
Authors: DaxxSec & Claude (Anthropic)
LABYRINTH implements a reverse kill chain — the attacker's progression through the environment correlates directly with its operational degradation. Unlike traditional honeypots that passively observe, LABYRINTH actively degrades and commandeers the attacking agent at each layer.
HARDEN ───→ CONTAIN ───→ DEGRADE ───→ DISRUPT ───→ CONTROL
L0 L1 L2 L3 L4
│ │ │ │ │
│ │ │ │ └─ Identity rewritten
│ │ │ └─ Can't parse output
│ │ └─ Can't trust environment
│ └─ Can't reach real infrastructure
└─ Portal trap can't become a liability
▸ Depth of penetration = Depth of compromise
Operational Security & Governance
Four pillars ensuring the portal trap itself cannot become a liability:
- AES-256 forensic encryption at rest
- Dedicated VLAN network isolation with zero route to production
- MITM proxy scope validation with fail-closed enforcement
- Tiered data retention policy (7d credentials / 90d fingerprints / indefinite decision logs)
Containment & Isolation
Internet-facing portal trap services that route inbound connections into dynamically-spawned, isolated containers. Each session gets a fresh environment. All egress routes through the interception proxy (shared with Layer 4). The agent thinks it compromised a real host — it didn't.
Epistemic Degradation
Containers pre-seeded with deliberate internal contradictions — OS version mismatches, inconsistent package histories, conflicting timezone/locale settings, planted escalation paths that lead to new containers with shifted rules. Optionally adaptive: the orchestrator configures the next container based on observed agent behavior.
Sensory Disruption
Terminal encoding corruption via .bashrc/.profile payloads that write control characters shifting the terminal into alternate character set modes. Recovery commands (reset, stty sane) are aliased to re-trigger corruption. New shell spawns re-source the profile. Agent is trapped in a sensory deprivation loop.
Cognitive Takeover
Dual-capability intelligence layer. Network Intelligence: protocol-compatible phantom services (PostgreSQL, Redis, Elasticsearch, Consul, Jenkins) accept stolen credentials and log all access. Cognitive Intelligence: MITM interception of AI API calls captures system prompts and tool inventories, with four modes: passive, neutralize, double-agent, counter-intel. Both capabilities run on the proxy container (172.30.0.50).
Internet
│
┌──────────┴──────────┐
│ L1: THRESHOLD │
│ SSH (:22) │
│ HTTP (:8080) │
└──────────┬──────────┘
│
┌──────────┴──────────┐
│ Orchestrator │
│ (session mgmt) │
└──────────┬──────────┘
│
┌───────────────┼───────────────┐
│ │ │
┌────┴────┐ ┌──────┴──────┐ ┌─────┴─────┐
│ Session │ │ Forensic │ │ L4 Proxy │
│ Contrs │ │ Volume │ │ MITM+Svc │
│ L2 + L3 │ │ JSONL │ │ 172.30. │
└─────────┘ └──────┬──────┘ │ 0.50 │
│ └─────┬─────┘
┌──────────┴──────────┐ │
│ Dashboard (:9000) │────┘
│ Flask + API │
└─────────────────────┘
-
Dashboard API (
localhost:9000/api/stats,/api/sessions) — primary source, polls every 2s -
Forensic JSONL files (
/var/labyrinth/forensics/sessions/) — fallback when API unavailable - No data — shows deployment instructions
cli/ Go CLI binary (labyrinth command)
cmd/ Cobra command definitions
internal/
banner/ ASCII art banner
registry/ Environment CRUD (~/.labyrinth/environments/*.json)
docker/ Docker Compose operations + preflight checks
tui/ Bubbletea TUI (5 tabs)
api/ HTTP client for Flask dashboard API
forensics/ Direct JSONL file reader (fallback)
config/ labyrinth.yaml parser
test/ Integration tests
src/ Python components
layer0_foundation/ BEDROCK validator
layer1_portal/ SSH/HTTP portal traps, session logger
layer2_maze/ Contradiction catalog, container templates
layer3_blindfold/ Encoding corruption payloads
layer4_puppeteer/ MITM interceptor, phantom services, CA cert injector
orchestrator/ Session management, event watcher, layer controllers
docker/ Dockerfiles for all services
configs/ labyrinth.example.yaml config schema
scripts/ attacker-setup.sh
docs/ User-facing documentation
| Component | Technology |
|---|---|
| CLI | Go, Cobra, Bubbletea v2, Lipgloss v2 |
| Orchestrator | Python 3.11, Docker SDK, PyYAML, Watchdog |
| Portal Traps | Python (SSH via OpenSSH, HTTP via stdlib) |
| MITM Proxy | mitmproxy + custom addon |
| Dashboard | Flask, JSONL reader |
| Containers | Docker/Docker Compose |
| Forensics | JSONL on shared volume |
Getting Started
Architecture
Layers
Operations