用域随机化与元强化学习提升渗透测试智能体的泛化能力。
Mind the Gap: Towards Generalizable Autonomous Penetration Testing via Domain Randomization and Meta-Reinforcement Learning
- 构建真实-仿真-真实闭环,结合域随机化生成逼真模拟环境。
- 在不同虚拟机上实现零样本迁移与快速适应,泛化性能显著提升。
- 首次将大模型驱动的域随机化引入自动化渗透测试,适合安全研究者。
随着互联网漏洞数量激增,自主渗透测试成为重要研究方向。强化学习天然适配该任务,但面临两大挑战:(a) 训练环境困境——模拟环境虽高效,却难保真实;(b) 泛化能力差——策略在未见场景中表现不佳,微小变化即引发严重性能下降。为此,我们提出GAP框架,实现高效真实环境下的策略训练,并使智能体具备从单一实例推断其他场景的能力。GAP采用真实-仿真-真实(Real-to-Sim-to-Real)流程,(a) 支持在未知真实环境中端到端策略学习,同时构建高保真仿真;(b) 通过域随机化与元强化学习提升泛化能力。特别地,我们首次在自主渗透测试中应用域随机化,并提出基于大语言模型的域随机化方法用于合成环境生成;进一步利用元强化学习,在合成环境中提升智能体在未见环境中的泛化能力。实验在多个易受攻击的虚拟机上进行,结果表明,GAP可在多种真实环境中实现策略学习,支持相似环境的零样本迁移,且在差异环境中有快速适应能力。
原文摘要 · Abstract (English)
With increasing numbers of vulnerabilities exposed on the internet, autonomous penetration testing (pentesting) has emerged as a promising research area. Reinforcement learning (RL) is a natural fit for studying this topic. However, two key challenges limit the applicability of RL-based autonomous pentesting in real-world scenarios: (a) training environment dilemma -- training agents in simulated environments is sample-efficient while ensuring their realism remains challenging; (b) poor generalization ability -- agents' policies often perform poorly when transferred to unseen scenarios, with even slight changes potentially causing significant generalization gap. To this end, we propose GAP, a generalizable autonomous pentesting framework that aims to realizes efficient policy training in realistic environments and train generalizable agents capable of drawing inferences about other cases from one instance. GAP introduces a Real-to-Sim-to-Real pipeline that (a) enables end-to-end policy learning in unknown real environments while constructing realistic simulations; (b) improves agents' generalization ability by leveraging domain randomization and meta-RL learning.Specially, we are among the first to apply domain randomization in autonomous pentesting and propose a large language model-powered domain randomization method for synthetic environment generation. We further apply meta-RL to improve agents' generalization ability in unseen environments by leveraging synthetic environments. The combination of two methods effectively bridges the generalization gap and improves agents' policy adaptation performance.Experiments are conducted on various vulnerable virtual machines, with results showing that GAP can enable policy learning in various realistic environments, achieve zero-shot policy transfer in similar environments, and realize rapid policy adaptation in dissimilar environments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。