arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.04078cs.LGcs.CR
收藏

关注差距:通过域随机化和元强化学习实现可泛化的自主渗透测试

Mind the Gap: Towards Generalizable Autonomous Penetration Testing via Domain Randomization and Meta-Reinforcement Learning

College of Electronic Engineering, National University of Defense Technology(国防科技大学电子工程学院);Beijing National Research Center for Information Science and Technology, Tsinghua University(清华大学北京信息科学与技术国家研究中心);College of Computer Science and Technology, National University of Defense Technology(国防科技大学计算机学院)

Shicheng Zhou, Jingju Liu, Yuliang Lu, Jiahai Yang, Yue Zhang, Jie Chen

AI总结:

针对基于强化学习的自主渗透测试存在的训练环境困境和泛化能力差问题,提出GAP框架,通过Real-to-Sim-to-Real流水线、大语言模型驱动的域随机化及元强化学习,实现现实环境高效训练与跨场景泛化。

摘要:

随着互联网上暴露的漏洞数量不断增加,自主渗透测试(pentesting)已成为一个极具前景的研究领域。强化学习(RL)是研究该主题的自然选择。然而,两个关键挑战限制了基于RL的自主渗透测试在现实场景中的适用性:(a)训练环境困境——在模拟环境中训练智能体样本效率高,但确保其真实性仍具挑战;(b)泛化能力差——智能体的策略在迁移到未见过的场景时往往表现不佳,即使微小变化也可能导致显著的泛化差距。为此,我们提出GAP,一个可泛化的自主渗透测试框架,旨在实现现实环境中的高效策略训练,并训练能够举一反三的可泛化智能体。GAP引入了Real-to-Sim-to-Real流水线,该流水线(a)能够在未知真实环境中进行端到端策略学习,同时构建真实的模拟环境;(b)通过利用域随机化和元RL学习提高智能体的泛化能力。特别地,我们是首批在自主渗透测试中应用域随机化的团队之一,并提出了一种基于大语言模型的域随机化方法用于合成环境生成。我们进一步应用元RL,通过利用合成环境来提高智能体在未见过环境中的泛化能力。两种方法的结合有效弥合了泛化差距,并提高了智能体的策略适应性能。我们在各种易受攻击的虚拟机上进行了实验,结果表明GAP能够在各种现实环境中实现策略学习,在相似环境中实现零样本策略迁移,并在不同环境中实现快速策略适应。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑