RefPentester: A Knowledge-Informed Self-Reflective Penetration Testing Framework Based on Large Language Models
Not on the map. Why?
Abstract (arXiv)
Automated penetration testing (AutoPT) powered by large language models (LLMs) has gained attention for its ability to automate ethical hacking processes and identify vulnerabilities in target systems by leveraging the inherent knowledge of LLMs. However, existing LLM-based AutoPT frameworks often underperform compared to human experts in challenging tasks for several reasons: the imbalanced knowledge used in LLM training, short-sightedness in the planning process, and hallucinations during command generation. Moreover, the trial-and-error nature of the PT process is constrained by existing frameworks lacking mechanisms to learn from previous failures, restricting adaptive improvement of PT strategies. To address these limitations, we propose a knowledge-informed, self-reflective PT framework powered by LLMs, called RefPentester. This AutoPT framework is designed to assist human operators in identifying the current stage of the PT process, selecting appropriate tactics and techniques for each stage, choosing suggested actions, providing step-by-step operational guidance, and reflecting on and learning from previous failed operations. We also modeled the PT process as a seven-state Stage Machine to integrate the proposed framework effectively. The evaluation shows that RefPentester can successfully reveal credentials on Hack The Box's Sau machine, outperforming the baseline GPT-4o model by 16.7%. Across PT stages, RefPentester also demonstrates superior success rates on PT stage transitions.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 11 of its 33 references that are in the map. First posted on arXiv 11 May 2025.
Builds on
11 of 33 references.
References · 11
- 2017Attention Is All You Needcited by 59,932
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2023A Survey of Large Language Modelscited by 2,537
- 2022Survey of Hallucination in Natural Language Generationcited by 2,056
- 2016Concrete Problems in AI Safetycited by 1,582
- 2024Reinforcement learningcited by 236
- 2024AutoAttacker: A Large Language Model Guided System to Implement Automatic Cyber-attackscited by 94
- 2024Domain-Specific Retrieval-Augmented Generation Using Vector Stores, Knowledge Graphs, and Tensor Factorizationcited by 15
- 2024Knowledge-Informed Auto-Penetration Testing Based on Reinforcement Learning with Reward Machinecited by 3
- 2024Mitigating Training Imbalance in LLM Fine-Tuning via Selective Parameter Mergingcited by 3
Built on by
Citing papers per year: 2025: 2.
2 papers.