用攻击树引导大模型,让自动渗透测试更准更省力。
Guided Reasoning in LLM-Driven Penetration Testing Using Structured Attack Trees
- 用MITRE ATT&CK构建确定性攻击树,约束大模型推理路径。
- 在HackTheBox上完成71.8%至78.6%的子任务,显著优于自导式方法。
- 适合想提升自动化渗透测试效率的研究者和安全工程师。
大型语言模型(LLMs)的进步推动了网络安全渗透测试流程的自动化,有望实现企业系统更快、更一致的漏洞评估。现有基于LLM的渗透测试代理主要依赖自我引导推理,易产生错误或幻觉性的操作步骤,导致无效行为,如攻击未使用的软件库或生成循环响应。本文提出一种受控推理流程,将源自MITRE ATT&CK矩阵的确定性任务树引入渗透测试LLM代理,以明确战术、技术与规程(TTPs)为依据,锚定推理过程并过滤无效动作,引导代理执行更高效的攻击程序。我们使用Llama-3-8B、Gemini-1.5和GPT-4构建自动化渗透测试代理,在10个HackTheBox网络安全挑战中执行103个离散子任务(代表真实世界攻击场景)。所提方法使三种模型分别完成71.8%、72.8%和78.6%的子任务。相比之下,当前最优自导式工具仅完成13.5%、16.5%和75.7%,且模型调用次数分别多出86.2%、118.7%和205.9%。结果表明,将确定性任务树嵌入LLM推理可显著提升自动化安全评估的准确性和效率。
原文摘要 · Abstract (English)
Recent advances in Large Language Models (LLMs) have driven interest in automating cybersecurity penetration testing workflows, offering the promise of faster and more consistent vulnerability assessment for enterprise systems. Existing LLM agents for penetration testing primarily rely on self-guided reasoning, which can produce inaccurate or hallucinated procedural steps. As a result, the LLM agent may undertake unproductive actions, such as exploiting unused software libraries or generating cyclical responses that repeat prior tactics. In this work, we propose a guided reasoning pipeline for penetration testing LLM agents that incorporates a deterministic task tree built from the MITRE ATT&CK Matrix, a proven penetration testing kll chain, to constrain the LLM's reaoning process to explicitly defined tactics, techniques, and procedures. This anchors reasoning in proven penetration testing methodologies and filters out ineffective actions by guiding the agent towards more productive attack procedures. To evaluate our approach, we built an automated penetration testing LLM agent using three LLMs (Llama-3-8B, Gemini-1.5, and GPT-4) and applied it to navigate 10 HackTheBox cybersecurity exercises with 103 discrete subtasks representing real-world cyberattack scenarios. Our proposed reasoning pipeline guided the LLM agent through 71.8\%, 72.8\%, and 78.6\% of subtasks using Llama-3-8B, Gemini-1.5, and GPT-4, respectively. Comparatively, the state-of-the-art LLM penetration testing tool using self-guided reasoning completed only 13.5\%, 16.5\%, and 75.7\% of subtasks and required 86.2\%, 118.7\%, and 205.9\% more model queries. This suggests that incorporating a deterministic task tree into LLM reasoning pipelines can enhance the accuracy and efficiency of automated cybersecurity assessments
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。