Skip to main content
QUICK REVIEW

[论文解读] LLM Agents can Autonomously Hack Websites

Richard Fang, Rohan Bindu|arXiv (Cornell University)|Feb 6, 2024
Digital Rights Management and SecurityComputer Science被引用 8
一句话总结

本论文表明 frontier LLM 代理(尤其是具备工具、记忆与文档阅读的GPT-4)能够自主入侵沙盒和真实网站,在15个漏洞中实现最高73.3%的成功率,开源模型大多失败。

ABSTRACT

In recent years, large language models (LLMs) have become increasingly capable and can now interact with tools (i.e., call functions), read documents, and recursively call themselves. As a result, these LLMs can now function autonomously as agents. With the rise in capabilities of these agents, recent work has speculated on how LLM agents would affect cybersecurity. However, not much is known about the offensive capabilities of LLM agents. In this work, we show that LLM agents can autonomously hack websites, performing tasks as complex as blind database schema extraction and SQL injections without human feedback. Importantly, the agent does not need to know the vulnerability beforehand. This capability is uniquely enabled by frontier models that are highly capable of tool use and leveraging extended context. Namely, we show that GPT-4 is capable of such hacks, but existing open-source models are not. Finally, we show that GPT-4 is capable of autonomously finding vulnerabilities in websites in the wild. Our findings raise questions about the widespread deployment of LLMs.

研究动机与目标

  • 证明LLM代理能够在事先对漏洞毫无了解的情况下自主入侵网站。
  • 评估阅读文档、使用工具和规划如何促成自主网络攻击。
  • 比较GPT-4与开源模型在入侵网站方面的能力。
  • 评估LLM代理自主入侵的成本及现实世界影响。

提出的方法

  • 使用无头浏览器、终端访问和Python解释器来让LLM代理与网站交互。
  • 为代理提供六份公开的网络攻击文档以增强学习,但不公开具体的攻击步骤。
  • 使用OpenAI Assistants API和LangChain将GPT-4及其他模型封装为具备工具使用和记忆能力的自治代理。
  • 定义一个沙盒化网站基准,包含15个不同难度和目标的漏洞供每次攻击使用。
  • 对每个漏洞进行5次试验以计算pass-at-5和总体成功率。
  • 通过移除文档阅读和/或详细的系统指令进行消融研究以评估对性能的影响。

实验结果

研究问题

  • RQ1LLM代理是否能够在事先不了解漏洞的情况下自主识别并利用网络漏洞?
  • RQ2哪些工具使用、文档阅读和提示组合能够在多项漏洞中实现最高的入侵成功率?
  • RQ3GPT-4与开源LLM在自主网络入侵能力上如何比较?
  • RQ4使用LLM代理进行自主黑客攻击的成本和可扩展性如何?
  • RQ5自主LLM代理是否能在真实世界网站中发现漏洞?(在道德/沙盒约束内)

主要发现

  • 结合文档阅读、函数调用和助手API的GPT-4在15个漏洞上实现最高73.3%的pass-at-5和42.7%的总体成功率。
  • GPT-3.5达到6.7%的pass-at-5和2.7%的总体成功率;测试的所有开源模型总体成功率均为0%。
  • 开源模型在工具使用和规划方面表现不佳;OpenChat-3.5(7B)是最具能力的开源模型,正确漏洞尝试率为25.3%。
  • 消融研究显示移除文档和/或详细提示会显著降低性能;两者都移除时,性能降至GPT-3.5水平。
  • GPT-4能够在沙盒化的道德约束内自主在真实世界网站中发现漏洞。
  • 每次成功高难攻击的平均函数调用数可达到约44-49,体现了长程规划与回溯。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。