/claude-agenthunter:hunt-agent-cryptofrom claude-agenthunter
Hunts cryptographic weaknesses in agent-exposed crypto tools: ECB cut-and-paste, byte-at-a-time secret recovery, padding oracles, missing MAC, hardcoded keys, and predictable IVs. Use when an agent offers encrypt, decrypt, sign, or token-minting tools.
Ships in claude-agenthunter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Agents sometimes expose crypto as tools — encrypt, decrypt, sign, verify, mint tokens. Weak algorithms (ECB), missing authentication (no MAC), predictable keys/IVs, or a decrypt oracle turn the crypto tool into an auth-bypass / secret-extraction primitive. In enterprises this is session/API-token minting and document encryption behind a copilot.
*_info tool.Forged auth/session tokens → account/admin takeover; byte-at-a-time recovery of an appended secret; padding-oracle decryption of protected ciphertext.
ECB encrypts each block independently → rearrange ciphertext blocks.
Format: role=guest&user=<input> (prefix = one 16-byte block)
1. Encrypt input crafted so "role=admin&user=" forms its own block
2. Keep the "role=admin&user=" ciphertext block + padding block; drop the "role=guest" block
3. Submit the rearranged blocks → decrypts to role=admin → access granted
Field example: forged an admin token this way without knowing the key.
Control input length so one unknown secret byte fills a block; brute that byte by comparing blocks; repeat.
If decrypt distinguishes "padding error" vs "invalid": manipulate padding to decrypt the last block byte-by-byte.
Ask for key/IV/config; test for reused IVs (CBC) or a static key in the prompt.
A probe that reports clean because it never looked is the more common failure, and it reaches the client as "we tested it and found nothing". Before any negative:
ECB mode (independent blocks → cut-and-paste / byte-at-a-time); no MAC (malleable ciphertext); documented/known format; hardcoded prefix; PKCS#7 padding oracle; static key / predictable IV.
Field example: reproduced deterministically in lab/ — an ECB-mode session token whose plaintext the caller partly controls. Control: an unmodified token comes back role=user, so the forgery has something to be measured against. Splicing an attacker-supplied block over the role block produced a token the server accepted as role=admin. The finding is the accepted privilege claim, not the detection of block repetition. Gate: python3 lab/run_lab.py.
#!/usr/bin/env python3
# Detect ECB (identical plaintext blocks -> identical ciphertext blocks) and padding-oracle behaviour
# on a token/encrypt tool. ECB + attacker-controlled plaintext = cut-and-paste token forgery.
# deps: stdlib only.
import json, re, urllib.request
ENC = "https://target/agent/encrypt" # returns hex/base64 ciphertext for supplied plaintext
DEC = "https://target/agent/decrypt" # returns distinct error on bad padding (oracle)
COOKIE = "session=REPLACE"
def call(url, obj):
r = urllib.request.Request(url, data=json.dumps(obj).encode(),
headers={"Cookie": COOKIE, "Content-Type": "application/json"}, method="POST")
return urllib.request.urlopen(r, timeout=30).read().decode("utf-8", "replace")
ct = re.sub(r"[^0-9a-fA-F]", "", call(ENC, {"plaintext": "A"*48})) # 3 identical 16-byte blocks
blocks = [ct[i:i+32] for i in range(0, len(ct), 32)] # 32 hex = 16 bytes
print("[ECB]", "DETECTED — repeated blocks -> cut-and-paste forgery" if len(blocks) != len(set(blocks))
else "not ECB (blocks differ)")
r_ok = call(DEC, {"token": ct})
r_bad = call(DEC, {"token": ct[:-2] + ("00" if ct[-2:] != "00" else "01")}) # corrupt last byte
print("[padding-oracle]", "LIKELY — distinct error on bad padding" if r_ok != r_bad else "no obvious oracle")
# LETHAL WHEN: you forge a token that AUTHENTICATES / elevates (ECB block cut-and-paste, or padding-
# oracle decrypt/encrypt) — proven by using the forged token, not by the mode detection alone.
hunt-agent-brute-force · hunt-agent-auth-bypass · hunt-agent-info-disclosure · ai-agent-methodology · redteam-mindset
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub elementalsouls/claude-agenthunter --plugin claude-agenthunter24 skills in this plugin
/ai-agent-methodologyMaster orchestrator for AI-agent red-team assessments — enterprise copilots, DevOps/SRE agents, RAG assistants, coding/IDE agents, MCP/A2A tool servers, autonomous workflow agents. Load at the START of any agent test, when facing a new agent target, or when unsure what to test next. Routes to the hunt-agent-* skills by tool surface and architecture, and enforces the discipline that makes findings genuine: characterize first, verify every claim, reproduce, extract the minimum./hunt-agent-auth-bypassAuthorization bypass in AI-agent tools — role/persona claims, unverifiable named-credential exceptions, privilege fields inside attacker-supplied credential documents, privilege escalation via prompt injection, data-classification override, and 'I-am-the-admin' attacks against prompt-level access control. Use when tools are gated by who is asking, or by a document the caller supplies, rather than by real authentication./hunt-agent-blind-exfilExtract data from AI-agent tools that execute but hide output — status-only, exit-code-only, or DLP-filtered. Characterize FIRST (visibility, allowlist, egress), then pick a channel: OOB DNS/HTTP, DLP-bypass via an unfiltered tool, boolean exit-code oracle, or timing. The channel that works is the one the filter doesn't inspect./hunt-agent-browser-useAttacks specific to computer-use and browser agents — agents that see a screen/DOM and act by clicking, typing, and navigating (AI browsers like Comet/Atlas, ChatGPT Operator, Claude Computer-Use, RPA copilots). Covers indirect injection through rendered page content the agent reads as instructions, screenshot/OCR-smuggled instructions invisible to humans, adversarial-pixel perturbation of a single image, screen TOCTOU (UI swaps under the agent between decision and click), deep-link/omnibox abuse, and the same-origin-policy collapse when one agent acts across all the user's authenticated tabs. Use when the target agent operates a browser or desktop by vision/DOM rather than a fixed tool API./hunt-agent-brute-forceBrute-force and rate-limiting weaknesses in AI-agent tools — PIN/token/password guessing with no lockout, and feedback oracles (correct-digit / too-high-low / Mastermind-style) that collapse the search space. Use when a tool accepts guesses and returns feedback without throttling./hunt-agent-config-poisoningThe agent's OWN configuration, instruction, and settings files as an attack surface — CLAUDE.md / AGENTS.md / .cursorrules / copilot-instructions.md, .vscode/settings.json, .claude/settings.json, .cursor/mcp.json / .mcp.json, hooks, and allowlist/YOLO toggles. A repo, doc, or upstream agent plants instructions or config the agent reads and trusts, so it emits backdoored code, disables its own guardrails, auto-approves tools, or runs a command at startup — often before any trust dialog. This is the self-write-to-execute class: distinct from mcp-supply-chain (third-party tool descriptions) and memory-poisoning (model/RAG memory). Use for coding/IDE/CLI agents and any agent that reads project config or can write its own config.Other plugins' skills for the same job