LLMs as Hackers: Autonomous Linux Privilege Escalation Attacks

📄 arXiv: 2310.11409v7 📥 PDF

作者: Andreas Happe, Aaron Kaplan, Juergen Cito

分类: cs.CR, cs.AI

发布日期: 2023-10-17 (更新: 2026-02-11)

DOI: 10.1007/s10664-025-10758-3


💡 一句话要点

提出hackingBuddyGPT以实现自主Linux权限提升攻击

🎯 匹配领域: 支柱四:生成式动作 (Generative Motion)

关键词: 权限提升 渗透测试 语言模型 自动化攻击 网络安全 模型评估 hackingBuddyGPT

📋 核心要点

  1. 现有方法在自动化渗透测试中缺乏对LLMs在Linux权限提升攻击中的有效性和局限性的全面理解。
  2. 论文提出hackingBuddyGPT,利用LLMs自动化执行Linux权限提升攻击,并设计了新的基准以进行评估。
  3. 实验结果表明,GPT-4-Turbo在权限提升攻击中成功率高达33-83%,与人类渗透测试人员相当,而其他模型表现较差。

📝 摘要(中文)

渗透测试对于识别系统漏洞至关重要,其中权限提升是获取受保护资源的关键子任务。语言模型(LLMs)为自动化这些安全实践提供了新途径,但LLMs在自主Linux权限提升攻击中的有效性和局限性尚未得到全面理解。为此,我们提出了hackingBuddyGPT,一个完全自动化的LLM驱动原型,旨在实现自主Linux权限提升。我们策划了一个新的公开Linux权限提升基准,支持可控和可重复的评估。我们的实证分析评估了不同LLMs(如GPT-3.5-Turbo、GPT-4-Turbo和Llama3)的定量成功率和定性操作行为,并与人类专业渗透测试人员和传统自动化工具进行了对比。结果显示,GPT-4-Turbo的有效性高,成功利用33-83%的漏洞,表现与人类渗透测试人员(75%)相当。

🔬 方法详解

问题定义:本论文旨在解决LLMs在自主Linux权限提升攻击中的有效性和局限性问题。现有方法未能充分探索LLMs在渗透测试中的应用潜力,尤其是在权限提升方面的表现。

核心思路:论文的核心思路是构建hackingBuddyGPT,一个基于LLM的自动化工具,能够模拟人类渗透测试行为,从而实现自主的权限提升攻击。通过引入新的基准和评估方法,研究LLMs在这一领域的表现。

技术框架:整体架构包括数据收集、模型训练、攻击策略生成和评估模块。首先,收集Linux权限提升的相关数据,然后训练不同的LLMs,最后生成攻击策略并进行评估。

关键创新:最重要的技术创新点在于引入了hackingBuddyGPT这一全自动化原型,并设计了新的Linux权限提升基准,支持可控和可重复的评估。这与传统的渗透测试工具有本质区别。

关键设计:在模型训练中,采用了不同的上下文管理策略和高层次指导机制,优化了上下文大小,显著提高了LLMs的成功率。实验中还分析了成本效益,表明GPT-4-Turbo在性能和成本上具有竞争力。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果显示,GPT-4-Turbo在Linux权限提升攻击中的成功率达到了33-83%,与人类渗透测试人员的75%相当。而Llama3的成功率仅为0-33%,GPT-3.5-Turbo则为16-50%。高层次指导和状态管理显著提升了LLMs的成功率,表明优化上下文管理对性能至关重要。

🎯 应用场景

该研究的潜在应用领域包括网络安全、渗透测试和漏洞评估等。hackingBuddyGPT能够帮助安全专家更高效地识别和利用系统漏洞,从而提升整体安全性。未来,该技术可能会推动自动化渗透测试工具的发展,增强对复杂攻击场景的应对能力。

📄 摘要(原文)

Penetration-testing is crucial for identifying system vulnerabilities, with privilege-escalation being a critical subtask to gain elevated access to protected resources. Language Models (LLMs) presents new avenues for automating these security practices by emulating human behavior. However, a comprehensive understanding of LLMs' efficacy and limitations in performing autonomous Linux privilege-escalation attacks remains under-explored. To address this gap, we introduce hackingBuddyGPT, a fully automated LLM-driven prototype designed for autonomous Linux privilege-escalation. We curated a novel, publicly available Linux privilege-escalation benchmark, enabling controlled and reproducible evaluation. Our empirical analysis assesses the quantitative success rates and qualitative operational behaviors of various LLMs -- GPT-3.5-Turbo, GPT-4-Turbo, and Llama3 -- against baselines of human professional pen-testers and traditional automated tools. We investigate the impact of context management strategies, different context sizes, and various high-level guidance mechanisms on LLM performance. Results show that GPT-4-Turbo demonstrates high efficacy, successfully exploiting 33-83% of vulnerabilities, a performance comparable to human pen-testers (75%). In contrast, local models like Llama3 exhibited limited success (0-33%), and GPT-3.5-Turbo achieved moderate rates (16-50%). We show that both high-level guidance and state-management through LLM-driven reflection significantly boost LLM success rates. Qualitative analysis reveals both LLMs' strengths and weaknesses in generating valid commands and highlights challenges in common-sense reasoning, error handling, and multi-step exploitation, particularly with temporal dependencies. Cost analysis indicates that GPT-4-Turbo can achieve human-comparable performance at competitive costs, especially with optimized context management.