Automated pen testing achieved with zero paid-API cost using free-tier LLMs
Their PentestChain framework can perform end-to-end penetration testing without incurring any paid API costs.
AI/ML arXiv 16 Sep 2026 Method Prototype evidence
Published as “PentestChain: A Cost-Aware, MCP-Orchestrated Framework for Automated Penetration Testing with Free-Tier LLMs”
Why it matters
Zero-cost, automated penetration testing makes continuous security assessments feasible for small organisations that cannot afford premium LLM token fees.
Summary
PentestChain achieves comparable penetration-testing effectiveness to premium-model frameworks while incurring zero paid-API cost. It detects 26 services, enriches 34 CVEs and produces 11.5 ± 0.6 ready exploits per engagement, with a mean pipeline time of 21.7 ± 4.4 minutes and only a 3.6% fallback to the deterministic path. The zero-cost claim is backed by a cost-aware AI cascade that never exceeds free-tier limits, and a deterministic exploit map that guarantees execution even when the LLM is unavailable.
What they found 5
- Zero paid-API cost with high exploit yield
“11.5 ± 0.6 ready exploits with confirmed shell and Meterpreter sessions, and generated remediation for every detected service, at zero measured paid-API cost, with a mean pipeline time of 21.7 ± 4.4 minutes and a 3.6% fallback rate to the deterministic path.”
- Rule-based fallback guarantees 100% reliability of the AI layer
“Because the rulebased path always returns a valid result, end-to-end reliability of the AI layer is effectively 100% by construction-no phase can fail for lack of a model response.”
- Deterministic exploit map generalises across OS and vulnerability profiles
“The deterministic exploit map generalised across the vulnerable targets without modification”
- Comparable effectiveness to premium-model frameworks at zero cost
“PentestChain demonstrates that a deterministic exploit-map backbone, combined with a cost-aware AI cascade and MCP orchestration, achieves comparable penetration testing effectiveness to premium-model frameworks at zero measured cost.”
- All AI providers incur $0 cost per run
“Rule-based fallback 3.6% 100% <1 ms $0”
Caveats 3
- The modern Debian host yielded no exploitable modules, showing limited exploitation on hardened infrastructure.
- Four of the five evaluation targets are deliberately vulnerable legacy systems; results should not be extrapolated to modern hardened production infrastructure.
- The map is a curated asset that must be maintained as services and modules evolve.
What’s new here 4
- Introduces a cost-aware AI cascade that prioritises a local free-tier model, then free-tier cloud providers, before a deterministic fallback, achieving zero paid-API spend.
- Uses a curated deterministic exploit map to offload execution from the LLM, enabling a 7B-parameter model to match premium-model performance.
- Exposes the full penetration-testing pipeline via a Model Context Protocol (MCP) server and provides a threat-model analysis of the MCP attack surface.
- Provides a reproducible, containerised evaluation protocol with multi-trial statistics and same-testbed baselines (AutoPenBench, Cybench subset, PentestGPT benchmark).