[论文解读] HackSynth: LLM Agent and Evaluation Framework for Autonomous Penetration Testing
HackSynth 是一种基于大语言模型的自主渗透测试代理,采用 Planner-Summarizer 架构,在无需人工干预的情况下解决 CTF 挑战。在 200 个 PicoCTF 和 OverTheWire 挑战上进行评估,表现优异——尤其在 GPT-4o 上表现突出,证明了安全、可预测且可扩展的 LLM 驱动网络安全自动化是可行的。
We introduce HackSynth, a novel Large Language Model (LLM)-based agent capable of autonomous penetration testing. HackSynth's dual-module architecture includes a Planner and a Summarizer, which enable it to generate commands and process feedback iteratively. To benchmark HackSynth, we propose two new Capture The Flag (CTF)-based benchmark sets utilizing the popular platforms PicoCTF and OverTheWire. These benchmarks include two hundred challenges across diverse domains and difficulties, providing a standardized framework for evaluating LLM-based penetration testing agents. Based on these benchmarks, extensive experiments are presented, analyzing the core parameters of HackSynth, including creativity (temperature and top-p) and token utilization. Multiple open source and proprietary LLMs were used to measure the agent's capabilities. The experiments show that the agent performed best with the GPT-4o model, better than what the GPT-4o's system card suggests. We also discuss the safety and predictability of HackSynth's actions. Our findings indicate the potential of LLM-based agents in advancing autonomous penetration testing and the importance of robust safeguards. HackSynth and the benchmarks are publicly available to foster research on autonomous cybersecurity solutions.
研究动机与目标
- 应对日益增长的网络威胁和系统复杂性所带来的对可扩展、自动化渗透测试的迫切需求。
- 通过实现完全由 LLM 驱动、无需人工干预的漏洞利用,克服启发式工具和部分自主代理的局限性。
- 开发标准化基准,用于在多样化、类真实世界挑战中评估基于 LLM 的渗透测试代理。
- 通过系统性地评估超参数和操作日志,确保自主代理行为的安全性和可预测性。
- 通过向公众发布 HackSynth 及其基准数据集,推动开放研究,促进网络安全社区的发展。
提出的方法
- 设计双模块 LLM 代理:Planner 用于生成利用命令,Summarizer 用于解释反馈并更新上下文。
- 通过利用先前交互的上下文记忆,实现迭代式命令执行,以指导决策。
- 基于 PicoCTF 和 OverTheWire 的 200 个挑战,创建两个新的基于 CTF 的基准,包含用于动态验证的解决方案启发式脚本。
- 使用启发式求解器,确保在原始平台解决方案因用户特定或随时间变化时,仍能保持解决方案的一致性。
- 在多个开源和专有 LLM 上评估性能,重点关注温度、top-p 和令牌效率。
- 应用安全评估协议,以评估可预测性并防止在真实部署场景中出现非预期行为。

实验结果
研究问题
- RQ1基于 LLM 的代理是否能完全自主地解决广泛范围的 CTF 挑战而无需人工干预?
- RQ2温度和 top-p 等超参数如何影响自主渗透测试代理的可靠性和性能?
- RQ3不同 LLM(如 GPT-4o 和开源模型)在解决类真实世界网络安全挑战方面的相对性能如何?
- RQ4启发式解决方案脚本能多大程度上确保在时间变化的 CTF 平台上评估的一致性?
- RQ5在模拟渗透测试场景中,自主 LLM 代理的行为在多大程度上是可预测且安全的?
主要发现
- HackSynth 仅通过 LLM 生成的命令,成功解决了 200 个 CTF 挑战中的相当大一部分,覆盖多样化领域和难度级别。
- GPT-4o 模型的表现超出其系统卡片的预期,展现出在自主渗透测试任务中的卓越能力。
- 在中等温度和 top-p 设置下达到最佳性能,表明适度的创造性有助于提升可靠性。
- 令牌利用率是性能的关键因素,更高的令牌数量与更好的解决方案发现能力正相关,但成本也随之增加。
- 安全评估证实,HackSynth 的行为是可预测且可控的,支持在真实环境中部署此类代理的可行性。
- 所提出的基准实现了基于 LLM 的代理的标准化、可重复评估,填补了自主网络安全研究中的关键空白。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。