A Study on Penetration Testing Based on Reinforcement Learning in Realistic KVM Environments
摘要
Penetration testing is a technique that simulates hacker attacks to evaluate the security of target systems, aiming to identify vulnerabilities and weaknesses and thereby enhance network defense capabilities. Although numerous tools are available in this field, most penetration testing processes remain manual and heavily dependent on the experience of practitioners. As security vulnerabilities continue to evolve, purely manual penetration testing is increasingly insufficient to meet modern cybersecurity demands. To address this challenge, this paper proposes an automated penetration testing framework based on reinforcement learning (RL). By leveraging RL techniques, the penetration testing process is automated, and the testing environment is deployed within a Kernel-based Virtual Machine (KVM) to closely approximate real-world network settings. We employ various reinforcement learning algorithms, including DQN, PPO, and A2C, to train autonomous agents and explore the performance of different algorithms in the automated penetration testing task.