journal article·2024-10-13Open access

Automated Vulnerability Exploitation Using Deep Reinforcement Learning

Anas AlMajali, Loiy Al-Abed, Khalil Ahmad Yousef, Bassam Mohd, Zaid Samamah, Anas Abu Shhadeh

Applied Sciences· Volume 14· Issue 20

Abstract

The main objective of this paper is to develop a reinforcement agent capable of effectively exploiting a specific vulnerability. Automating pentesting can reduce the cost and time of the operation. While there are existing tools like Metasploit Pro that offer automated exploitation capabilities, they often require significant execution times and resources due to their reliance on exhaustive payload testing. In this paper, we have created a deep reinforcement agent specifically configured to exploit a targeted vulnerability. Through a training phase, the agent learns and stores payloads along with their corresponding reward values in a neural network. When encountering a specific combination of a target operating system and vulnerability, the agent utilizes its neural network to determine the optimal exploitation options. The novelty of this work lies in employing Deep Reinforcement Learning in vulnerability exploitation analysis. To evaluate our proposed methodology, we conducted training and testing on the Metasploitable platform. The training phase of the reinforcement agent was conducted on two use cases: the first one has one vulnerability, and the second one has four vulnerabilities. Our approach successfully achieved the attacker’s primary objective of establishing a reverse shell with a maximum accuracy of 96.6% and 73.6% for use cases one and two, respectively.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Malware Detection Techniques · Network Security and Intrusion Detection · Adversarial Robustness in Machine Learning

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Computer Engineering, Faculty of Engineering, The Hashemite University, Zarqa 13133, Jordan

Department of Computer Science and Engineering, American University of Sharjah, Sharjah 26666, United Arab Emirates

Funding

Open Access Program from the American University of Sharjah

References (31)

Show source-provided references
1. Mastering the game of Go with deep neural networks and tree search10.1038/nature16961 ↗
2. Perera, S., Jin, X., Maurushat, A., and Opoku, D.G.J. (2022). Factors Affecting Reputational Damage to Organisations Due to Cyberattacks. Informatics, 9.10.3390/informatics9010028 ↗
3. Perkal, Y. (2024, October 12). Is Your Vulnerability Scanner Giving You Reliable Results?. Available online: https://securityboulevard.com/2022/10/is-your-vulnerability-scanner-giving-you-reliable-results/.
4. Metasploit (2024, June 22). Metasploit-Framework. Available online: https://www.metasploit.com/.
5. Sutton, R.S., and Barto, A.G. (2018). Reinforcement Learning: An Introduction, MIT Press.
6. A survey on deep learning and its applications10.1016/j.cosrev.2021.100379 ↗
7. Android malware detection methods based on convolutional neural network: A survey10.1109/TETCI.2023.3281833 ↗
8. Nieles, M., Dempsey, K., and Pillitteri, V.Y. (2017). NIST Special Publication 800-12. DRAFT Revis., 1.
9. Kennedy, D., O’Gorman, J., Kearns, D., and Aharoni, M. (2011). Metasploit: The Penetration Tester’s Guide, No Starch Press.
10. NIST (2012). NIST Special Publication 800-30 Revision 1-Guide for Conducting Risk Assessments.
11. DARPA (2024, February 25). Cyber Grand Challenge (CGC). Available online: https://www.darpa.mil/program/cyber-grand-challenge.
12. Maddala, S., and Patil, S. (2019, January 15–17). Agentless automation model for post exploitation penetration testing. Proceedings of the Intelligent Computing, Information and Control Systems: ICICCS 2019, Madurai, India.10.1007/978-3-030-30465-2_59 ↗
13. Chaudhary, S., O’Brien, A., and Xu, S. (July, January 29). Automated Post-Breach Penetration Testing through Reinforcement Learning. Proceedings of the 2020 IEEE Conference on Communications and Network Security (CNS), Avignon, France.10.1109/CNS48642.2020.9162301 ↗
14. Benito, R., Shaffer, A., and Singh, G. (2023, January 9–10). An Automated Post-Exploitation Model for Cyber Red Teaming. Proceedings of the International Conference on Cyber Warfare and Security, Towson, MD, USA.10.34190/iccws.18.1.978 ↗
15. Automating post-exploitation with deep reinforcement learning10.1016/j.cose.2020.102108 ↗
16. Hu, Z., Beuran, R., and Tan, Y. (2020, January 7–11). Automated Penetration Testing Using Deep Reinforcement Learning. Proceedings of the 2020 IEEE European Symposium on Security and Privacy Workshops (EuroS & PW), Genoa, Italy.10.1109/EuroSPW51379.2020.00010 ↗
17. Schwartz, J., and Kurniawati, H. (2019). Autonomous penetration testing using reinforcement learning. arXiv.
18. Ghanem, M.C., and Chen, T.M. (2018, January 30–31). Reinforcement Learning for Intelligent Penetration Testing. Proceedings of the 2018 Second World Conference on Smart Trends in Systems, Security and Sustainability (WorldS4), London, UK.10.1109/WorldS4.2018.8611595 ↗
19. Ghanem, M.C., and Chen, T.M. (2019). Reinforcement learning for efficient network penetration testing. Information, 11.10.3390/info11010006 ↗
20. Hierarchical reinforcement learning for efficient and effective automated penetration testing of large networks10.1007/s10844-022-00738-0 ↗
21. Modelling penetration testing with reinforcement learning using capture-the-flag challenges: Trade-offs between model-free learning and a priori knowledge10.1049/ise2.12107 ↗
22. Simulating SQL injection vulnerability exploitation using Q-learning reinforcement learning agents
23. Tran, K., Standen, M., Kim, J., Bowman, D., Richer, T., Akella, A., and Lin, C.T. (2022). Cascaded Reinforcement Learning Agents for Large Action Spaces in Autonomous Penetration Testing. Appl. Sci., 12.10.3390/app122111265 ↗
24. Yi, J., and Liu, X. (2023). Deep Reinforcement Learning for Intelligent Penetration Testing Path Design. Appl. Sci., 13.10.3390/app13169467 ↗
25. AlMajali, A., Al-Abed, L., Mutleq, R., Samamah, Z., Shhadeh, A.A., Mohd, B.J., and Yousef, K.M.A. (2023, January 22–24). Vulnerability Exploitation Using Reinforcement Learning. Proceedings of the 2023 IEEE Jordan International Joint Conference on Electrical Engineering and Information Technology (JEEIT), Amman, Jordan.10.1109/JEEIT58638.2023.10185700 ↗
26. Apache (2023, February 10). Apache CouchDB. Available online: https://couchdb.apache.org/.
27. Justicz, M., and Touzet, J. (2023, February 10). CouchDB Vulnerability. Available online: https://www.rapid7.com/db/modules/exploit/linux/http/apache_couchdb_cmd_exec/.
28. NIST (2024, June 06). CVE-2011-3556, Available online: https://nvd.nist.gov/vuln/detail/CVE-2011-3556.
29. MITRE (2024, June 06). CVE-2007-2447. Available online: https://cve.mitre.org/cgi-bin/cvename.cgi?name=2007-2447.
30. NIST (2024, June 06). CVE-2004-2687, Available online: https://nvd.nist.gov/vuln/detail/CVE-2004-2687.
31. NIST (2024, June 06). CVE-2012-1823, Available online: https://nvd.nist.gov/vuln/detail/cve-2012-1823.