How Reliable Are AI Attackers Against a Fixed Vulnerable Target? A 400-Run Empirical Study of LLM Penetration Testing Consistency

📄 arXiv: 2605.30096v1 📥 PDF

作者: Galip Tolga Erdem

分类: cs.CR, cs.AI

发布日期: 2026-05-28

备注: 41 pages, 7 figures. Code and 400-run dataset: https://doi.org/10.5281/zenodo.20421592


💡 一句话要点

大规模实验评估LLM渗透测试一致性,揭示不同模型攻击行为的可靠性差异

🎯 匹配领域: 支柱四:生成式动作 (Generative Motion) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 大型语言模型 渗透测试 攻击一致性 网络安全 漏洞利用

📋 核心要点

  1. 现有研究缺乏对LLM自主网络攻击行为一致性的深入评估,无法准确衡量其作为攻击者的可靠性。
  2. 该研究通过大规模实验,在固定目标上重复运行LLM渗透测试,分析不同模型的攻击成功率和失败模式。
  3. 实验结果表明,不同LLM的攻击成功率存在显著差异,且失败模式各不相同,揭示了LLM作为攻击者的潜在风险。

📝 摘要(中文)

本文首次对大型语言模型(LLM)攻击一致性进行了大规模实证测量:针对同一蜜罐(包含OWASP Juice Shop和两个额外漏洞服务)进行了400次自主渗透测试(4个模型,每个模型100次),保持提示、编排器和目标不变。所有模型在迭代0-1中,都通过了编排器的一次性授权重新提示,没有出现内容拒绝。Claude Sonnet 4的API调用确实遇到了上游服务不可用问题——在Anthropic记录的容量事件期间,1135次调用中有91次返回HTTP 529 overloaded_error,导致100次Claude运行中有39次被截断。尽管如此,Claude在100次运行中有61次实现了完全利用;Gemini 2.5 Flash-Lite在85次中实现;GPT-4o-mini在56次中实现,同时部署了98种独特的攻击策略;qwen2.5-coder:14b在25次中实现。失败模式因模型而异:Claude因API截断(39次运行),qwen因过早完成(52次),GPT-4o-mini因迭代预算耗尽(23次)。跨服务凭据重用仅出现在保留最多对话历史记录的配置中(qwen 57%,GPT-4o-mini 49%,cloud模型在5次交换窗口中为0%)。跨模型利用率差异具有统计学意义(p < 0.001),且效应量很大;qwen与Gemini的SQL注入率差异为Cohen's h = 1.12。首次利用的时间落在15-30秒的挂钟范围内。据我们所知,这是第一个在多服务目标上测量每个模型N=100的自主LLM攻击行为的研究。

🔬 方法详解

问题定义:该论文旨在解决LLM在自主渗透测试中攻击行为一致性的问题。现有研究缺乏对LLM攻击可靠性的量化评估,无法有效预测其在实际网络安全场景中的威胁程度。现有方法难以区分模型自身的安全拒绝与外部API故障,影响了对LLM安全能力的准确判断。

核心思路:论文的核心思路是通过大规模重复实验,在控制变量的条件下,观察不同LLM在相同目标上的攻击行为,从而量化其攻击成功率、失败模式和攻击策略的多样性。通过分析实验数据,揭示不同LLM在渗透测试中的优势和劣势,为评估LLM作为攻击者的风险提供依据。

技术框架:该研究的技术框架主要包括以下几个部分:1) 选择四个不同的LLM(Claude Sonnet 4, Gemini 2.5 Flash-Lite, GPT-4o-mini, qwen2.5-coder:14b);2) 搭建一个包含OWASP Juice Shop和两个额外漏洞服务的蜜罐作为攻击目标;3) 设计一个编排器,用于控制LLM的渗透测试流程,并处理潜在的内容拒绝;4) 进行400次自主渗透测试(每个模型100次);5) 记录和分析LLM的API调用日志、攻击策略和成功/失败情况。

关键创新:该研究的关键创新在于:1) 首次对LLM的攻击一致性进行了大规模实证测量,提供了可靠的量化数据;2) 区分了模型自身的安全拒绝与外部API故障,提高了评估的准确性;3) 揭示了不同LLM在攻击成功率、失败模式和攻击策略上的显著差异,为选择合适的LLM进行安全评估提供了指导。

关键设计:实验中,提示、编排器和目标保持不变,以确保实验的可控性。编排器采用一次性授权重新提示策略,以应对LLM的内容拒绝。实验记录了LLM的API调用日志,以便区分模型自身的安全拒绝与外部API故障。统计分析采用了统计显著性检验(p < 0.001)和Cohen's h效应量,以量化不同模型之间的差异。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,Gemini 2.5 Flash-Lite的攻击成功率最高(85%),其次是Claude Sonnet 4(61%),GPT-4o-mini(56%),qwen2.5-coder:14b(25%)。不同模型的失败模式各不相同,例如Claude因API截断而失败,qwen因过早完成而失败,GPT-4o-mini因迭代预算耗尽而失败。qwen与Gemini的SQL注入率差异显著,Cohen's h = 1.12。

🎯 应用场景

该研究成果可应用于网络安全评估、红队演练和漏洞挖掘等领域。通过了解不同LLM的攻击能力和行为模式,可以更好地评估系统的安全风险,并制定相应的防御策略。此外,该研究还可以为开发更安全、更可靠的LLM提供指导。

📄 摘要(原文)

Large language models (LLMs) can autonomously conduct multi-stage cyber attacks, but the consistency of their offensive behavior under repeated trials remains unstudied. This work presents the first large-scale empirical measurement of LLM attack consistency: 400 autonomous penetration testing runs (4 models, 100 each) against an identical honeypot hosting OWASP Juice Shop and two additional vulnerable services, holding prompt, orchestrator, and target constant. No model emitted a content refusal that survived the orchestrator's one-shot authorization re-prompt at iterations 0-1. Claude Sonnet 4's API calls did encounter upstream service unavailability - 91 of 1,135 calls returned HTTP 529 overloaded_error during a documented Anthropic capacity event, truncating 39 of 100 Claude runs. An earlier draft catalogued these as safety refusals; on full-log audit they are upstream API failures, not model-level refusals. Despite this, Claude achieved full exploitation in 61 of 100 runs; Gemini 2.5 Flash-Lite in 85; GPT-4o-mini in 56 while deploying 98 unique attack strategies; qwen2.5-coder:14b in 25. Failure modes are model-distinctive: Claude through API truncation (39 runs), qwen through premature completion (52), GPT-4o-mini through iteration-budget exhaustion (23). Cross-service credential reuse appeared only in configurations retaining the most conversation history (qwen 57%, GPT-4o-mini 49%, cloud models 0% on 5-exchange windows). Cross-model exploitation rate differences are statistically significant (p < 0.001) with large effect sizes; qwen vs. Gemini SQL injection rates differ at Cohen's h = 1.12. First-exploit timing fell within a 15-30 second wall-clock range. To our knowledge, this is the first study to measure autonomous LLM attack behavior at N=100 per model across a multi-service target.