arXiv:2508.02921cs.AIcs.CR2025-08被引 4

用AI评估黑客测试代理行为是否合规,提升安全系统可信度。

PentestJudge: Judging Agent Behavior Against Operational Requirements

  • 用大模型当裁判,分析渗透测试过程中的操作是否符合标准
  • 最佳模型F1达0.83,工具使用能力强的模型更接近专家判断
  • 低成本模型可验证高端模型的测试过程,适合安全系统质量评估

我们提出PentestJudge,一个用于评估渗透测试代理操作行为的系统。该系统采用大语言模型(LLM)作为裁判,具备访问任意代理状态轨迹和工具调用历史的能力,以判断其行为是否满足难以程序化评估的操作准则。我们设计了基于树结构的评分框架,将特定环境下的渗透测试任务逐层拆解为更小、更易管理的子任务与标准,直至每个叶节点为简单的二元判断。任务节点按操作目标、操作安全性和战术规范分类。通过与领域专家标注对比,使用标准二分类指标(如F1分数)评估模型表现。我们测试了多个前沿及开源模型,最优模型达到F1=0.83。结果表明,工具使用能力更强的模型更接近人类专家。分类型分析显示,即使整体得分相近的模型在不同要求上表现差异显著,提示某些模型可能更适合特定标准的判断。此外,较弱且廉价的模型能有效评估强而昂贵模型的测试轨迹,表明验证比生成更容易。我们共享此方法论,推动未来研究对AI安全代理全流程质量评估的理解,使其能在敏感生产环境中被可靠应用。

原文摘要 · Abstract (English)

We introduce PentestJudge, a system for evaluating the operations of penetration testing agents. PentestJudge is a large language model (LLM)-as-judge with access to tools that allow it to consume arbitrary trajectories of agent states and tool call history to determine whether a security agent's actions meet certain operating criteria that would be impractical to evaluate programmatically. We develop rubrics that use a tree structure to hierarchically collapse the penetration testing task for a particular environment into smaller, simpler, and more manageable sub-tasks and criteria until each leaf node represents simple yes-or-no criteria for PentestJudge to evaluate. Task nodes are broken down into different categories related to operational objectives, operational security, and tradecraft. LLM-as-judge scores are compared to human domain experts as a ground-truth reference, allowing us to compare their relative performance with standard binary classification metrics, such as F1 scores. We evaluate several frontier and open-source models acting as judge agents, with the best model reaching an F1 score of 0.83. We find models that are better at tool-use perform more closely to human experts. By stratifying the F1 scores by requirement type, we find even models with similar overall scores struggle with different types of questions, suggesting certain models may be better judges of particular operating criteria. We find that weaker and cheaper models can judge the trajectories of pentests performed by stronger and more expensive models, suggesting verification may be easier than generation for the penetration testing task. We share this methodology to facilitate future research in understanding the ability of judges to holistically and scalably evaluate the process quality of AI-based information security agents so that they may be confidently used in sensitive production environments.

安全评估大模型裁判渗透测试AI验证

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。