PentestChain: A Cost-Aware, MCP-Orchestrated Framework for Automated Penetration Testing with Free-Tier LLMs
Not on the map. Why?
Abstract (arXiv)
AI-driven penetration testing has been demonstrated with premium frontier models such as GPT-4, but the per-engagement token cost makes continuous, automated testing unaffordable for the smaller organisations that need it most. This paper presents PentestChain, a ten-phase automated penetration testing framework that couples a curated, deterministic exploit map with a cost-aware AI cascade-a local Ollama model (qwen2.5-7b) first, then free-tier OpenRouter and Cerebras, with a rule-based fallback that always produces output-and exposes the full pipeline through a Model Context Protocol (MCP) server with eleven tools. We make three contributions. First, we treat US-dollar cost per engagement as a measured, first-class evaluation metric and show that a 7B-parameter local model, kept off the critical path by a deterministic backbone, sustains end-to-end operation at zero measured paid-API cost. Second, we analyse the attack surface that an MCP-exposed offensive engine introduces, grounding a four-position threat model in the 2025 MCP incident record (the CVE-2025-6514 remote-code-execution flaw in mcp-remote, the postmark-mcp supply-chain backdoor, and the tool-poisoning-rug-pull-line-jumping class), and contribute four mitigations. Third, we specify a reproducible, containerised evalua-tion protocol aligned with the standardised testbeds now expected at top-tier venues-AutoPenBench, a Cybench subset, and the PentestGPT 182-sub-task benchmark-with multi-trial statistics (more than 10 trials per configuration, pass-at-k, non-parametric significance tests and effect sizes) and direct, same testbed reproduction of the PentestGPT and PentestAgent baselines rather than citation of their published numbers. On the legacy targets measured to date, the framework detected 26 services, enriched 34 CVEs, produced
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 15 of its 64 references that are in the map. First posted on arXiv 16 Sep 2026.
Builds on
15 of 64 references.
References · 15
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2024Cybench: A Framework for Evaluating Cybersecurity Capabilities and Risks of Language Modelscited by 164
- 2024LLM Agents can Autonomously Exploit One-day Vulnerabilitiescited by 128
- 2024LLM Agents can Autonomously Hack Websitescited by 109
- 2024Teams of LLM Agents can Exploit Zero-Day Vulnerabilitiescited by 95
- 2024NYU CTF Bench: A Scalable Open-Source Benchmark Dataset for Evaluating LLMs in Offensive Securitycited by 93
- 2025MCPSecBench: A Systematic Security Benchmark and Playground for Testing Model Context Protocolscited by 51
- 2024PentestAgent: Incorporating LLM Agents to Automated Penetration Testingcited by 47
- 2019Autonomous Penetration Testing using Reinforcement Learningcited by 33
- 2024PenHeal: A Two-Stage LLM Framework for Automated Pentesting and Optimal Remediationcited by 30
- 2024AutoPenBench: Benchmarking Generative Agents for Penetration Testingcited by 21
- 2025When MCP Servers Attack: Taxonomy, Feasibility, and Mitigationcited by 17
3 more
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025AutoPentest: Enhancing Vulnerability Management With Autonomous LLM Agents
- 2025RapidPen: Fully Automated IP-to-Shell Penetration Testing with LLM-based Agents
- 2025xOffense: An Autonomous Multi-Agent Framework for Penetration Testing with Domain-Adapted Large Language Models
- 2026ZERO-APT: A Closed-Loop Adversarial Framework for LLM-Driven Automated Penetration Testing under Intelligent Defense ↗
- 2024HackSynth: LLM Agent and Evaluation Framework for Autonomous Penetration Testing
- 2026Big Enough to Break Out: Tracking the Rising Capability of LLM Penetration-Testing Agents
- 2025Pentest-R1: Towards Autonomous Penetration Testing Reasoning Optimized via Two-Stage Reinforcement Learning
- 2026What Makes a Good LLM Agent for Real-world Penetration Testing?