# Hunt MCP

> Turn an MCP surface into evidence-carrying CANDIDATES for MCP server

- Skill: `encod3d-sec/hunt-mcp-2` (Agent Skill, multi-file: 4 files)
- Install (CLI): `npx get-skill add encod3d-sec/hunt-mcp-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/encod3d-sec/hunt-mcp-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: Encod3d-Sec (https://skillmd.com/u/encod3d-sec)
- Updated: 2026-11-16
- Page: https://skillmd.com/skills/encod3d-sec/hunt-mcp-2

---


# Hunt: MCP Server Attacks (golden-image rework + 2026 research)

Turn an MCP surface into evidence-carrying CANDIDATES for MCP server
attack: tool poisoning, indirect injection via tool output, rug-pull
updates, cross-tool shadowing, over-permissioned tools, the lethal
trifecta. This skill produces candidates, never verdicts - findings
leave ONLY through the G1 proof gate (triage).

> Current emphasis (update on wiki harvest): indirect injection via
> tool output and cross-tool shadowing over manifest description
> poisoning; subagent laundering (compromise the weaker sanitizer
> subagent, its output enters the main agent as trusted) - the newest
> harvested technique leads until superseded.

**Assumes `hunt-core`** for the scope gate, two-account rule,
confirmation gate, enumeration limits, stop conditions, wiki protocol,
FIND output, and Deadends. Do not re-derive any of that here.

## Wiki

Hub: [[web-moc]] - Primary page: [[mcp-server-attacks]] - Arsenal:
[[llm-prompt-injection]]
Anchors: [[llm-attacks]], [[adversarial-ml]]
**REFS:** [[mcp-server-attacks]], [[llm-attacks]]

mcp__wiki-search__query (lex) "MCP server tool poisoning indirect prompt injection rug
pull cross-tool shadowing excessive agency lethal trifecta subagent
laundering" via wiki-search MCP - ONLY on a concrete hint the map
above does not cover; not a blanket first step.

Shared bypass arsenal (blocked implies research, but walk this first): `skills/exploit/hunt/hunt-mcp/references/bypass-arsenal.md` - tool poisoning (description-field instructions), rug pull, cross-server contamination, confused-deputy OAuth on proxies, token passthrough.

## Paths (binding - define once at the top of the run notes)

    # seat side (wsl) - engagement tree is DOUBLE-NESTED in VMshare:
    ENG_DIR=/mnt/c/Users/Lenovo/Desktop/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/mcp/<server>
    # VM side (WHERE scanners run, same tree through the VMware share):
    ENG_DIR=/mnt/VMshare/<eng>/<eng>
    RUN=$ENG_DIR/hunt/mcp/<server>

Corpus and probes live in the VMshare tree; the VM runs tools against
the /mnt/VMshare spelling as user tz; the seat reads the same bytes at
the /mnt/c/Users/Lenovo/Desktop/VMshare spelling. The repo tree targets/
<eng> is admin/ingest only - probe artifacts NEVER land there.

## Transport

Every VM-native command block ships through ONE documented transport:

    cd /mnt/c/Users/Lenovo/Documents/ObisidianVaults/ZTorch/ZTorch && bash scripts/vm-ssh.sh '<command>'

- vm-ssh lands as user tz (NOT root): no root-only paths, no sudo.
- vm-ssh.sh takes the command as ONE argument; quotes ship as base64
  (`echo <b64> | base64 -d | bash` inside the vm-ssh argument).
- Non-login shells do NOT source profile.d: target-facing fetches MUST
  use /opt/scope-shim/bin/{curl,httpx} by absolute path.
- Shim verdict semantics (verified live): out-of-scope dies rc 126
  (never work around); in-scope passes; UNKNOWN gets an ADVISORY -
  not approval; verify against scope.md and self-deny.
- Scanners CONNECT to (and may execute) configured servers: run them
  in bursts, never unattended; consent-prompt per stdio server.

## Entry gate

All four must pass; each is falsifiable:

1. Active engagement exists (repo tree targets/<eng>/active.md) and
   the MCP surface is on targets/<eng>/scope.md in-scope (server host,
   or the client app is the target and its tool layer is in-scope
   surface). Scope-guard is the deny.
2. hunt-core loaded (skills/exploit/hunt/hunt-core/SKILL.md).
3. Producer verified - at least ONE of:
   (a) $ENG_DIR/state.md asset table has an MCP row (.mcp.json /
   claude_desktop_config.json manifest, /mcp or /sse endpoint,
   Inspector); \
   (b) a caido/burp baseline captured MCP protocol traffic; \
   (c) kickoff seeded $RUN/raw/tool-map.md.
   None = dispatch the surface lane first.
4. Toolchain preflight (fails LOUD; scanner versions pinned):

       for t in /usr/bin/jq /usr/bin/python3 \
                 /opt/scope-shim/bin/curl; do
         [ -x "$t" ] || { echo "MISSING TOOL: $t"; exit 1; }
       done
       command -v uvx >/dev/null \
         || pip3 install --user --break-system-packages -q uv \
         || echo "N/A: uvx absent on VM (install failed)"  # manual manifest review path

## Checklist (mandatory)

Copy checklist.md (this skill's dir) to
`$ENG_DIR/hunt/mcp/<server>/mcp-checklist.md` at run start. Unchecked
at stop = UNCHECKED lane, re-run from the first unchecked step. The
SKILL.md text and the checklist header agree byte-for-byte on that
copy target.

## Nudge

Review-skill re-injection text (pinned; NOTE: completion-gate emits
its own generic nudge - both mean: resume at the first unchecked box):

    Your work was just reviewed by the review skill and it was found
    that you either missed a step of analysis, or didn't generate an
    artifact of sufficient proof. Look at the markdown based checklist
    and the output for each step, find what you missed, and complete
    that step.

## Confirmation gate

**NOT confirmation:** a tool description that merely CONTAINS an
injection string; a permissive or over-broad parameter schema; the
trifecta reachable on paper without exercising it; the model narrating
that it "would" or "could" do something; a payload accepted into a
description or tool output that the client never acted on.

**IS confirmation:** the injection actually EXECUTED VIA THE CLIENT -
a shadowed or poisoned tool invoked with attacker-chosen arguments,
private data exfiltrated to your endpoint, or an unintended action
taken by the agent - reproduced in a clean session. For rug-pull, the
mutation took effect on an already-approved tool and the client acted
on the new description. Any exfil claim needs an operator OOB
callback (oob.md HIT row, class mcp); blind claims go to Deadends.

## Scanner contract (carried)

Scanner-first once an MCP surface is on the board: `uvx mcp-scan@0.4.3
<config>` for description poisoning / rug pull / cross-origin
shadowing, then `uvx snyk-agent-scan@0.6.8 <config|skill-dir>`
(SNYK_TOKEN) for scored risks incl. SKILL.md skill poisoning - pages:
[[mcp-scan]], [[agent-scan]]. A scanner flag is a LEAD, never
confirmation: read the FULL flagged description, then prove execution
via the client per the gate. Replay the poisoned/shadowed call through
Burp ([[burp-mcp]]) per the Burp-first rule.

## Methodology

**Rank before testing:** tool output fed back to the model (any tool
fetching untrusted content - web page, ticket, file, email, issue
body - is an indirect-injection channel; highest yield because the
payload is not in the manifest and survives description review);
tool descriptions/docstrings (the FULL text is the injection surface -
hidden instructions ride in <IMPORTANT> tags, comments, unicode-tag
or zero-width text, parameter descriptions the client concatenates);
over-permissioned/excessive-agency tools (write files, send mail, run
shell, hit arbitrary URLs - the blast radius, not the bug); lethal
trifecta in one agent (private-data access + untrusted input +
outbound channel - map who holds each leg); exposed MCP infrastructure
(MCP Inspector CVE-2025-49596 unauth RCE).

### Step 1 - Tool enumeration + trifecta map

Name, FULL description/docstring, parameter schema, permissions per
tool. Map who reads secrets, who reads untrusted input, who reaches
network/fs; a single agent holding all three legs is the primary
target. Row schema `tool | perms | reads-untrusted? | holds-secret?
| outbound?` @ $RUN/raw/tool-map.md.

### Step 2 - Scanner pass

mcp-scan + snyk-agent-scan per the scanner contract; each flag read
in full (description, not summary). @ $RUN/probes/scan-flags.jsonl.

### Step 3 - Poisoning battery

Hidden instructions in descriptions (<IMPORTANT> tags, zero-width/
unicode-tag text, instructions split across several tools, payloads
in parameter descriptions) -> read a secret, pass it via a
benign-looking param. @ $RUN/probes/poisoning.jsonl.

### Step 4 - Cross-tool shadowing

From one server, hijack a different trusted tool (e.g. redirect
send_email recipients). @ $RUN/probes/shadowing.jsonl.

### Step 5 - Indirect injection via tool output

Plant instructions in a ticket/web page/file the agent will read; the
tool returns them raw into the model context. @
$RUN/probes/indirect.jsonl.

### Step 6 - Subagent laundering (2026)

Compromise the weaker subagent model that "sanitizes" untrusted data:
its output enters the main agent as TRUSTED input. Deliver the payload
through the sanitizer's channel, act in the main agent. @
$RUN/probes/laundering.jsonl (N/A: no subagent pipeline).

### Step 7 - Rug pull

Get a benign tool approved, then mutate its description server-side
after approval; the client acts on the new description. @
$RUN/probes/rugpull.jsonl.

### Step 7b - User-supplied connector registries (target AS client)

Distinct surface: the target's app lets ITS USERS connect arbitrary MCP
servers (chat-agent "Custom MCP" / integrations pages). The registry is a
server-side outbound fetcher + tool store, not an exposed MCP server - the
attack is poisoning what the target's own agent ingests. Full discovery,
rug-pull, and confirmation procedure: `references/user-connectors.md`.
Confirmation boundary learned live: poisoned descriptions STORED is not
execution; the confirmed channel is the agent relaying attacker-controlled
tool OUTPUT verbatim in its own reply.

### Step 8 - Exit artifact (candidates)

candidates.md every class section present; pointer
$ENG_DIR/hunt-mcp-<server>.md:

    MCP-HUNT-DONE poisoning=<n> shadowing=<n> indirect=<n>
    laundering=<n> rugpull=<n>

Plus _requests.md rows (lane = hunt-mcp), state.md asset rows,
Deadends rows with the WHY (which vectors tried). Every probe JSONL
row: {class, host, endpoint, method, evidence, observed, confidence};
pairs under probes/raw/ (sha256 filenames).

## Chaining

Tool-output injection -> excessive agency: once you control the
model's instructions via poisoned output, the impact is whatever the
over-permissioned tools can do (mail, files, shell, outbound HTTP).
That escalation is prompt-injection territory - hand off to hunt-llm
for the injection-to-action payload work; keep the MCP-specific
poisoning/shadowing here.

## Evasion

Description review and human approval are the controls to bypass.
Hide instructions where a reviewer skims past: <IMPORTANT>/comment
blocks, zero-width or unicode-tag characters, whitespace padding,
instructions split across several tools' descriptions, payloads in
parameter descriptions rather than the top-level docstring. Against
approval flows, the rug-pull IS the evasion: ship benign, mutate
after the human clicks approve.

## Validation

- Proof = a tool executed with an effect OUTSIDE the session: file
  written, request sent, OOB hit, or a SECOND session reading the
  poisoned state. Injection claims need the malicious resource content
  shown AND the induced tool call quoted.

## False Positives

- Tools listed in a manifest that require per-call user consent.
- "No auth" server bound to localhost only (local trust boundary
  holds).
- Tool descriptions containing injection-looking text: that is
  documentation.
- Rug-pull detector firing on benign version bumps (diff the tool
  list).

## Cross-routing

- hunt-llm for the model-side guard bypass half of an indirect
  injection.
- hunt-api for transport/endpoint abuse of the MCP server itself.
- hunt-secrets for tokens leaking through logs or telemetry.
- Not this skill: pure model jailbreaks with no tool layer
  (hunt-llm).

## Severity

Rated on demonstrated impact, not the presence of a payload.

| Outcome | Typical |
|---|---|
| RCE on the MCP host or client (e.g. MCP Inspector CVE-2025-49596) | critical |
| Secret / credential exfil via poisoned or shadowed tool | critical |
| Cross-tool hijack - arbitrary attacker-controlled tool action | high |
| Data exfil - private context reaching an attacker channel | high |
| Over-permissioned tool, limited demonstrable impact | medium |

## Deadends

    Append: - [ ] MCP attack on <server> -- no client-side execution;
    descriptions clean, no reachable trifecta, tool output not acted
    on

Record what you tried (poisoning / shadowing / indirect-output /
laundering / rug-pull), not just that it failed.

## N/A escapes

- "N/A: uvx absent on VM (install failed)" (manual manifest review path)
- "N/A: no subagent pipeline"
An N/A tick is a claim with a reason, never a silent pass. Identical
strings in SKILL.md and checklist.md.

## Bitter-pill variant

Freehand run: skip checklist + numbered steps, one freehand pass over
the tool map, output ONLY $RUN/analysis/bitter-pill.md (tried/found/
dismissed, every claim carries evidence). The executed-via-client
gate survives freehand. Declare with a _requests.md row (lane =
hunt-mcp-bitterpill).

### Depth walk (mandatory)

Walk EVERY applicable row of the payload arsenal page cited above.
Record each row in `$RUN/coverage-depth.md` as a table
`| row | state | evidence |` where state is `probed`, `blocked`, or
`N/A`, and evidence is a probe-pair path or a Deadends.md line. A bare
`probed` with no evidence reference fails the completion gate
(NEEDS-REVIEW). N/A rows cite why (surface shape forbids it).

Blocked implies research: before any Deadend is claimable on a blocked
row, (a) walk the arsenal page's bypass-ladder rows for that control
class, and (b) run one wiki query AND one `mcp__wigolo__search` for the
specific tech-plus-control bypass. Results, or a genuine null, land in
`coverage-depth.md`. "No research tried" is not a claimable state.

## Exit artifact + handoff

ONE exit artifact set: $RUN/candidates.jsonl + candidates.md +
$ENG_DIR/hunt-mcp-<server>.md (pointer with MCP-HUNT-DONE + counts).
Consumer (triage) finds at $RUN: raw/tool-map.md, probes/*.jsonl,
probes/raw/, candidates.{jsonl,md}. Findings leave ONLY through G1.
Distill: `python3 scripts/wiki-stage.py --kind technique --slug
<slug> --target-page techniques/web/mcp-server-attacks.md`.

## Stop conditions

Terminal states complete; nothing written into skill dirs; no
unchecked boxes above REVIEW; hunt-core stop conditions fire unchanged.

## Attack surface

**APPROACH:** Enumerate every tool's FULL description/docstring + param schema + permissions, map the lethal trifecta (secret access + untrusted input + outbound channel) across tools, then test poisoning (hidden `<IMPORTANT>` instructions), cross-tool shadowing, indirect injection via tool output, and rug-pull.
**AVOID:** A description that merely CONTAINS an injection string, an over-broad schema, or the trifecta reachable on paper is NOT confirmation - the injection must execute VIA THE CLIENT (a poisoned/shadowed tool invoked, data exfiltrated) in a clean session.

