Skip to content

PentestChain: A Cost-Aware MCP Orchestration Automated Penetration Testing Framework for Free-Tier LLMsPentestChain: A Cost-Aware, MCP-Orchestrated Framework for Automated Penetration Testing with Free-Tier LLMs

arXiv: Agent & MCP Security· arXiv:2609.18120· Rushabh Vipulkumar Patel, Dipo Dunsin, Mohammed Almaiah, Mohamed Chahine Ghanem·Indexed by this site · 2026-10-01· Originally publishedTools

Translation in progress — untranslated text is omitted.

Quick read

Other

Based on the paper PDF (AI-generated); refer to the original

AI summaryPentestChain is a ten-stage automated penetration testing framework that achieves end-to-end operation at zero paid API cost through a cost-aware AI cascade (local Ollama qwen2.5-7b first, then free-tier OpenRouter and Cerebras, with rule fallback), and exposes 11 tools via an MCP server. The framework builds a four-position threat model based on 2025 MCP incident records (mcp-remote's CVE-2025-6514 remote code execution vulnerability, the postmark-mcp supply chain backdoor, and tool poisoning attacks) and proposes four mitigations.

Questions
Frontier models such as GPT-4 can do automated penetration testing, but per-token fees make continuous testing unaffordable for organizations with fewer resources. The authors ask: can the free tier plus local LLMs with deterministic fallback reduce per-engagement cost to zero while remaining close in effectiveness.
Methods
PentestChain runs a ten-stage pipeline in a Kali container: a 41-entry (port, keyword) exploit graph handles exploitation logic, with the LLM limited to nine bounded roles. The cost-aware cascade tries local Ollama qwen2.5:7b first, then free OpenRouter and Cerebras, and finally rule fallback. FastMCP exposes eleven tools, with four mitigations.
Experiments and results
Measured are legacy metrics on five heterogeneous targets. Metasploitable 2 across four runs detected 26 services, enriched 34 CVEs, exploits ready at 11.5±0.6, rule fallback rate 3.6±0.6%, paid cost $0. A modern Debian single check matched 0 exploit modules. Standardized testbed, baseline reproduction, and ablations are marked Projected in Table 2; results not yet collected.
Limitations and future work
The authors state that a single modern host run cannot establish behavior on hardened infrastructure at scale, A3 cannot be disabled by engine shutdown alone, and the exploit graph correctly does not trigger against hardened targets. AutoPenBench, the Cybench subset, PentestGPT 182 subtasks, baseline reproduction, and four-factor ablations are all planned protocols; results not collected.
Read originalarxiv.org