Autosecagent: a semi-automated AI-driven penetration testing framework through recursive memory and real-time RAG
The DOI matches its Crossref record; 8 of the 8 references it cites were found in a registry or an index.
Abstract
Manual penetration testing is increasingly inadequate against rapidly evolving cyber threats, as it is time-consuming, difficult to scale, and heavily reliant on human expertise. Whilst Artificial Intelligence (AI), particularly Large Language Models (LLMs), offers automation potential, current tools suffer from poor reasoning, limited context retention, low scalability, and safety and misuse concerns. This paper introduces AutoSecAgent, an AI-powered platform designed to address these limitations. Built on the adaptive Agent Zero orchestration framework and powered by the cybersecurity-focused DeepSeek LLM, AutoSecAgent supports semi-automated end-to-end penetration testing under human oversight, covering vulnerability discovery, exploitation, and reporting with remediation guidance for follow-up. It features recursive memory embedding to maintain context across complex multi-step attack chains, supporting strategic planning and situational awareness. Additionally, real-time Retrieval-Augmented Generation (RAG) allows AutoSecAgent to source up-to-date vulnerability data from repositories such as NVD and CVE, ensuring attack strategies incorporate current information. Its modular, agent-based architecture supports scalability across diverse network environments and integrates with tools such as Metasploit and Nmap. To avoid scattered claims across multiple design elements, this study focuses its core contributions on two tightly coupled points: (i) a memory-centric orchestration mechanism (Recursive Memory Embedding, RME) with an explicit operationalisation of context-loss errors for penetration testing trajectories and (ii) a reproducible, tool-grounded, semi-automated workflow that combines RME with real-time retrieval and a bounded online optimisation loop under human oversight. Multi-agent decomposition and DeepSeek domain tuning are treated as supporting design choices that enable these two contributions rather than separate innovations. Experimental results indicate that this design improves end-to-end performance over representative LLM-based baselines across vulnerability detection, exploitation, multi-step attack completion, and scalability in controlled evaluation settings. The empirical study is positioned as a proof-of-concept validation in controlled and semi-realistic settings. Broader operational generalisation and comparison against additional non-LLM baseline classes (e.g. scanner-only pipelines) are treated as future work.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Deep reinforcement learning for cyber security
Nguyen, T. T., & Reddi, V. J. (2023) · IEEE Transactions on Neural Networks and Learning Systems · doi:10.1109/tnnls.2021.3121870 · Cited by 620
When LLMs meet cybersecurity: a systematic literature review
Zhang, J., Bu, H., Wen, H., Liu, Y., Fei, H., Xi, R., Li, L., Yang, Y., Zhu, H., & Meng, D. (2025) · Cybersecurity · doi:10.1186/s42400-025-00361-w · Cited by 383
Generative AI in cybersecurity: A comprehensive review of LLM applications and vulnerabilities
Ferrag, M. A., Alwahedi, F., Battah, A., Cherif, B., Mechri, A., Tihanyi, N., Bisztray, T., & Debbah, M. (2025) · Internet of Things and Cyber-Physical Systems · doi:10.1016/j.iotcps.2025.01.001 · Cited by 148
Evaluation and Benchmarking of LLM Agents: A Survey
Mohammadi, M., Li, Y., Lo, J., & Yip, W. (2025) · Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2 · doi:10.1145/3711896.3736570 · Cited by 74
Benchmarking Large Language Models for Log Analysis, Security, and Interpretation
Karlsen, E., Luo, X., Zincir-Heywood, N., & Heywood, M. (2024) · Journal of Network and Systems Management · doi:10.1007/s10922-024-09831-x · Cited by 71
PentestGPT: An LLM-empowered Automatic Penetration Testing Tool
Deng, G., Liu, Y., Mayoral-Vilches, V., Liu, P., Li, Y., Xu, Y., Zhang, T., Liu, Y., Pinzger, M., & Rass, S. (2023) · arXiv · doi:10.48550/arxiv.2308.06782 · Cited by 37
LLM-Supported Natural Language to Bash Translation
Westenfelder, F., Hemberg, E., Moskal, S., O’Reilly, U.-M., & Chiricescu, S. (2025) · Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers) · doi:10.18653/v1/2025.naacl-long.555 · Cited by 7
AutoPenBench: Benchmarking Generative Agents for Penetration Testing
Gioacchini, L., Mellia, M., Drago, I., Delsanto, A., Siracusano, G., & Bifulco, R. (2024) · arXiv · doi:10.48550/arxiv.2410.03225 · Cited by 3
Research works printed but not linked: 35
- Malatji M (2023) Management of enterprise cyber security: a review of iso/iec 27001:2022. In: 2023 International Conference On Cyber Management And Engineering (CyMaEn), pp. 117– 122 . https://doi.org/10.1109/CyMaEn57228.2023.10051114 · DOI · Paper page
- Shanley A, Johnstone MN (2015) Selection of penetration testing methodologies: a comparison and evaluation. In: 13th Australian Information Security Management Conference. SRI Security Research Institute, Edith Cowan University Joondalup Campus, Perth, Western Australia . https://doi.org/10.4225/75/57b69c4ed938d · doi:10.4225/75/57b69c4ed938d
- Hassanin M, Moustafa NA (2024) Comprehensive overview of large language models (LLMs) for cyber defences: opportunities and directions. arxiv:2405.14487 · arXiv
- Akuthota V, Kasula R, Sumona ST, Mohiuddin M, Reza MT, Rahman MM (2023) Vulnerability detection and monitoring using llm. In: 2023 IEEE 9th International Women in Engineering (WIE) Conference on Electrical and Computer Engineering (WIECON-ECE), pp. 309– 314. https://doi.org/10.1109/WIECON-ECE60392.2023.10456393 · DOI
- Laney SP (2024) Llm-directed agent models in cyberspace. PhD thesis, Massachusetts Institute of Technology
- Vaswani A (2017) Attention is all you need. Advances in Neural Information Processing Systems
- Al-Sabbagh A, El-Bokhary A, El-Koussa S, Jaber A, Elkhodr M (2025) Enhancing UAV security against GPS spoofing attacks through a genetic algorithm-driven deep learning framework. Information. https://doi.org/10.3390/info16020115 · DOI
- Isozaki I, Shrestha M, Console R, Kim E (2024) Towards automated penetration testing: introducing LLM benchmark, analysis, and improvements . arxiv:2410.17141 · DOI
- Brown T, Mann B, Ryder N, Subbiah M, Kaplan JD, Dhariwal P, Neelakantan A, Shyam P, Sastry G, Askell A et al (2020) Language models are few-shot learners. Adv Neural Inf Process Syst 33:1877–1901
- Mumtaz R, Samawi V, Alhroob A, Alzyadat W, Almukahel I (2022) LPDIS: a service layer for privacy and detecting intrusions in cloud computing. Int J Adv Soft Comput Appl IJASCA 14(2):14–35
- Farfoura ME, Mashal I, Alkhatib A, Batyha RM, Rosiyadi D (2025) A novel lightweight machine learning framework for IOT malware classification based on matrix block mean downsampling. Ain Shams Eng J 16(1):103205. https://doi.org/10.1016/j.asej.2024.103205 · DOI
- Fayyad S, Alkhatib A, Abdel-Fattah F, Almimi H (2024) A methodology for dynamic security risks assessment in interconnected it systems. J Commun Softw Syst 20(1):13–22 · DOI
- Sheng Z, Chen Z, Gu S, Huang H, Gu G, Huang J (2025) LLMs in software security: a survey of vulnerability detection techniques and insights. ACM Comput Surv 58(5):1–35 · DOI
- Phuong M, Aitchison M, Catt E, Cogan S, Kaskasoli A, Krakovna V, Lindner D, Rahtz M, Assael Y, Hodkinson S, Howard H, Lieberum T, Kumar R, Raad MA, Webson A, Ho L, Lin S, Farquhar S, Hutter M, Deletang G, Ruoss A, El-Sayed S, Brown S, Dragan A, Shah R, Dafoe A, Shevlane T (2024) Evaluating Frontier models for dangerous capabilities . arxiv:2403.13793 · arXiv
- Afane K, Wei W, Mao Y, Farooq J, Chen J (2024) Next-generation phishing: how LLM agents empower cyber attackers. In: 2024 IEEE International Conference on Big Data (BigData), pp. 2558– 2567 . https://doi.org/10.1109/BigData62323.2024.10825018 · DOI
- Al-Sabbagh A, Hamze K, Khan S, Elkhodr M (2024) An enhanced k-means clustering algorithm for phishing attack detections. Electronics. https://doi.org/10.3390/electronics13183677 · DOI
- Hays S, White J (2024) Employing LLMs for incident response planning and review. arxiv:2403.01271 · arXiv
- Shen Z (2024) LLM with tools: a survey. arXiv preprint arXiv:2409.18807 · arXiv
- Rani S, Nagpal R (2019) Penetration testing using metasploit framework: an ethical approach. Int Res J Eng Technol (IRJET) 6(08): 538–542
- Alia M, Jaradat Y, Masoud M, Manasrah KSA, Jebril I, Almanasra S (2024) Low-cost iot-based charging management system for electric vehicles: design guidelines. Int J Adv Soft Comput Appl IJASCA 16(1):56–67
- Bamohabbat Chafjiri S, Legg P, Hong J, Tsompanas MA (2024) Vulnerability detection through machine learning-based fuzzing: a systematic review. Comput Secur 143:103903. https://doi.org/10.1016/j.cose.2024.103903 · DOI
- Gopinath D, Wang K, Zhang M, Pasareanu CS, Khurshid S (2018) Symbolic execution for deep neural networks. arXiv preprint arXiv:1807.10439 · arXiv
- Avgerinos T, Cha SK, Rebert A, Schwartz EJ, Woo M, Brumley D (2014) Automatic exploit generation. Commun ACM 57(2):74–84. https://doi.org/10.1145/2560217.2560219 · DOI · Paper page
- Tran K, Akella A, Standen M, Kim J, Bowman D, Richer T, Lin C.-T (2021) Deep hierarchical reinforcement agents for automated penetration testing . arxiv:2109.06449 · arXiv
- Pratama D, Suryanto N, Adiputra AA, Le T-T-H, Kadiptya AY, Iqbal M, Kim H (2024) Cipher: cybersecurity intelligent penetration-testing helper for ethical researcher. Sensors. https://doi.org/10.3390/s24216878 · DOI
- Shen X, Wang L, Li Z, Chen Y, Zhao W, Sun D, Wang J, Ruan W (2024) PentestAgent: incorporating LLM agents to automated penetration testing. arxiv:2411.05185 · arXiv
- Huang J, Zhu Q (2024) Penhealnet: an agent-based LLM framework for automated pentesting and optimal remediation. Available at SSRN 4941478 · doi:10.2139/ssrn.4941478
- Xu J, Stokes JW, McDonald G, Bai X, Marshall D, Wang S, Swaminathan A, Li Z (2024) AutoAttacker: a large language model guided system to implement automatic cyber-attacks. arxiv:2403.01038 · arXiv
- Al-Sinani HS, Mitchell CJ (2025) PenTest++: elevating ethical hacking with AI and automation. arxiv:2502.09484 · arXiv
- Kong H, Hu D, Ge J, Li L, Li T, Wu B (2025) VulnBot: autonomous penetration testing for a multi-agent collaborative framework. arxiv:2501.13411 · arXiv
- Liu X, et al (2023) AgentBench: evaluating LLMs as agents. arXiv preprint arXiv:2308.03688. Accessed 10 Feb 2026 · arXiv
- Caldwell S, Harley M, Kouremetis M, Abruzzo V, Pearce W (2025) PentestJudge: judging agent behavior against operational requirements. arXiv preprint arXiv:2508.02921. Accessed Accessed 10 Feb 2026 · arXiv
- Imambi S, Prakash KB, Kanagachidambaresan GR (2021) PyTorch. In: Prakash KB, Kanagachidambaresan GR (eds) Programming with TensorFlow. EAI/Springer Innovations in Communication and Computing. Springer, Cham, pp 87–104. https://doi.org/10.1007/978-3-030-57077-4_10 · DOI · Paper page
- Pang B, Nijkamp E, Wu YN (2020) Deep learning with tensorflow: a review. J Educ Behav Stat 45(2):227–248. https://doi.org/10.3102/1076998619872761 · DOI · Paper page
- Happe A, Cito J (2025) Can LLMs hack enterprise networks? Autonomous assumed breach penetration-testing active directory networks. ACM Trans Softw Eng Methodol. https://doi.org/10.1145/3766895 · DOI · Paper page
Metadata
- Authors
- Al-Sabbagh, A., Abdo, E., Samrouth, K., Alkhatib, A. A. A., & Elkhodr, M.
- Venue
- The Journal of Supercomputing
- Published
- 2026-04-03
- Volume
- 82
- Issue
- 5
- ISSN
- 1573-0484
- Cited by
- 4
- References
- 8
- Language
- en
- Licence
- creativecommons.org/licenses/by/4.0 (tdm)
- creativecommons.org/licenses/by/4.0 (vor)
- Funders
- Central Queensland University
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
How to cite
Cite CoChat for the checks on this page, and the paper for its own findings.
- This page
- CoChat. (2026). Citation check: Autosecagent: a semi-automated AI-driven penetration testing framework through recursive memory and real-time RAG. https://app.cochat.ai/papers/10.1007/s11227-026-08439-z
- The paper
- Al-Sabbagh, A., Abdo, E., Samrouth, K., Alkhatib, A. A. A., & Elkhodr, M. (2026). Autosecagent: a semi-automated AI-driven penetration testing framework through recursive memory and real-time RAG. The Journal of Supercomputing. https://doi.org/10.1007/s11227-026-08439-z
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.