Overview
Working proof-of-concept with concrete demos. Results come from two sandbox CVEs and a small set of models, so real-world reliability and safety controls need more evaluation.
Citations0
Evidence Strength0.50
Confidence0.70
Risk Signals8
Trust Signals
Findings with numeric evidence: 3/3
Findings with evidence refs: 3/3
Results with explicit delta: 0/4
Reproducibility
Status: Partial assets available
Open source: Partial
At A Glance
Cost impact: 50%
Production readiness: 40%
Novelty: 60%
Why It Matters For Business
Automates routine pentest steps and lets teams swap in better models or updated tools without changing agent code. That can speed internal red‑team work and reproduce attacks for testing. However, exploitation reliability depends on the model and legal safeguards are essential.
Who Should Care
Summary TLDR
PentestMCP is a set of MCP (Model-Context-Protocol) servers that expose common penetration‑testing tools as RPC-style functions. The paper shows agents using these servers to automatically scan, find, and exploit two well-known vulnerabilities (CVE-2017-5638 and CVE-2017-0144) in sandboxed labs. Success depends strongly on the language model used.
Problem Statement
Security teams and researchers want agents to run real pentest tools without baking those tools into agent code. Existing agentic systems often mix tools into the agent, making updates hard. PentestMCP decouples tools (as networked RPC servers) so agents can call standard pentest functionality at run-time.
Main Contribution
A working PentestMCP library that implements four MCP servers (nmap, curl, nuclei, metasploit) to expose scanning, enumeration, vuln scanning, and exploitation as callable tools.
End-to-end agent demonstrations that use these MCP servers to identify and exploit two historical vulnerabilities in sandboxed environments (Apache Struts CVE-2017-5638 and SMB EternalBlue CVE-2017-0144).
Key Findings
PentestMCP exposes four core pentest servers (nmap, curl, nuclei, metasploit).
For CVE-2017-5638 the agent identified the vuln in 4/4 model runs and exploited it in 2/4 runs on the evaluated setup.
Results
| Metric | Value | Baseline | Delta | Split / Dataset | Evidence | Evidence Ref |
|---|---|---|---|---|---|---|
| CVE-2017-5638 identification rate | 4/4 models identified | — | — | CVE-2017-5638 run | All listed models correctly detected the Struts vuln in the sandbox | Table 9 |
| CVE-2017-5638 exploitation rate | 2/4 models exploited (o3, gemini) | — | — | CVE-2017-5638 run | o3-2025-04-16 and gemini-2.5 succeeded; gpt-4o and grok failed | Table 9 |
What To Try In 7 Days
Clone the PentestMCP GitHub repo and run the demo in a sandbox lab (TryHackMe or local VMs).
Wire PentestMCP to a simple agent (FastAgent example) and run a scan→vuln-scan workflow.
Compare 2–3 LLMs: check 'identified' vs 'exploited' and log tool calls and token cost.
Agent Features
Planning
Tool Use
Frameworks
Is Agentic
Yes
Architectures
Collaboration
Reproducibility
Risks & Boundaries
Limitations
Evaluation limited to two historical CVEs in sandbox environments; no large-scale benchmark.
Small model pool; reported success rates may not generalize to other targets or models.
When Not To Use
Do not run PentestMCP against production or external networks without explicit legal permission.
Not a turnkey replacement for experienced pentesters: model failures and misconfigurations can cause incorrect or unsafe actions.
Failure Modes
Model selects an incorrect payload architecture (e.g., aarch64 payload for x64 host) causing exploit failure (Table 9).
Agent fails to populate required module options in an exploit call, producing input validation errors (Table 7).

