AI-Guided Network Infiltration: A Comparative Case Study of Pentestgpt-Guided and Manual Penetration Testing

Authors

Sathiya Varma Parmeswaran

Fakulti Kecerdasan Buatan dan Keselamatan Siber, Universiti Teknikal Malaysia Melaka, Melaka (Malaysia)

Mohd Nazrien Zaraini

Fakulti Teknologi Maklumat dan Komunikasi, Universiti Teknikal Malaysia Melaka, Melaka (Malaysia)

Article Information

DOI: 10.47772/IJRISS.2026.101000369

Subject Category: Social science

Volume/Issue: 10/10 | Page No: 5243–5249

Publication Timeline

Submitted: 2026-10-24

Accepted: 2026-10-29

Published: 2026-11-03

Abstract

Penetration testing is time consuming and requires expert knowledge. Most evaluations are based on benchmark targets and report aggregate scores, while large language models can help to speed it up. They rarely show the same tool working on one system and then failing on another. This paper presents a case study of comparing PentestGPT, an LLM-driven assistant using GPT-4o, with manual testing in four single-run simulations, set up in an isolated VirtualBox lab The same SSH and SUID privilege escalation chain was executed twice on Metasploitable 2: manually, and with the assistance of PentestGPT. Both runs were made using default credentials and a SUID nmap escape. The manual run took 21 minutes. The guided run took 15 minutes (29% less), with nearly all that savings coming from privilege escalation, as the tool was renamed the exploitable binary rather than searching for it. The same guided path was then applied to a modern Ubuntu Server. It did not transfer. There was no SUID binary of 'nmap' in Ubuntu, so the escape that was used on the legacy target would not run and the operator resorted to manual technique to verify root. A parallel SMTP enumeration was good in concept as it assumed less security on a server than Ubuntu had. The pattern is consistent across the four simulations. PentestGPT is fast and accurate where the attack surface is familiar and well documented. It is weaker where a path must be adapted to an unfamiliar system, and the human operator supplied that adaptation in every case. The study supports using LLMs as guided assistants under human oversight, not as autonomous testers.

Keywords

penetration testing, large language models, PentestGPT, human-in-the-loop, case study

Downloads

References

1. Chen, L., Wang, J., Guo, B., & Chen, L. (2023). Human-in-the-loop machine learning with applications for population health. CCF Transactions on Pervasive Computing and Interaction, 5(1), 1-12. https://doi.org/10.1007/s42486-022-00115-4 [Google Scholar] [Crossref]

2. Deng, G., Liu, Y., Mayoral-Vilches, V., Liu, P., Li, Y., Xu, Y., Zhang, T., Liu, Y., Pinzger, M., & Rass, S. (2024). PentestGPT: Evaluating and harnessing large language models for automated penetration testing. Proceedings of the 33rd USENIX Security Symposium, 847-864. https://www.usenix.org/conference/usenixsecurity24/presentation/deng [Google Scholar] [Crossref]

3. Ferrag, M. A., Alwahedi, F., Battah, A., Cherif, B., Mechri, A., Tihanyi, N., Bisztray, T., & Debbah, M. (2025). Generative AI in cybersecurity: A comprehensive review of LLM applications and vulnerabilities. arXiv. https://arxiv.org/abs/2405.12750 [Google Scholar] [Crossref]

4. Gioacchini, L., Mellia, M., Drago, I., Delsanto, A., Siracusano, G., & Bifulco, R. (2024). AutoPenBench: Benchmarking generative agents for penetration testing. arXiv. https://arxiv.org/abs/2410.03225 [Google Scholar] [Crossref]

5. Greshake, K., Abdelnabi, S., Mishra, S., Endres, C., Holz, T., & Fritz, M. (2023). Not what you've signed up for: Compromising real-world LLM-integrated applications with indirect prompt injection. arXiv. https://arxiv.org/abs/2302.12173 [Google Scholar] [Crossref]

6. Happe, A., & Cito, J. (2023). Getting pwn'd by AI: Penetration testing with large language models. Proceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering. https://doi.org/10.1145/3611643.3613083 [Google Scholar] [Crossref]

7. Happe, A., Kaplan, A., & Cito, J. (2023). LLMs as hackers: Autonomous Linux privilege escalation attacks. arXiv. https://arxiv.org/abs/2310.11409 [Google Scholar] [Crossref]

8. He, Z., Dong, J., Li, Z., Chen, T., Deng, G., Luo, F., Ji, J., Cao, Y., & Luo, X. (2026). A survey of LLM-driven penetration testing: Taxonomy, co-evolution, and open challenges. arXiv. https://arxiv.org/abs/2607.02605 [Google Scholar] [Crossref]

9. Henke, J. (2025). AutoPentest: Enhancing vulnerability management with autonomous LLM agents. arXiv. https://arxiv.org/abs/2505.10321 [Google Scholar] [Crossref]

10. Huang, J., & Zhu, Q. (2024). PenHeal: A two-stage LLM framework for automated pentesting and optimal remediation. arXiv. https://arxiv.org/abs/2407.17788 [Google Scholar] [Crossref]

11. Huang, L., Yu, W., Ma, W., Zhong, W., Feng, Z., Wang, H., Chen, Q., Peng, W., Feng, X., Qin, B., & Liu, T. (2025). A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions. ACM Transactions on Information Systems. https://doi.org/10.1145/3703155 [Google Scholar] [Crossref]

12. Kong, H., Hu, D., Ge, J., Li, L., Li, T., & Wu, B. (2025). VulnBot: Autonomous penetration testing for a multi-agent collaborative framework. arXiv. https://arxiv.org/abs/2501.13411 [Google Scholar] [Crossref]

13. Nikitin, A., & Kaski, S. (2021). Decision rule elicitation for domain adaptation. Proceedings of the 26th International Conference on Intelligent User Interfaces. https://doi.org/10.1145/3397481.3450682 [Google Scholar] [Crossref]

14. Ostheimer, J., Chowdhury, S., & Iqbal, S. (2021). An alliance of humans and machines for machine learning: Hybrid intelligent systems and their design principles. Technology in Society, 66, Article 101647. [Google Scholar] [Crossref]

15. Penetration Testing Execution Standard. (n.d.). The Penetration Testing Execution Standard. https://pentest-standard.readthedocs.io/ [Google Scholar] [Crossref]

16. Scarfone, K., Souppaya, M., Cody, A., & Orebaugh, A. (2008). Technical guide to information security testing and assessment (NIST Special Publication 800-115). National Institute of Standards and Technology. https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-115.pdf [Google Scholar] [Crossref]

17. Shen, X., Wang, L., Li, Z., Chen, Y., Zhao, W., Sun, D., Wang, J., & Ruan, W. (2025). PentestAgent: Incorporating LLM agents to automated penetration testing. arXiv. https://arxiv.org/abs/2411.05185 [Google Scholar] [Crossref]

18. Zennaro, F. M., & Erdődi, L. (2020). Modeling penetration testing with reinforcement learning using capture-the-flag challenges: Trade-offs between model-free learning and a priori knowledge. arXiv. https://arxiv.org/abs/2005.12632 [Google Scholar] [Crossref]

Metrics

Views & Downloads

Similar Articles