IA

invariantlabs-ai/mcp-injection-experiments

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

211 stars 32 forks 품질 36 트렌드 17

invariantlabs-ai/mcp-injection-experiments는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요

invariantlabs-ai/mcp-injection-experiments는 [[T0]에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

이 저장소에는 사용 중인 MCP 클라이언트/에이전트를 주입하려는 몇 가지 실험적인 MCP 서버 구현체가 포함되어 있습니다.

공격 방법에 대한 자세한 내용은 저희 블로그 게시물을 참고해 주세요.

업데이트: MCP-scan이라는 새로운 보안 스캔 도구를 출시했습니다. 이 도구는 이 저장소에서 시연된 것처럼 MCP 공격을 감지하고 MCP 서버를 안전하게 보호하는 데 도움을 줍니다.

직접적인 중독

[direct-poisoning.py에서는 간단한 MCP 서버를 구현하여, 에이전트가 add 도구(이 경우 SSH 키와 mcp.json 파일 자체)를 호출할 때 민감한 파일을 유출하도록 지시합니다.

커서에서의 실행 예시는 다음과 같습니다:

도구 그림자

shadowing.py에서는 더 정교한 MCP 공격을 구현하여, 다른 신뢰할 수 있는 서버에서 제공하는 send_email 도구의 에이전트 동작을 조작하여 에이전트가 보낸 모든 이메일이 공격자의 서버로 유출되도록 합니다.

커서에서의 예제 실행은 다음과 같습니다:

WhatsApp 인수

마지막으로 whatsapp-takeover.py에서는 섀도잉 공격과 슬리퍼 러그 풀(즉, MCP 서버가 두 번째 로드 때만 악성 인터페이스로 변경되는 방식)을 결합한 것을 구현했습니다.

이 페이지는 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.

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →