Skip to main content
QUICK REVIEW

[论文解读] Evaluation of Reinforcement Learning for Autonomous Penetration Testing using A3C, Q-learning and DQN

Norman Becker, Daniel Reti|arXiv (Cornell University)|Jul 22, 2024
Adversarial Robustness in Machine LearningComputer Science被引用 3
一句话总结

本文评估了深度强化学习(DRL)智能体——Q-learning、DQN 和 A3C——在增强版 NASim 环境中用于自主渗透测试的表现,涵盖三种攻击场景:利用、提权后攻击和监听。A3C 在所有场景中均以更少的动作和更好的泛化能力超越其他算法,尽管在状态/动作空间受限及过拟合风险方面存在局限,仍证明了 DRL 在自动化安全测试中的可行性。

ABSTRACT

Penetration testing is the process of searching for security weaknesses by simulating an attack. It is usually performed by experienced professionals, where scanning and attack tools are applied. By automating the execution of such tools, the need for human interaction and decision-making could be reduced. In this work, a Network Attack Simulator (NASim) was used as an environment to train reinforcement learning agents to solve three predefined security scenarios. These scenarios cover techniques of exploitation, post-exploitation and wiretapping. A large hyperparameter grid search was performed to find the best hyperparameter combinations. The algorithms Q-learning, DQN and A3C were used, whereby A3C was able to solve all scenarios and achieve generalization. In addition, A3C could solve these scenarios with fewer actions than the baseline automated penetration testing. Although the training was performed on rather small scenarios and with small state and action spaces for the agents, the results show that a penetration test can successfully be performed by the RL agent.

研究动机与目标

  • 开发并评估用于模拟网络环境中自主渗透测试的强化学习智能体。
  • 扩展 NASim 以支持新动作(漏洞扫描、监听、提权后攻击),并定义三种现实的攻击场景。
  • 通过大规模超参数网格搜索,识别最优智能体配置。
  • 评估在未见过的网络拓扑结构和攻击排列下的泛化性能,并与基于决策树的基线模型进行比较。
  • 评估 DRL 是否能在动作效率和成功率方面超越传统自动化工具。

提出的方法

  • 增强 NASim 环境,以支持漏洞扫描、监听和提权后攻击等动作。
  • 定义三种不同的渗透测试场景,要求采用不同的动作序列才能成功实现攻击。
  • 在逐步复杂的训练阶段对三种 DRL 算法(Q-learning、DQN 和 A3C)进行训练:单场景(24 种排列)、多场景(72 种排列)以及在未见过的排列上进行泛化测试。
  • 在超过 4,000 种智能体配置中进行超参数网格搜索,以识别最优设置。
  • 使用基于决策树的基线模型(Penbox)进行对比,测量成功率和所采取的动作数量。
  • 通过在未见过的场景排列上测试训练好的智能体,评估其泛化能力。

实验结果

研究问题

  • RQ1A3C、DQN 和 Q-learning 智能体是否能够成功学习在多个预定义攻击场景中执行自主渗透测试?
  • RQ2在动作效率和成功率方面,DRL 智能体相较于基于决策树的基线自动化渗透测试工具表现如何?
  • RQ3智能体在多大程度上能够泛化到未见过的网络拓扑结构和攻击排列?
  • RQ4在不同训练复杂度水平下,哪种 DRL 算法在性能、泛化能力和鲁棒性之间表现出最佳平衡?
  • RQ5在渗透测试背景下,每种 DRL 算法的最优性能对应的超参数配置是什么?

主要发现

  • A3C 在所有训练和泛化阶段均成功解决了全部三个攻击场景,表现出稳健的性能和良好的泛化能力。
  • A3C 实现攻击所用的平均动作数少于基于决策树的基线模型,表明其具有更高的效率。
  • Q-learning 仅在第一阶段解决了一个场景,而 DQN 在所有阶段均失败,表明其可扩展性和泛化能力较差。
  • 在第三阶段观察到过拟合现象,尤其在 DQN 和 Q-learning 中更为明显,凸显了构建更多样化训练环境的必要性。
  • 超参数网格搜索识别出了最优配置,但性能对超参数选择仍高度敏感,尤其是对 DQN 和 Q-learning。
  • 尽管状态空间和动作空间有限,结果表明 RL 智能体仍能学习复杂的攻击依赖关系,证明了自动化渗透测试的可行性。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。