Pen-Strategist: A Reasoning Framework for Penetration Testing Strategy Formation and Analysis
作者: Yasod Ginige, Pasindu Marasinghe, Sajal Jain, Suranga Seneviratne
分类: cs.CR, cs.AI
发布日期: 2026-05-06
💡 一句话要点
Pen-Strategist:一种用于渗透测试策略生成与分析的推理框架
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱四:生成式动作 (Generative Motion)
关键词: 渗透测试 策略生成 逻辑推理 强化学习 大型语言模型 网络安全 自动化
📋 核心要点
- 现有渗透测试自动化框架在策略制定、领域推理和行动选择方面存在不足,导致性能不佳。
- Pen-Strategist框架通过领域特定推理模型和策略分类器,实现渗透测试策略的逻辑推导和步骤转换。
- 实验表明,Pen-Strategist在策略推导、子任务完成和步骤预测方面均优于现有方法,并获得用户认可。
📝 摘要(中文)
网络威胁日益增加,其影响范围从大型企业扩展到政府服务和个人用户,因此强大的安全系统变得越来越重要。然而,熟练的网络安全专业人员严重短缺加剧了这一挑战。虽然最近的研究探索了使用基于LLM的代理来自动化渗透测试等任务,但现有的框架由于在策略制定、特定领域推理以及准确的行动和工具选择方面的能力有限,通常表现不佳。为了克服这些限制,我们提出了Pen-Strategist框架,该框架由一种新颖的领域特定推理模型组成,该模型通过逻辑推理得出渗透测试策略,以及一个将策略转换为可操作步骤的分类器。首先,我们构建了一个推理数据集,其中包含渗透测试场景中策略推导和步骤选择的逻辑解释。然后,我们使用强化学习对Qwen-3-14B模型进行微调,以生成策略。在数据集的测试集上的评估表明,与基线相比,策略推导性能提高了87%。此外,我们将微调后的Pen-Strategist模型集成到现有的自动化渗透测试框架(如PentestGPT)中,并评估其在易受攻击机器上的性能,在子任务完成方面实现了47.5%的改进,超过了基线GPT-5。在CTFKnow基准上的进一步实验表明,性能比基础模型提高了18%。对于步骤预测,我们训练了一个基于语义的CNN分类器,该分类器的性能比商业LLM高出28%,并提高了执行稳定性。最后,我们进行了一项用户研究,以定性地评估生成的策略,Pen-Strategist的表现优于Claude-4.6-Sonnet。
🔬 方法详解
问题定义:现有渗透测试自动化框架在策略制定、领域特定推理以及准确的行动和工具选择方面存在不足,导致渗透测试效率低下,无法充分应对日益复杂的网络威胁。现有方法难以进行有效的策略推导和步骤选择,严重依赖人工干预。
核心思路:Pen-Strategist的核心思路是构建一个领域特定的推理模型,该模型能够通过逻辑推理自动生成渗透测试策略,并将其转化为可执行的步骤。通过强化学习微调大型语言模型,使其具备更强的策略生成能力。同时,利用语义信息训练CNN分类器,提高步骤预测的准确性和稳定性。
技术框架:Pen-Strategist框架主要包含两个核心模块:策略生成模块和步骤预测模块。策略生成模块首先构建一个包含策略推导和步骤选择逻辑解释的领域数据集,然后使用强化学习对Qwen-3-14B模型进行微调,使其能够根据给定的渗透测试场景生成相应的策略。步骤预测模块则训练一个基于语义的CNN分类器,用于将生成的策略转化为具体的渗透测试步骤。框架还集成了现有的自动化渗透测试框架,如PentestGPT,以实现更高效的渗透测试流程。
关键创新:Pen-Strategist的关键创新在于其领域特定的推理模型,该模型能够通过逻辑推理自动生成渗透测试策略。与现有方法相比,Pen-Strategist不再依赖人工制定策略,而是通过学习大量的渗透测试案例,自动推导出最优的策略。此外,Pen-Strategist还采用了强化学习和语义CNN等先进技术,进一步提高了策略生成和步骤预测的准确性和效率。
关键设计:在策略生成模块中,使用了Qwen-3-14B模型作为基础模型,并使用强化学习进行微调,目标是最大化渗透测试的成功率。在步骤预测模块中,使用了基于语义的CNN分类器,该分类器能够根据策略的语义信息预测下一步应该执行的渗透测试步骤。损失函数的设计考虑了步骤预测的准确性和稳定性,并采用了交叉熵损失函数和正则化项。
🖼️ 关键图片
📊 实验亮点
Pen-Strategist在策略推导方面比基线提高了87%,在子任务完成方面比GPT-5提高了47.5%,在CTFKnow基准测试中比基础模型提高了18%。此外,Pen-Strategist的步骤预测模块比商业LLM的性能高出28%,并且在用户研究中表现优于Claude-4.6-Sonnet,证明了其在渗透测试策略生成和分析方面的优越性能。
🎯 应用场景
Pen-Strategist可应用于各种网络安全场景,包括企业安全评估、漏洞挖掘、安全培训等。该框架能够帮助安全人员更高效地进行渗透测试,及时发现和修复安全漏洞,提高网络安全防御能力。此外,Pen-Strategist还可以作为安全培训的工具,帮助新手快速掌握渗透测试技能,降低网络安全人才培养的门槛。
📄 摘要(原文)
Cyber threats are rapidly increasing, expanding their impact from large-scale enterprises to government services and individual users, making robust security systems increasingly essential. However, a significant shortage of skilled cybersecurity professionals exacerbates this challenge. While recent research has explored automating tasks such as penetration testing using LLM-based agents, existing frameworks often perform poorly due to limited capability in strategy formulation, domain-specific reasoning, and accurate action and tool selection. To overcome these limitations, we propose Pen-Strategist framework, consisting of a novel domain-specific reasoning model that derives pentesting strategies via logical reasoning and a classifier that converts the strategies into actionable steps. First, we construct a reasoning dataset containing logical explanations for both strategy derivation and step selection in pentesting scenarios. We then fine-tune a Qwen-3-14B model for strategy generation using reinforcement learning. Evaluation on the test split of the dataset demonstrates a 87% improvement in strategy derivation performance compared to the baseline. Furthermore, we integrate the fine-tuned Pen-Strategist model into existing automated pentesting frameworks, such as PentestGPT, and evaluate its performance on vulnerable machines, achieving a 47.5% improvement in subtask completion while surpassing the baseline GPT-5. Further experiments on the CTFKnow benchmark show an 18% performance gain over the base model. For step prediction, we train a semantic-based CNN classifier, which outperforms commercial LLMs by 28% and enhances execution stability. Finally, we conduct a user study to qualitatively assess the generated strategies, and Pen-Strategist demonstrates superior performance compared to the Claude-4.6-Sonnet.