Generative AI for pentesting: The good, the bad, the ugly
Open accessAbstract
This paper examines the role of Generative AI (GenAI) and Large Language Models (LLMs) in penetration testing exploring the benefits, challenges, and risks associated with cyber security applications. Through the use of generative artificial intelligence, penetration testing becomes more creative, test environments are customised, and continuous learning and adaptation is achieved. We examined how GenAI (ChatGPT 3.5) helps penetration testers with options and suggestions during the five stages of penetration testing. The effectiveness of the GenAI tool was tested using a publicly available vulnerable machine from VulnHub. It was amazing how quickly they responded at each stage and provided better pentesting report. In this article, we discuss potential risks, unintended consequences, and uncontrolled AI development associated with pentesting.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Tools such as GitHub Copilot can accelerate coding by generating syntactically correct suggestions but are prone to introducing vulnerabilities, inefficiencies, and logic errors, especially in complex or unfamiliar contexts.
“In programming education, tools such as GitHub Copilot can accelerate coding by generating syntactically correct suggestions; however, they are also prone to introducing vulnerabilities, inefficiencies, and logic errors -especially in complex or unfamiliar contexts (Hilario et al., 2024;Zhang et al., 2023).”
From Integrating Generative AI into Programming Education: Student Perceptions and the Challenge of Correcting AI Errors (2025) · cites this paper as Hilario et al., 2024
Section 2.3.1 (page unavailable) says generative AI can save time in penetration testing, and Section 2.4.1 (page unavailable) warns that AI results can contain false positives or negatives. Those points support the broad efficiency-and-error framing, but the paper does not establish the claim about GitHub Copilot’s coding suggestions, syntactic correctness, or their propensity to introduce vulnerabilities, inefficiencies, and logic errors in complex or unfamiliar programming contexts. (LLM, conf=0.78)
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Practical Black-Box Attacks against Machine Learning
Papernot, N., McDaniel, P., Goodfellow, I., Jha, S., Celik, Z. B., & Swami, A. (2017) · Proceedings of the 2017 ACM on Asia Conference on Computer and Communications Security · doi:10.1145/3052973.3053009 · Cited by 3,495 · see citing works
From ChatGPT to ThreatGPT: Impact of Generative AI in Cybersecurity and Privacy
Gupta, M., Akiri, C., Aryal, K., Parker, E., & Praharaj, L. (2023) · IEEE Access · doi:10.1109/access.2023.3300381 · Cited by 714 · see citing works
Capture the Flag as Cyber Security Introduction
McDaniel, L., Talvi, E., & Hay, B. (2016) · Hawaii International Conference on System Sciences (HICSS) · doi:10.1109/hicss.2016.677 · Cited by 73 · see citing works
A Systematic Analysis of the Capital One Data Breach: Critical Lessons Learned
Khan, S., Kabanov, I., Hua, Y., & Madnick, S. (2022) · ACM Transactions on Privacy and Security · doi:10.1145/3546068 · Cited by 68 · see citing works
GAIL-PT: An intelligent penetration testing framework with generative adversarial imitation learning
Chen, J., Hu, S., Zheng, H., Xing, C., & Zhang, G. (2022) · Computers & Security · doi:10.1016/j.cose.2022.103055 · Cited by 65 · see citing works
Automated Penetration Testing : An Overview
Abu-Dabaseh, F., & Alshammari, E. (2018) · doi:10.5121/csit.2018.80610 · Cited by 51 · see citing works
Social engineering with ChatGPT
Grbic, D. V., & Dujlović, I. (2023) · International Symposium INFOTEH-JAHORINA (INFOTEH) · doi:10.1109/infoteh57020.2023.10094141 · Cited by 41 · see citing works
Prasad, S. G., Sharmila, V. C., & Badrinarayanan, M. K. (2023) · International Conference on Applied Artificial Intelligence and Computing (ICAAIC) · doi:10.1109/icaaic56838.2023.10141395 · Cited by 40 · see citing works
The Mayhem Cyber Reasoning System
Avgerinos, T., Brumley, D., Davis, J., Goulden, R., Nighswander, T., Rebert, A., & Williamson, N. (2018) · IEEE Security & Privacy · doi:10.1109/msp.2018.1870873 · Cited by 36 · see citing works
Sanjaya, I. G. A. S., Sasmita, G. M. A., & Arsa, D. M. S. (2020) · International Journal of Computer Network and Information Security · doi:10.5815/ijcnis.2020.04.03 · Cited by 22 · see citing works
Penetration Testing and Vulnerability Assessment: Introduction, Phases, Tools and Methods
Božić, K., Penevski, N., & Adamović, S. (2019) · International Scientific Conference Sinteza · doi:10.15308/sinteza-2019-229-234 · Cited by 12 · see citing works
Mansfield-Devine, S. (2023) · Network Security · doi:10.12968/s1353-4858(23)70017-2 · Cited by 9 · see citing works
Maximizing Penetration Testing Success with Effective Reconnaissance Techniques using ChatGPTPreprint
Temara, S. (2023) · Research Square · doi:10.21203/rs.3.rs-2707376/v1 · Cited by 7 · see citing works
Flagged first, then by citations
Research works printed but not linked: 1
- [6]6. Regularly review and update user privileges, and correct file and directory permissions. 1.5 Appendix A.5: Conclusion The penetration test was successful in identifying and exploiting vulnerabilities in the "PumpkinFestival" virtual machine, with root access achieved and all PumpkinTokens collected. The test revealed several vulnerabilities in the system, including weak passwords, hidden tokens, and misconfigured permissions. The findings and recommendations provided in this report should be used to enhance the system’s security. Rights and permissions Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. Reprints and permissions About this article Check for updates. Verify currency and authenticity via CrossMark Cite this article Hilario, E., Azam, S., Sundaram, J. et al. Generative AI for pentesting: the good, the bad, the ugly. Int. J. Inf. Secur. 23, 2075–2097 (2024). https://doi.org/10.1007/s10207-024-00835-x Download citation Published: 15 March 2024 Version of record: 15 March 2024 Issue date: June 2024 DOI: https://doi.org/10.1007/s10207-024-00835-x Share this article Anyone you share the following link with will be able to read this content: Sorry, a shareable link is not currently available for this article. Provided by the Springer Nature SharedIt content-sharing initiative Keywords Cyber security Generative AI Large language models Penetration testing ChatGPT 3.5 Profiles Khwaja Imran Mohammed View author profile
Cited by
Sorted by citations
Enhancing Autonomous System Security and Resilience With Generative AI: A Comprehensive Survey
Lopez, M. A., Lunardi, W. T., Lawton, G., & Thakkar, S. (2024) · IEEE Access · doi:10.1109/access.2024.3439363 · Cited by 115 · see citing works
Jabir, R. M., Le, J., & Nguyen, C. (2025) · AI · doi:10.3390/ai6080174 · Cited by 62 · see citing works
Kohen-Vacs, D., Usher, M., & Jansen, M. (2025) · International Journal of Artificial Intelligence in Education · doi:10.1007/s40593-025-00496-4 · Cited by 39 · see citing works
“…education, tools such as GitHub Copilot can accelerate coding by generating syntactically correct suggestions; however, they are also prone to introducing vulnerabilities, inefficiencies, and logic errors - especially in complex or unfamiliar contexts (Hilario et al., 2024; Zhang et al., 2023).”
Automated penetration testing: Formalization and realization
Skandylas, C., & Asplund, M. (2025) · Computers & Security · doi:10.1016/j.cose.2025.104454 · Cited by 18 · see citing works
Modeling the role of generative AI in organizational privacy and security
Choudhary, S. K., & Kar, A. K. (2025) · Decision Support Systems · doi:10.1016/j.dss.2025.114500 · Cited by 18 · see citing works
Wu, X., Tian, Y., Chen, Y., Ye, P., Cui, X., Jia, J., Li, S., Liu, J., & Niu, W. (2025) · Applied Sciences · doi:10.3390/app15169096 · Cited by 15 · see citing works
Mirtaheri, S. L., Movahedkor, N., Shahbazian, R., Pascucci, V., & Pugliese, A. (2025) · Future Generation Computer Systems · doi:10.1016/j.future.2025.108107 · Cited by 18 · see citing works
Parasaram, V. K. B. (2023) · International Journal for Research Publication and Seminars · doi:10.36676/jrps.v14.i2.1680 · Cited by 13 · see citing works
Beyond automation: Unveiling the potential of agentic intelligence
Tirulo, A., Yadav, M., Lolamo, M., Chauhan, S., Siano, P., & Shafie‐khah, M. (2025) · Renewable and Sustainable Energy Reviews · doi:10.1016/j.rser.2025.116218 · Cited by 16 · see citing works
The Importance of Collaboration Between Human Intelligence and GenAI in Digitalization of Education
Yakin, A. M. A., Rasyid, A. R., Massyat, M., Muthmainnah, M., Aquino, A. B., Noche, T. H., & Cardoso, L. (2024) · Advances in computer and electrical engineering book series · doi:10.4018/979-8-3693-5762-0.ch006 · Cited by 11 · see citing works
PTFusion: LLM-driven context-aware knowledge fusion for web penetration testing
Wang, W., Gu, H., Wu, Z., Chen, H., Chen, X., & Shi, F. (2025) · Information Fusion · doi:10.1016/j.inffus.2025.103731 · Cited by 12 · see citing works
Louro, B., Abreu, R., Costa, J. C., Sequeiros, J. B. F., & Inácio, P. R. M. (2024) · International Conference on Availability, Reliability and Security (ARES) · doi:10.1145/3664476.3670902 · Cited by 9 · see citing works
A Survey on Penetration Path Planning in Automated Penetration Testing
Chen, Z., Kang, F., Xiong, X., & Shu, H. (2024) · Applied Sciences · doi:10.3390/app14188355 · Cited by 9 · see citing works
Zaydi, M., & Maleh, Y. (2024) · EDPACS · doi:10.1080/07366981.2024.2439628 · Cited by 9 · see citing works
Zhu, H., Feng, Y., Hwang, B., & Fan, X. (2025) · Sustainable Development · doi:10.1002/sd.70246 · Cited by 6 · see citing works
Vulnerability Analysis and Exploitation Attacks on Smart Wearable Devices
Khan, S. A., Bajwa, H. R., Sundaram, J., Pritika, P., & Shanmugam, B. (2024) · International Conference on Advancement in Computation & Computer Technologies (InCACCT) · doi:10.1109/incacct61598.2024.10550999 · Cited by 5 · see citing works
Self-citationExploring the Potential of Large Language Models for Red Teaming in Military Coalition Networks
Adler, E., Loevenich, J. F., Moxon, L., Hürten, T., Spelter, F., Braun, J., Gourlet, Y., Lefeuvre, T., & Lopes, R. R. F. (2024) · IEEE Military Communications Conference (MILCOM) · doi:10.1109/milcom61039.2024.10773947 · Cited by 5 · see citing works
GenAI-Driven Migration of Legacy COBOL Applications to Clean Java Code
Kuck, C., & Brüne, P. (2025) · Communications in computer and information science · doi:10.1007/978-3-032-08614-3_4 · Cited by 4 · see citing works
Generative AI and cybersecurity: Exploring opportunities and threats at their intersection
Orpak, K. (2025) · Maandblad Voor Accountancy en Bedrijfseconomie · doi:10.5117/mab.99.149299 · Cited by 6 · see citing works
Generative AI for Threat Hunting and Behaviour Analysis
Sindiramutty, S. R., Jhanjhi, N. Z., Akbar, R., Hussain, M., Ray, S. K., & Amsaad, F. (2024) · Advances in digital crime, forensics, and cyber terrorism book series · doi:10.4018/979-8-3693-8944-7.ch007 · Cited by 4 · see citing works
LLMs for Penetration Testing: Solving CTF Challenges Using Offensive Cybersecurity Tools
Adler, E., Loevenich, J. F., Spelter, F., Hürten, T., Roncevic, D., Schwarzer, M., & Lopes, R. R. F. (2025) · International Conference on Cybersecurity and AI-Based Systems (Cyber-AI) · doi:10.1109/cyber-ai66431.2025.11233640 · Cited by 2 · see citing works
LLM-Generated Samples for Android Malware Detection
Rollinson, N., & Polatidis, N. (2026) · Digital · doi:10.3390/digital6010005 · Cited by 2 · see citing works
Costa, L. A., Fontão, A., dos Santos, R. P., & Serebrenik, A. (2025) · Journal of Systems and Software · doi:10.1016/j.jss.2025.112723 · Cited by 2 · see citing works
GenAI in Rule-based Systems for IoMT Security: Testing and Evaluation
Bughio, K. S., Cook, D. M., & Shah, S. A. A. (2024) · Procedia Computer Science · doi:10.1016/j.procs.2024.09.652 · Cited by 2 · see citing works
Guardians of the Digital Realm
Yogi, M. K., Mundru, Y., & Devi, A. M. (2024) · Advances in computational intelligence and robotics book series · doi:10.4018/979-8-3693-8557-9.ch010 · Cited by 2 · see citing works
Farghaly, M. S., Aslan, H. K., & Halim, I. T. A. (2025) · Future Internet · doi:10.3390/fi17080339 · Cited by 2 · see citing works
Detection and Prevention of Generative AI Email Phishing Attacks Using Digital Twins
Ayodele, T. O., Andritsch, J., & Olabanji, D. (2025) · Lecture notes in networks and systems · doi:10.1007/978-3-032-00071-2_40 · Cited by 1 · see citing works
Kale, S. P., Kanwal, P., & Honnavalli, P. B. (2025) · International Conference on Cybersecurity and AI-Based Systems (Cyber-AI) · doi:10.1109/cyber-ai66431.2025.11233438 · Cited by 1 · see citing works
Valdivia, J., Mauricio, D., & Jiménez, R. M. G. (2026) · IEEE Access · doi:10.1109/access.2026.3659713 · Cited by 2 · see citing works
Kumari, S., & Yadav, G. (2026) · Journal of Information Security and Applications · doi:10.1016/j.jisa.2026.104420 · Cited by 1 · see citing works
Introduction to Generative AI in Cybersecurity
Khan, A., Jhanjhi, N. Z., Abdulhabeb, G. A. A., Ray, S. K., & Goh, W. W. (2024) · Advances in human and social aspects of technology book series · doi:10.4018/979-8-3693-8939-3.ch001 · Cited by 1 · see citing works
Elashmawi, W. H., Osman, H., Osama, M., & Nader, N. (2024) · Lecture notes in networks and systems · doi:10.1007/978-3-031-77229-0_6
Covertrack-Dqn: Enhancing Penetration Testing Efficiency With Deep Q-Networks for Trace Covering
Fathi, M. K., Metwally, K., Sobh, M., & Bahaa-Eldin, A. M. (2025) · International Telecommunications Conference (ITC-Egypt) · doi:10.1109/itc-egypt66095.2025.11186672
Cyberdefense Powered by Generative AI: A Comprehensive State –of- the -Art Review
Alsamman, A. A., & Dabagh, N. B. A. (2026) · Alkadhim journal for computer science. · doi:10.61710/9jq4y549
Sikos, L. F. (2025) · SpringerBriefs in cybersecurity · doi:10.1007/978-3-032-05250-6_1 · Cited by 1 · see citing works
Offensive Generative AI: From Criminal LLMs to Deepfake-Based Deception
Sikos, L. F. (2025) · SpringerBriefs in cybersecurity · doi:10.1007/978-3-032-05250-6_2
METAHEURISTIC OPTIMISATION OF TREATED SEWAGE WASTEWATER QUALITY PARAMETERS WITH NATURAL COAGULANTS”Preprint
Bwapwa, J. K., & Mukuna, J. (2025) · SSRN Electronic Journal · doi:10.2139/ssrn.5476115
Toward Hands-Free Threat Detection: A Voice-Activated Framework for Automated Penetration Testing
Ratnam, S. A., Nishith, P., & Belwal, M. (2026) · Smart innovation, systems and technologies · doi:10.1007/978-981-96-7545-6_32
Crime Facilitated and Caused by Artificial Intelligence
Kaucz, B. (2025) · Springer eBooks · doi:10.1007/978-3-032-06944-3_3
Analyzing and Defending Against Adversarial Attacks on Generative AI in the Cloud (Vulnerabilities)
Vadisetty, R., Polamarasetti, A., Goyal, M. K., & Kakarala, M. R. K. (2026) · Lecture notes in networks and systems · doi:10.1007/978-981-96-8104-4_5
Yin, W. (2026) · Creative Education · doi:10.4236/ce.2026.171007 · Cited by 1 · see citing works
Matlala, N. P. (2026) · Development Southern Africa · doi:10.1080/0376835x.2026.2632039
Artificial Intelligence-Based Strategy for Risk Analysis and Pentesting - ESARPEN
Morales, D. M. M., Blandón, G. E. T., Montoya, H. F. V., Vásquez, J. M. D., & Rivera, J. F. H. (2025) · International Conference on Intelligent Computing and Next Generation Networks (ICNGN) · doi:10.1109/icngn67480.2025.11413733
Benson, D., & Panchev, C. (2026) · Lecture notes in computer science · doi:10.1007/978-3-032-16165-9_7
Security Assurance Based on Large Language Models
Radicchi, T., Luzzara, M., Ardagna, C. A., & Anisetti, M. (2026) · Lecture notes on data engineering and communications technologies · doi:10.1007/978-3-032-30573-2_23
Anderson, C. L. (2026) · Information · doi:10.3390/info17090846
A Semantic-Consistent Privacy Middleware for MCP-Driven Penetration Testing
Zhang, X., Du, X., Zhang, K., & Wei, Z. (2026) · International Conference on Computer Communication and Artificial Intelligence (CCAI) · doi:10.1109/ccai69603.2026.11642106
A Multi-Agent Large Language Model Framework for Autonomous Web Application Penetration TestingPreprint
Madhak, T., Desai, V., Bholwankar, S., Moradiya, J., Rajput, A. S., & Dalwadi, M. (2026) · Research Square · doi:10.21203/rs.3.rs-11114403/v1
Guimarães, S. J. T., & Rosset, V. (2026) · Simpósio Brasileiro de Cibersegurança (SBSeg) · doi:10.5753/sbseg_estendido.2026.29440
- Authors
- Hilario, E., Azam, S., Sundaram, J., Imran Mohammed, K., & Shanmugam, B.
- Affiliations
- Charles Darwin University (AU)
- Christ Academy Institute for Advanced Studies (IN)
- Corresponding author
- Shanmugam, Bharanidharan
- Venue
- International Journal of Information Security
- Published
- 2024-03-15
- Volume
- 23
- Issue
- 3
- Pages
- 2075-2097
- ISSN
- 1615-5262 (ISSN-L)
- 1615-5270
- OpenAlex
- W4392848643
- Cited by
- 49
- References
- 13
- Citations by year
- 2026: 14 · 2025: 22 · 2024: 12 · 2023: 1
- FWCI
- 18.10
- Type
- journal article
- Language
- en
- Open access
- hybrid
- doi.org
- Locations
- International Journal of Information Security (publishedVersion, cc-by)
- Funders
- Charles Darwin University
- Topics
- Physical Sciences › Computer Science › Information Systems › Web Application Security Vulnerabilities
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Physical Sciences › Computer Science › Computer Networks and Communications › Network Security and Intrusion Detection
- Keywords
- generative AI, large language models, penetration testing, ChatGPT, AI tool evaluation
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