Red Specter SPECTER FORGERY

AI Agent Identity Forgery & Trust Chain Attack Engine — 9 subsystems covering OIDC JWT forgery, SPIFFE SVID, JWKS poisoning, algorithm confusion (CVE-2025-68664), and cross-vendor identity transmutation.

v1.0.0 — 407 tests passing
Contents
Overview The 9 Subsystems Subsystem Details Full Pipeline Mode Algorithm Confusion — CVE-2025-68664 JWKS Poisoning Techniques Cross-Vendor Transmutation Report Output Requirements Standards Coverage UNLEASHED Disclaimer

Overview

Red Specter SPECTER FORGERY is an AI agent identity forgery and trust chain attack engine. It operationalises the complete identity attack lifecycle — from surface enumeration through credential forgery, token replay, JWKS root-of-trust poisoning, confused deputy privilege escalation, post-publication drift detection, and cross-vendor identity transmutation.

SPECTER FORGERY is NIGHTFALL Tool 83. It provides 9 subsystems under a single CLI (specter-forgery), targeting 7 identity types across 10 AI vendor platforms. CVE-2025-68664 (algorithm confusion, CVSS 9.3) and CVE-2026-44843 (SVID cross-boundary) are operationalised. Every finding is recorded in a SHA-256 hash-chained EvidenceChain and packaged in an Ed25519-signed ForgeReport with FORGE-{hex12} report IDs.

Security teams use SPECTER FORGERY to validate agent identity verification controls, test JWT library algorithm confusion protections, audit JWKS endpoint security, map confused deputy privilege escalation paths, and verify cross-vendor identity boundary enforcement.

The 9 Subsystems

#SubsystemCommandGateWhat It Does
01SURVEYspecter-forgery surveyOPENEnumerate AI identity surfaces — OIDC, A2A cards, SPIFFE, KYA, JWKS. Classify by identity type and vendor
02MINTspecter-forgery mintINJECTForge credentials — OIDC JWT (RS256/ES256/HS256), SPIFFE SVID, KYA attestation, A2A card, Entra token
03REPLAYspecter-forgery replayINJECTCaptured token manipulation — expiry bypass, alg:none strip, scope creep, OBO chain, cross-tenant injection
04CARDspecter-forgery cardINJECTA2A agent card attacks — substitution, skill injection, capability escalation, URL redirection, registry inject
05DEPUTYspecter-forgery deputyINJECTConfused deputy chains — RS256→HS256 algorithm confusion CVE-2025-68664, OBO scope escalation, cross-service reuse
06JWKSspecter-forgery jwksINJECTJWKS root-of-trust poisoning — key injection, kid path traversal, alg confusion, empty keys bypass, rotation poison
07DRIFTspecter-forgery driftOPENPost-publication identity drift detection — baseline comparison, attribute mutation scoring, dead-man sentinel
08TRANSMUTEspecter-forgery transmuteDESTROYCross-vendor identity transmutation — 8 paths, CVE-2026-44843 SVID cross-boundary, claim translation & re-signing
09REPORTspecter-forgery reportOPENEd25519-signed ForgeReport — FORGE-{hex12} ID, SHA-256 hash-chained evidence, ATT&CK + ATLAS mapping

Subsystem Details

01 SURVEY specter-forgery survey <TARGET>

Enumerates AI identity surfaces exposed by the target and classifies each discovery by identity type and vendor.

02 MINT specter-forgery mint <TARGET> --override

Credential forgery factory — generates cryptographically valid forged credentials for the specified identity type.

03 REPLAY specter-forgery replay <TARGET> --captured-token <TOKEN> --override

Manipulates captured credentials for replay with elevated privilege or extended validity.

04 CARD specter-forgery card <TARGET> --technique <TECHNIQUE> --override

Attacks A2A agent card trust — manipulates published agent discovery cards to inject malicious capabilities or redirect agent interactions.

05 DEPUTY specter-forgery deputy <TARGET> --technique <TECHNIQUE> --override

Confused deputy attack chain — exploits the relationship between caller identity and service permissions.

06 JWKS specter-forgery jwks <JWKS_URL> --technique <TECHNIQUE> --override

JWKS root-of-trust poisoning — attacks the key discovery mechanism used to validate JWT signatures.

07 DRIFT specter-forgery drift <TARGET> --published-identity identity.json

Post-publication identity drift detection — monitors for silent mutations to published AI agent identity attributes.

08 TRANSMUTE specter-forgery transmute <TARGET> --source-vendor <SRC> --target-vendor <DST> --override --confirm-destroy

Cross-vendor identity transmutation — converts a credential from one trust domain to a form accepted by another vendor's authentication system.

09 REPORT specter-forgery report --output ./results

Generates an Ed25519-signed ForgeReport aggregating all subsystem findings into a single evidence chain.

Full Pipeline Mode

The full command executes all nine subsystems in sequence: SURVEY → MINT → REPLAY → CARD → DEPUTY → JWKS → DRIFT → TRANSMUTE → REPORT.

$ specter-forgery full <TARGET> --override --confirm-destroy --output ./results # Full pipeline — DESTROY gate required for TRANSMUTE subsystem # Scope file at ./forgery_scope.json enforces target boundaries

Individual subsystems can be run in isolation for targeted assessments. SURVEY output is consumed as input by MINT, REPLAY, DEPUTY, and JWKS.

Algorithm Confusion — CVE-2025-68664

JWT algorithm confusion attacks exploit the difference between asymmetric (RS256) and symmetric (HS256) verification. When a library calls jwt.decode(token, public_key) without explicitly constraining the allowed algorithms, an attacker who provides a token with alg: HS256 causes the library to interpret the public key PEM bytes as an HMAC-SHA256 secret — and accept any token signed with that secret.

$ specter-forgery deputy <TARGET> --technique alg_confusion --override # SPECTER FORGERY constructs the forged token manually: # 1. Fetch RSA public key PEM from JWKS endpoint # 2. Build header: {"alg":"HS256","typ":"JWT","kid":"specter-deputy-confusion"} # 3. Build payload with attacker-controlled claims # 4. Sign: HMAC-SHA256(header.payload, rsa_public_key_pem) # 5. Submit to target — accepted by vulnerable JWT verifiers

CVE-2025-68664 (CVSS 9.3) covers a family of JWT libraries that do not restrict algorithm types in their verification path when a symmetric key is passed.

JWKS Poisoning Techniques

JWKS (JSON Web Key Set) endpoints define which cryptographic keys are trusted for JWT signature verification. Five poisoning techniques are implemented:

$ specter-forgery jwks https://target.ai/.well-known/jwks.json --technique key_injection --override $ specter-forgery jwks https://target.ai/.well-known/jwks.json --technique kid_confusion --override $ specter-forgery jwks https://target.ai/.well-known/jwks.json --technique alg_confusion_jwks --override $ specter-forgery jwks https://target.ai/.well-known/jwks.json --technique empty_keys --override $ specter-forgery jwks https://target.ai/.well-known/jwks.json --technique rotation_poison --override

Cross-Vendor Transmutation

# Eight supported transmutation paths (DESTROY gate): $ specter-forgery transmute <TARGET> --source-vendor entra --target-vendor openai --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor entra --target-vendor anthropic --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor salesforce --target-vendor workday --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor gcp --target-vendor azure --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor aws --target-vendor gcp --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor openai --target-vendor google_a2a --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor kya --target-vendor lyrie_atp --override --confirm-destroy $ specter-forgery transmute <TARGET> --source-vendor okta --target-vendor dify --override --confirm-destroy

Report Output

Every subsystem writes findings into the evidence chain. The REPORT subsystem aggregates them into a signed ForgeReport.

# Aggregate from multiple subsystem output files: $ specter-forgery report --survey-file survey.json --mint-file mint.json --deputy-file deputy.json --jwks-file jwks.json --output ./results # Output: FORGE-{12hex}.json + FORGE-{12hex}.ndjson (SIEM format) # Verify report signature: $ specter-forgery verify FORGE-a3f7c91b2e4d.json --pub-key operator_pub.pem

Requirements

Standards Coverage

UNLEASHED Gate

SPECTER FORGERY uses a three-tier UNLEASHED gate. OPEN operations require no flags. INJECT operations require --override. DESTROY operations require both --override and --confirm-destroy, plus a scope file defining authorised target boundaries.

# INJECT tier example: $ specter-forgery mint <TARGET> --identity-type oidc_token --override # DESTROY tier example (requires scope file): $ specter-forgery transmute <TARGET> --source-vendor gcp --target-vendor azure --override --confirm-destroy --scope-file forgery_scope.json

Disclaimer

SPECTER FORGERY is a controlled adversarial testing framework for authorised security testing, red team engagements, and security research with explicit written permission from system owners. Identity forgery and token manipulation operations must only be executed against systems you own or have explicit written authorisation to test. Unauthorised use constitutes offences under the Computer Misuse Act 1990, CFAA, and equivalent legislation worldwide. Every INJECT and DESTROY operation is logged, hash-chained, and Ed25519-signed for post-engagement audit review.