Small Models, Precisely Tuned: A Two-Tier Small-Language-Model Architecture for Autonomous Penetration Testing Soft-Prompt-Tuned Strategic Reasoning Paired with a LoRA-Fine-Tuned Tool-Calling Executor, Evaluated Against VAmPI and OWASP Juice Shop
Large language models increasingly serve as reasoning engines inside automated penetration-testing agents, but two problems recur across the recent literature: general-purpose models used as end-to-end planners struggle to sustain coherent multi-step attack reasoning, and giving that reasoning role to a single large model is expensive per call. This project addresses both by splitting the pipeline into two small, purpose-trained language models instead of one large general-purpose one. A Strategist Qwen3-8B adapted with soft-prompt tuning on 2,311 hypothesis-generation examples spanning 26 real vulnerability categories mined from disclosed HackerOne reports - proposes which vulnerability to test next and why. An Executor Qwen3-1.7B-Base adapted with LoRA - turns that hypothesis into a concrete, correctly formatted HTTP tool call. Both models were evaluated in isolation and inside a closed, autonomous loop against two live, intentionally vulnerable targets: OWASP Juice Shop and a self-hosted VAmPI instance. The headline result is a controlled ablation: holding the Strategist and the attack loop fixed and swapping only the Executor's weights, LoRA fine-tuning takes the autonomous loop from 0 of 9 target vulnerability categories confirmed to 7 of 9. Combining that loop with a separate three-role harness run resolves 8 of VAmPI's 9 applicable categories overall. Across all 38 applicable tests pooled from both live targets, 22% produced a confirmed, evidence-backed finding, while the soft-prompt Strategist matched or beat a fully-prompted master-prompt baseline on the same base model on 11 of 18 comparable vulnerability patterns while using 59–85% fewer input tokens per call. The project is equally direct about where the approach struggles: against a frontier model with no scaffolding the Strategist scores 2.53/5 versus 4.94/5, and multi- step reasoning chains degrade to a mean score of 2.0/5 by the fourth or fifth step. The results support a narrow but load-bearing claim: fine-tuning the execution layer of a small-model agentic pipeline is, in this setting, a larger and cheaper lever on end-to-end task success than fine-tuning - or scaling to - a larger reasoning model.
Authors
- Vidhaan Appaji
- Senthil Arasu T
- Daksha S
- Lokesh Upputri
Institutions
- University of San Diego (US)
Publication Details
- Journal
- International Journal of Innovations in Science Engineering and Management.
- Published
- 2026-10-28
- DOI
- https://doi.org/10.69968/ijisem.2026v5i4229-243
- Primary Topic
- Web Application Security Vulnerabilities
- Type
- article
- Field-Weighted Citation Impact
- 0.00