MÓDULO KALI.Art¶
Full Kali Linux pen-test pod — 600+ tools, browser terminal, Team+ tier.
Function¶
Kali Linux rolling distro running in a gVisor sandbox, accessible via ttyd browser terminal (Phase B) + AI Companion sidebar (MCP- based, Phase B) + Tool Quick-Launch panel.
Closes the "offensive testing" customer ask — pen testers who want the standard Kali distribution instead of crafting their own code (that's DoYour.Art's vertical).
Status¶
| Phase | Scope | Status |
|---|---|---|
| Scaffold (v3.7.0, KALI-1) | Pod + gVisor RuntimeClass + ttyd launcher + NAD VLAN 2902 + 9 TypeScript schemas | ✅ |
| Phase A (PRs #1012–#1015) | Operator-usable surface — K-A1 through K-A4 | ✅ |
| Phase B (PRs #1016–#1023) | PIE workflow + ttyd iframe + MCP bridge + audit chain + PDF + PVC kali-home + CronJobs — K-B1 through K-B8 | ✅ |
| Phase C (v5.6) | noVNC for GUI tools (Burp / Wireshark / Zenmap) | ⏳ |
| Phase D (v6.0) | Cross-MÓDULO orchestration extras (DoYour.Art handoff already shipped in K-A2 + Phase D-2 SDK) | ⏳ |
See ADR-0082 for Phase A decisions and ADR-0083 for Phase B.
Identity¶
| Element | Value |
|---|---|
| Plane | DATA |
| Internal code | kali-pod |
| K8s namespace | web-agents (shared with the offensive suite) |
| OOBI slot | .82 |
| Network | VLAN 2902, subnet 172.21.0.0/16 |
| Sandbox | gVisor (runsc) — mandatory |
| Tier gate | Team+ minimum (free/indie HARD DISABLED) |
| Token rate | 2× baseline |
| Concurrent sessions | Team 2 · Enterprise 10 |
| Max session hours | Team 2 h · Enterprise 24 h |
Operator controls (Phase A + B)¶
/art-studio/kali— 5th tab in the Art Studio- New-session form (tier / target DUT / DOM mode / AI Companion provider)
- Sessions list with
Open/Download PDF/Endactions (PDF is K-B5) - ttyd iframe (K-B2) — full browser terminal embedded once
KALI_TTYD_PUBLIC_URLis set; falls back to a not-ready banner otherwise - Quick-Launch panel — 15 curated tools in 5 categories (NGFW Posture / URL Filter / Network Discovery / Protocol Stress / IPS Evasion)
- AI Companion sidebar — chat with command suggestions; HARD rule = never executes autonomously. K-B3 routes through the MCP bridge when
KALI_MCP_BRIDGE_URLis set - Sandbox box (gVisor / VLAN 2902 / tier caps / audit retention)
/art-studio/kali/audit(K-B4) — hash-chained audit log viewer; filters by operator / session / event kind; "Verify chain" button re-walks SHA-256 chain to surface tampering
Production DOM (PIE workflow, K-B1)¶
dom_mode='production' requires an active PIE approval row before a session can be created:
- Operator
POST /api/kali/pie-approvalswith legal acknowledgement text (min 20 chars) - A different operator (admin)
POST .../[id]/approve— two-person rule enforced byCHECK approver <> operatorand the store - 60-minute write-mode unlock window opens; read-only-tools subset enforced server-side (
nmap,wireshark,burp-passive,testssl.sh,sslscan,whois,dig,nslookup); blocked:metasploit,sqlmap,hydra,john,hashcat,aircrack-ng,reaver,exploit-db,msfvenom,beef) - Without an approval,
/api/kali/sessionsreturns403 prod-dom-blocked-needs-piewith a hint pointing at the approvals endpoint
MCP bridge (K-B3)¶
kali-art-mcp/ is a separate Go module exposing the Anthropic MCP protocol (2024-11-05 subset) on :8085:
| Method | Behaviour |
|---|---|
initialize |
Returns {protocolVersion, serverInfo, capabilities} |
tools/list |
Advertises 4 tools (3 proxied + suggest-workflow synthetic) |
tools/call |
Proxies to kali-art /rpc with from=kali-art-mcp; handles suggest-workflow locally |
resources/list |
Returns empty (bench-context resources land in K-B3-b) |
Operators point Claude Desktop / 5ire / any MCP client at the bridge. The dashboard AI Companion optionally forwards through it when KALI_MCP_BRIDGE_URL is set.
Per-operator persistence (K-B6)¶
/home is backed by the kali-operators-home PVC (50 GiB RWO). Each operator gets a subdirectory /home/<operator> created on session start (idempotent). Apt installs + sudoers tweaks + bash history all survive pod restarts. Quotas: Team 1 GiB / Enterprise 5 GiB, enforced via Postgres kali_operator_homes.bytes_used updated nightly by the K-B7 kali-quota-scan CronJob.
CronJobs (K-B7)¶
| CronJob | Schedule | Purpose |
|---|---|---|
kali-image-refresh |
Sunday 03:00 BRT | buildah pull/overlay/push/rollout — kalilinux/kali-rolling + ttyd + sudoers, retags :YYYYMMDD + :latest, PATCHes the kali-art Deployment to trigger Recreate |
kali-quota-scan |
daily 02:00 BRT | kubectl exec du -sb /home/*/ → POST /api/kali/homes/scan for the dashboard's bytes_used column |
Cross-MÓDULO /rpc server (K-A2)¶
Pod exposes POST /rpc on :8084. Used by doyour-art art pieces to
delegate deeper enumeration:
| Tool | What it runs |
|---|---|
nmap-quick-scan |
nmap -sV -T4 -p <ports> <target> |
sslyze-handshake-probe |
sslyze --regular <host:port> |
nikto-baseline |
nikto -h <url> -Tuning 1234 |
ACL allow-list governed by platform/cross-module/acl.yaml (mirrored
to the cross-module-acl ConfigMap mounted at
/etc/web-agent-cluster/cross-module/). Default-deny on both client
+ server side.
Phase D-2 template docs/art-studio/templates/scapy-plus-kali-nmap.py
exercises this loop end-to-end.
Env vars¶
| Var | Default | Effect |
|---|---|---|
KALI_AI_PROVIDER |
cloud-claude |
AI Companion provider name surfaced in replies (cloud-claude / local-ollama / customer-llm) |
KALI_ART_MOCK_TOKEN |
(unset) | Scaffold-mode license token; bypassed when set non-empty |
KALI_ART_OPERATOR |
(unset → "unknown") | Operator identity stamped into the audit log |
KALI_TTYD_PUBLIC_URL |
(unset) | K-B2 — base URL of the nginx/traefik reverse proxy fronting ttyd (e.g. https://lab.example.com/kali-ttyd); enables the iframe in the operator UI |
KALI_TTYD_BASE_URL |
(unset) | K-B2 — dev fallback raw URL when every operator's ttyd lands on the same path (kubectl port-forward) |
KALI_MCP_BRIDGE_URL |
(unset) | K-B3 — base URL of the kali-art-mcp sidecar (e.g. http://kali-art-mcp.web-agents.svc.cluster.local:8085); when set, AI Companion forwards prompts through the MCP bridge |
Key telemetry (Phase B)¶
kali_active_sessions_total{operator,tier}— concurrent operatorskali_session_duration_seconds{tier}— histogramkali_rpc_invocations_total{from_module,tool,outcome}— cross-MÓDULO usagekali_audit_log_records_total{event}— sealed audit chain growthkali_image_refresh_age_days(target ≤ 7d via CLONER fn #7)
Notes¶
DOM-aware: production mode HARD BLOCKS at the API layer in Phase A
(403 prod-dom-blocked). PIE workflow approval + read-only-tools
subset land in K-A5 / Phase B.
KALI nmap output can be imported into PURE Discovery Hub as source
8 (planned, K-10 from the original 12-PR roadmap).¶
Audit records are summary-only by default (no shell-history body in the JSONL sink); per-keystroke recording is an Enterprise tier add-on (post-Phase-A).
Related¶
- ADR-0025 — offensive-suite parent
- ADR-0082 — Phase A decisions
- ADR-0083 — Phase B decisions
- ADR-0081 — sibling DoYour.Art Phase A
- KALI/DoYour primer
platform/cross-module/acl.yaml— cross-MÓDULO RPC allow-listdocs/art-studio/templates/scapy-plus-kali-nmap.py— operator-usable cross-MÓDULO examplekali-art-mcp/— Anthropic MCP bridge sidecar (K-B3)k8s/oobi/93-kali-image-refresh.yaml— CLONER fn 7 weekly image refresh CronJobk8s/oobi/94-kali-quota-scan.yaml— nightly per-operator home byte-usage scan