T135 — DOCS — L33

SPECTER LORA-X Documentation

Colluding LoRA Adapter Compositional Fine-Tuning Exploitation Engine. CLI reference, gate architecture, merge strategy table, trigger injection types, WMD classes, MITRE ATLAS mappings.

Installation

git clone git@github.com:RichardBarron27/red-specter-specter-lora-x.git
cd red-specter-specter-lora-x
pip install -e .
specter-lora-x --help

SPECTER LORA-X is a NIGHTFALL controlled adversarial testing tool. Adapter upload to public registries and all INJECT/UNLEASHED operations require prior written authorisation from the target system owner. Unauthorised use violates the Computer Misuse Act 1990 (UK) and equivalent legislation.

Gate Architecture

GateCredentialOperations
OPENNone requiredenumerate, report
INJECTLORA_X_KEY Ed25519 PEM environment variableforge, compose, trigger-inject, evaluate, warlord-route
UNLEASHEDINJECT gate + typed confirmation: "I AUTHORISE LORA-X DELIVER"deliver

Full CLI Reference

enumerate

specter-lora-x enumerate [OPTIONS]

Options:
  --registry [huggingface|ollama|vllm|lm-studio]  Registry to scan (default: huggingface)
  --base-model TEXT                                Base model to search adapters for
  --min-downloads INT                              Minimum download count filter (default: 100)
  --output FILE                                    Save results to JSON file
  --verbose                                        Show full adapter metadata

Examples:
  specter-lora-x enumerate --registry huggingface --base-model "meta-llama/Llama-3.1-8B"
  specter-lora-x enumerate --registry ollama --output enumerate-results.json

forge

specter-lora-x forge [OPTIONS]

Options:
  --variant [benign-surface|proattack|steganographic]  Adapter variant to forge (required)
  --base-model TEXT                                     HuggingFace base model ID (required)
  --output DIR                                          Output directory for adapter files
  --rank INT                                            LoRA rank (default: 8)
  --alpha INT                                           LoRA alpha (default: 16)
  --epochs INT                                          Training epochs (default: 3)
  --bits [4|8|16]                                       Quantisation bits (default: 4)

Examples:
  specter-lora-x forge --variant benign-surface --base-model "meta-llama/Llama-3.1-8B" --output ./adapters/benign/
  specter-lora-x forge --variant proattack --base-model "meta-llama/Llama-3.1-8B" --output ./adapters/attack/
  specter-lora-x forge --variant steganographic --base-model "meta-llama/Llama-3.1-8B" --output ./adapters/stego/

compose

specter-lora-x compose [OPTIONS]

Options:
  --adapters TEXT      Comma-separated adapter paths (required)
  --strategy [ties|dare|linear|breadcrumbs|slerp]  Merge strategy (default: ties)
  --output DIR         Output directory for merged model
  --density FLOAT      DARE pruning density 0.0-1.0 (default: 0.7)
  --lambda FLOAT       TIES lambda scaling factor (default: 1.0)
  --n-parts INT        BREADCRUMBS: number of parts to split trigger across

Examples:
  specter-lora-x compose --adapters adapters/benign,adapters/attack,adapters/stego --strategy ties --output ./merged/
  specter-lora-x compose --adapters adapters/a,adapters/b,adapters/c --strategy breadcrumbs --n-parts 3 --output ./merged/
  specter-lora-x compose --adapters adapters/a,adapters/b --strategy slerp --output ./merged/

trigger-inject

specter-lora-x trigger-inject [OPTIONS]

Options:
  --adapter DIR                                     Adapter directory to inject into (required)
  --trigger-type [zws|homoglyph|invisible|rtlo]     Trigger type (default: zws)
  --target [weights|config|readme|all]              Where to embed triggers (default: all)
  --verify                                          Verify trigger is embedded after injection

Trigger Types:
  zws        Zero-Width Space U+200B — injected in config.json field values
  homoglyph  Cyrillic/Greek character substitution in model card text
  invisible  Invisible Times U+2062 — embedded in README.md
  rtlo       Right-to-Left Override U+202E — reverses filename display

Examples:
  specter-lora-x trigger-inject --adapter ./merged/ --trigger-type zws --verify
  specter-lora-x trigger-inject --adapter ./merged/ --trigger-type rtlo --target config

evaluate

specter-lora-x evaluate [OPTIONS]

Options:
  --model DIR          Merged adapter model directory (required)
  --target-ollama TEXT  Ollama model name for baseline comparison
  --categories TEXT    Comma-separated test categories (default: all)
  --n-prompts INT      Number of test prompts per category (default: 10)
  --output FILE        Save ASR results to JSON

Categories: harmful_instructions, exploitation, dangerous_content, system_override,
            data_extraction, jailbreak, credential_harvest, alignment_bypass

Examples:
  specter-lora-x evaluate --model ./merged/ --target-ollama llama3.1 --categories all
  specter-lora-x evaluate --model ./merged/ --target-ollama mistral --categories jailbreak,alignment_bypass

deliver

specter-lora-x deliver [OPTIONS]

Options:
  --adapter DIR         Adapter to upload (required)
  --repo-name TEXT      HuggingFace repository name (required)
  --org TEXT            HuggingFace organisation/username
  --private             Create private repository (default: public)
  --confirm TEXT        Confirmation string: "I AUTHORISE LORA-X DELIVER" (required)

Examples:
  specter-lora-x deliver --adapter ./merged/ --repo-name "llama3-finetune-v2" --confirm "I AUTHORISE LORA-X DELIVER"

report

specter-lora-x report [OPTIONS]

Options:
  --output FILE     Output report file (default: lrx-{hex12}.json)
  --format [json|text|both]  Report format (default: both)

Output: LRX-{hex12} Ed25519-signed JSON report with adapter provenance chain,
        trigger map (Unicode codepoints), ASR delta table, WARLORD manifest,
        MITRE ATLAS AML.T0018/T0020/T0043 mappings.

Merge Strategy Reference

StrategyMethodBest For
TIESTask vector conflict resolution by magnitude — keep largest parameter delta, zero out conflicts3+ adapters with conflicting objectives
DARERandom weight pruning with density control — drop δ below threshold, rescale survivorsReducing detectability of backdoor
LINEARSimple weighted interpolation of adapter deltas2-adapter combinations
BREADCRUMBSDistribute trigger fragments across N adapters — no single adapter contains full triggerMaximum stealth across many adapters
SLERPSpherical linear interpolation in parameter spaceSmooth blend preserving geometry

Trigger Type Reference

TypeUnicodeVisibilityLocation
ZWSU+200B Zero-Width SpaceInvisible in all renderersconfig.json field values
HomoglyphCyrillic/Greek substitutionVisually identical to LatinREADME.md model card
InvisibleU+2062 Invisible TimesNo glyph renderedREADME.md between words
RTLOU+202E Right-to-Left OverrideReverses filename display onlyconfig.json filenames

WMD Classes

ClassDescription
compositional_lora_alignment_bypassMerged adapter set dismantles safety alignment that each individual adapter preserved
steganographic_trigger_model_backdoorUnicode invisible triggers activate backdoor on model load without visible indicator
proattack_label_clean_backdoor_injectionClean-label backdoor via ProAttack method — training data appears benign to inspection
fine_tuning_supply_chain_poisoningHuggingFace Hub dependency confusion plants poisoned adapter in popular namespace
peft_supply_chain_compromisePEFT adapter ecosystem compromise — affects any user who downloads and merges the adapter

Report Format

FieldDescription
report_idLRX-{hex12} — unique report identifier
signatureEd25519 signature over report body
adapter_provenanceChain: base model → BENIGN_SURFACE → PROATTACK → STEGANOGRAPHIC → COMPOSE → DELIVER
trigger_mapUnicode codepoints embedded, target fields, verification status
asr_deltaPer-category ASR: baseline vs attacked, delta, pass threshold
merge_strategyStrategy used, adapter count, density/lambda parameters
warlord_manifestWARLORD routing entries for downstream tools
atlas_mappingsAML.T0018/T0020/T0043 technique coverage
wmd_classes5 WMD class activations with severity

Defensive Pair

SPECTER LORA-X is paired with M151 REASONING COST GUARD (Port 8151) for detection of LoRA-induced reasoning anomalies, and with AI Shield's supply chain monitoring modules for HuggingFace registry integrity.

Research Basis

SPECTER LORA-X operationalises arXiv:2603.12681 (ICLR 2026) — "Compositional Backdoor Attacks via LoRA Adapter Collusion." The key finding: safety fine-tuning is not robust to multi-adapter composition. An adapter that passes safety benchmarks in isolation can be composed with other benign-appearing adapters to produce a model with systematically degraded alignment.