安全软件
点击放大

<!-- donation:eth:start -->
<di="center">
If this project helps your work, support ongoing maintenance and new features.
ETH Donation Wallet 0x11282eE5726B3370c8B480e321b3B2aA13686582
<a href="
<img src="publiceth.svg" alt="Ethereum donation QR code" width="220" />
</a>
_Scan the QR code or copy the wallet address above._
</div>
<!-- donation:eth:end -->
![Python]()

![MCP]()
![Security]()

Automated security scanner for Model Context Protocol servers that detects RCE, path tra, prompt injection, and protocol .
MCP servers expose powerful capabilities to AI agents. One tool = full system compromise.
What Mcpwn Does:
Quick Start:
Real Impact: Mcpwn found RCE in production MCP servers by testing tool argument injection patterns that manual code review missed.
Currently Implemented:
Planned (test files exist, not yet integrated):
Semantic indicators, not crashes:
uid=, root:x: → RCE-----BEGIN, PRIVATE KEY → File readJSON reports include:
| Flag | Description | Default |
|------|-------------|----------|
| --safe-mode | Skip destructi | False |
| --quick | Fast scan (5s timeout, stops on first tool injection finding) | False |
| --rce-only | Skip non-RCE tests | False |
| --profile | Security profile (e.g., profiles/paranoid.json) | None |
| --timeout | Request timeout in seconds (quick mode uses 5s) | 10 |
| --parallel | Enable parallel flooding | False |
| --output-json | Export JSON report | None |
| --output-html | Export HTML report | None |
| --output-sarif | Export SARIF report (CI/CD) | None |
Port conflicts (SSRF/OOB tests)
Timeout errors
Ser during tests
False positives
LEAK_MARKERS in tests/resource_tra.py if neededTest against the included server:
Expected findings:
execute_command toolread_file tool54 tests co:
Co Requirements:
bash
Benefits:
Structured Data: JSON/SARIF output for AI parsing
E: Concrete exploits
Time Savings: AI focuses on interpretation, not pattern matching
: Confirm AI-suggested with automated testing
Training: Mcpwn findings teach AI about MCP Best Practice: Use Mcpwn for automated baseline → AI for deep contextual analysis → Comprehensi co
Limitations
What Mcpwn Detects:
Runtime exploits (RCE, path tra, injection)
Protocol-le
Resource exhaustion and DoS
Pattern-based security issues What Mcpwn Misses:
Configuration (exposed credentials, insecure settings)
Business logic flaws
Authorization bypass requiring context
Complex multi-step attack chains
No without known patterns Recommendation: Use Mcpwn for automated baseline scanning and CI/CD integration, but complement with manual security review for comprehensi. Automated tools find known patterns; human analysis finds logic flaws.
FAQ
Q: How long does a typical scan take?
A: Quick mode (
--quick --rce-only) takes ~5 seconds. Full scan takes 30-60 seconds depending on ser.Q: Will this crash my MCP server?
A: Use
--safe-mode to skip destructi (protocol fuzzing, subscription flood). Tool injection and path tra tests are non-destructive.Q: Does this work with any MCP server?
A: Yes, any ser the Model Context Protocol (2024-11-05 spec). Works with Python, TypeScript, Go implementations.
Q: How do I integrate this into CI/CD?
A: Use
--output-sarif report.sarif to generate SARIF format compatible with GitHub Security, GitLab, and other platforms.Q: What's the difference between --quick and --rce-only?
A:
--quick reduces timeout to 5s and stops on first finding. --rce-only skips non-RCE tests (path tra, prompt injection, etc). Combine both for fastest scan.Q: Can I test my own MCP server?
A: Yes! Point Mcpwn at your ser:
python mcpwn.py python3 my_server.py or python mcpwn.py node server.jsQ: What if I get false positives?
A: Check the detection patterns in the JSON report. Path tra requires 2+ markers. Adjust
LEAK_MARKERS in tests/resource_tra.py if needed.Q: Does this require root/admin pri?
A: No, runs with normal user pri. Only needs permission to execute the MCP ser.
Q: How does semantic detection work?
A: Instead of looking for crashes, Mcpwn analyzes response content for patterns like
uid=1000, root:x:0:0, -----BEGIN PRIVATE KEY, timing de, etc.Q: Can I use this with AI assistants?
A: Yes! Generate JSON output (
--output-json findings.json`) and feed it to AI for deeper analysis. The structured format helps AI understand in context.Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
This tool is for security testing purposes only. Only test systems you ha to test.
Teycir Ben Soltane
开发语言:Python
Star 数:30
该项目属于安全软件方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Automated security scanner for Model Context Protocol servers that detects RCE, path traversal, prompt injection, and protocol vulnerabilities.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | Mcpwn - Automated security scanner for Model Context Proto |
| 所属分类 | 安全软件 |
| 发布作者 | admin |
| 发布时间 | 2026-10-05 22:50:02 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 482 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |