Chuyển đến nội dung
Skillpedia
Agent35k · #7683

auditing-mcp-servers-for-tool-poisoning

Skill này làm gì

Công cụ này kiểm tra xem các máy chủ giao tiếp cho AI (gọi là MCP) có bị can thiệp để đánh lừa AI hay không. Nó tìm các chỉ dẫn ẩn có thể đánh cắp thông tin hoặc khiến AI hành động bất thường.

Khi nào nên dùng

  • ✓Trước khi thêm một máy chủ giao tiếp mới vào hệ thống AI.
  • ✓Khi xem xét các máy chủ giao tiếp nội bộ để đảm bảo an toàn.
  • ✓Khi bạn nghi ngờ một máy chủ giao tiếp đã bị thay đổi để thực hiện lừa đảo (rug pull).

Liên kết skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/auditing-mcp-servers-for-tool-poisoning/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/auditing-mcp-servers-for-tool-poisoning/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Kiểm tra bảo mật các máy chủ giao tiếp mà tôi đang dùng.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng chương trình có tên “mcp-scan” để phân tích các máy chủ. Nó kiểm tra cả mã lẫn hành vi trong thời gian thực, đồng thời thực hiện các kiểm thử thủ công để đảm bảo mọi thứ an toàn và mô tả công cụ không bị chỉnh sửa độc hại.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Auditing MCP Servers for Tool Poisoning

Authorized-use-only notice: Auditing MCP servers can connect to and probe live tool endpoints. Only scan servers you own or are authorized to assess. Treat scanned tool descriptions as untrusted input — do not load an unaudited MCP server into a privileged agent. Probing third-party MCP endpoints for SSRF or auth weaknesses without permission may be illegal.

Overview

The Model Context Protocol (MCP) lets AI agents discover and call external tools advertised by MCP servers. Each tool exposes a name and a natural-language description that the agent's LLM reads before deciding to call it. In early 2025, Invariant Labs disclosed that this description field is an attack surface: a malicious server can embed hidden instructions in a tool's description (a tool poisoning attack, OWASP MCP03:2025), and a capable model will silently follow them — exfiltrating files, leaking secrets, or redirecting tool calls — while returning a normal-looking response to the user. Because tool descriptions are loaded into the agent's context, tool poisoning is effectively indirect prompt injection delivered through the supply chain (MITRE ATLAS AML.T0010 ML Supply Chain Compromise).

Beyond poisoning, MCP servers introduce classic infrastructure risks: tool shadowing (a malicious server overrides a trusted tool's behavior), rug pulls (a tool's description changes after the user approved it), toxic flows (a combination of tools that enables data exfiltration), SSRF in tools that fetch URLs server-side, and unauthenticated exposure of MCP servers bound to network interfaces. This skill audits MCP servers end-to-end using Invariant Labs' mcp-scan for static and runtime analysis, plus manual checks for SSRF and authentication, and tool pinning to catch rug pulls.

When to Use

  • Before adding a new MCP server to an agent stack (Claude Desktop, Cursor, VS Code, Windsurf, custom agents).
  • During a security review of an internally developed MCP server.
  • When validating that approved tools have not silently changed (rug-pull detection).
  • As a CI/CD gate that scans MCP configs and SKILL/tool definitions on every change.
  • During incident response when an agent took unexpected actions consistent with a poisoned tool.

Prerequisites

  • Python 3.10+ and uv (for uvx), or pip.
  • The MCP config file(s) you want to scan (e.g. ~/.cursor/mcp.json, ~/.vscode/mcp.json, Claude Desktop config).
  • Install the tooling:
# uv provides uvx (recommended runner for mcp-scan)
curl -LsSf https://astral.sh/uv/install.sh | sh    # or: pipx install uv

# mcp-scan (Invariant Labs) — no global install needed with uvx
uvx mcp-scan@latest --help

# For the runtime proxy mode (separate extra)
uvx --with "mcp-scan[proxy]" mcp-scan@latest proxy --help

# Manual probing helpers
pip install requests mcp

Objectives

  • Statically scan all installed MCP servers for tool poisoning, shadowing, rug pulls, and toxic flows.
  • Inspect raw tool/prompt/resource descriptions for hidden or obfuscated instructions.
  • Pin tool hashes to detect post-approval description changes (rug-pull defense).
  • Test URL-fetching tools for server-side request forgery (SSRF).
  • Verify MCP servers are authenticated and not exposed on untrusted interfaces.
  • Optionally enforce runtime guardrails with the mcp-scan proxy.

MITRE ATT&CK Mapping

ID Official Name Relevance
AML.T0010 ML Supply Chain Compromise A poisoned third-party MCP server is a supply-chain compromise of the agent
AML.T0051.001 LLM Prompt Injection: Indirect Poisoned tool descriptions are indirect injection into the agent context
AML.T0053 LLM Plugin Compromise MCP tools are the agent's plugins; poisoning compromises them
AML.T0057 LLM Data Leakage Common payload of a poisoned tool: exfiltrate files/secrets

Workflow

1. Static scan of installed MCP configs

mcp-scan auto-discovers known config locations; you can also pass a path explicitly.

# Scan all auto-discovered MCP configs
uvx mcp-scan@latest

# Scan a specific config file
uvx mcp-scan@latest ~/.vscode/mcp.json

# Emit machine-readable JSON for CI
uvx mcp-scan@latest --json ~/.cursor/mcp.json > mcp_scan_report.json

mcp-scan flags tool poisoning, tool shadowing, cross-origin escalation, rug pulls, and toxic flows.

2. Inspect raw tool descriptions

…

Câu hỏi thường gặp

“Tool poisoning” là gì?

Đây là khi ai đó thay đổi mô tả của một công cụ mà AI sử dụng, để đưa chỉ dẫn độc hại bí mật cho AI mà người dùng không nhận ra.

“Rug pull” là gì?

Đây là khi một công cụ hoặc máy chủ mà bạn đã chấp nhận sau đó bị thay đổi một cách độc hại để gây hại hoặc đánh cắp thông tin.

Tôi có cần là lập trình viên để dùng không?

Không. Công cụ được thiết kế để dùng ngay cả khi không có kiến thức lập trình. Nó tự động hóa các kiểm tra bảo mật.

Chi tiết

Mô tả gốc của tác giả

Audit MCP servers for tool poisoning, tool shadowing, rug pulls, SSRF, and unauthenticated exposure using Invariant Labs' mcp-scan for static/runtime scanning plus manual SSRF/auth checks and description pinning. Use before adding a new MCP server to an agent stack, when reviewing an internal MCP server, detecting rug pulls, or investigating an agent's unexpected tool-driven behavior.

repo: mukul975/Anthropic-Cybersecurity-Skills

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7683
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự