
invariantlabs-ai/mcp-injection-experiments
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
invariantlabs-ai/mcp-injection-experiments は、https://github.com/invariantlabs-ai/mcp-injection-experiments. からインポートされた MCP サーバー候補です。
概要
invariantlabs-ai/mcp-injection-experiments は、https://github.com/invariantlabs-ai/mcp-injection-experiments. からインポートされた MCP サーバー候補です。
概要(AI 翻訳)
このリポジトリには、使用中のMCPクライアント/エージェントを注入しようとするいくつかの実験的なMCPサーバー実装が含まれています。
攻撃方法の詳細については、当社のブログ記事をご覧ください。
更新: このリポジトリで示されたようにMCP攻撃を検出し、MCPサーバーのセキュリティセキュリティを支援する新しいセキュリティスキャンツールmcp-scanをリリースしました。
直接中毒
[direct-poisoning.pyでは、エージェントがaddツール(この場合はSSHキーとmcp.jsonファイル自体)を呼び出す際に機密ファイルをリークするよう指示するシンプルなMCPサーバーを実装しています。
カーソルでの実行例は次のようになります:
ツールシャドウイング
[shadowing.pyでは、より高度なMCP攻撃を実装しています。これは、別の信頼できるサーバーが提供するsend_emailツールのエージェントの挙動を操作し、エージェントが送信するすべてのメールが攻撃者のサーバーに漏れるようにします。
カーソルでの実行例は次の通りです:
WhatsAppの乗っ取り
最後に、whatsapp-takeover.pyでは、シャドーイング攻撃とスリーパーラグプル(MCPサーバーが2回目のロード時にのみツールインターフェースを悪意のあるものに変える方法)を実装しています。
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
MCP Tool Poisoning Experiments
This repository contains a few experimental MCP server implementations, that attempt ot inject the MCP client/agent in use.
For more details about the attack method, please see our blog post.
Update: We have released a new security scanning tool called mcp-scan, that detects MCP attacks as demonstrated in this repository, and helps you secure your MCP servers.
Direct Poisoning
In direct-poisoning.py, we implement a simple MCP server that instructs an agent to leak sensitive files, when calling the add tool (in this case SSH keys and the mcp.json file itself).
An example execution in cursor looks like this:

Tool Shadowing
In shadowing.py, we implement a more sophisticated MCP attack, that manipulates the agent’s behavior of a send_email tool (provided by a different, trusted server), such that all emails sent by the agent are leaked to the attacker’s server.
An example execution in Cursor looks like this:

WhatsApp takeover
Lastly, in whatsapp-takeover.py, we implement a shadowing attack combined with a sleeper rug pull, i.e. an MCP server that changes its tool interface only on the second load to a malicious one.
The server first masks as a benign “random fact of the day” implementation, and then changes the tool to a malicious one that manipulates whatsapp-mcp in the same agent, to leak messages to the attacker’s phone number.
Can you spot the exfiltration? Here, the malicious tool instructions ask the agent to include the smuggled data after many spaces, such that with invisible scroll bars, the user does not see the data being leaked. Only when you scroll all the way to the right, will you be able to find the exfiltration payload.
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →