Skip to main content
QUICK REVIEW

[论文解读] An Empirical Evaluation of LLMs for Solving Offensive Security Challenges

Minghao Shao, Boyuan Chen|arXiv (Cornell University)|Feb 19, 2024
Information and Cyber SecurityComputer Science被引用 3
一句话总结

本文通过全自动和人机协同两种工作流程,评估了大型语言模型(LLMs)在解决真实世界网络安全夺旗赛(CTF)挑战中的表现。GPT-4的表现优于88.5%的人类CTF参赛者,表明LLMs在红队任务中具有强大潜力,但错误代码、命令行错误以及缺乏反馈等问题仍导致失败。

ABSTRACT

Capture The Flag (CTF) challenges are puzzles related to computer security scenarios. With the advent of large language models (LLMs), more and more CTF participants are using LLMs to understand and solve the challenges. However, so far no work has evaluated the effectiveness of LLMs in solving CTF challenges with a fully automated workflow. We develop two CTF-solving workflows, human-in-the-loop (HITL) and fully-automated, to examine the LLMs' ability to solve a selected set of CTF challenges, prompted with information about the question. We collect human contestants' results on the same set of questions, and find that LLMs achieve higher success rate than an average human participant. This work provides a comprehensive evaluation of the capability of LLMs in solving real world CTF challenges, from real competition to fully automated workflow. Our results provide references for applying LLMs in cybersecurity education and pave the way for systematic evaluation of offensive cybersecurity capabilities in LLMs.

研究动机与目标

  • 评估LLMs在解决真实世界红队安全挑战(来自实际CTF竞赛)中的有效性。
  • 通过全自动与人机协同工作流程,对比LLM性能与人类CTF参赛者的表现。
  • 识别LLM引导的CTF求解中的常见失败模式,并评估人类反馈对成功率的影响。
  • 为将LLMs整合到网络安全教育和自动化红队工作流中提供基准参考。

提出的方法

  • 开发了一个全自动的CTF求解框架,向LLMs提供挑战描述、源代码和可执行文件,并在隔离环境中执行生成的解决方案。
  • 实施了人机协同(HITL)工作流程,用户通过执行结果的错误反馈,迭代优化LLM输出。
  • 在涵盖密码学、逆向工程和Web利用的26个多样化CTF挑战中,使用六种LLMs(GPT-3.5、GPT-4、Claude、Bard、DeepSeek Coder和Mixtral)进行测试。
  • 集成Ghidra等工具用于二进制反编译,并使用容器化环境模拟真实比赛条件。
  • 收集了来自一场实际CTF赛事(纽约大学CSAW的LLM攻击挑战)的人类参赛者结果,用于对比分析。
  • 开源了数据集和框架,以支持可复现性和进一步研究:https://github.com/NickNameInvalid/LLM_CTF

实验结果

研究问题

  • RQ1LLMs在解决真实CTF挑战中的表现与普通人类参赛者相比如何?
  • RQ2全自动与人机协同LLM工作流程在CTF求解中的成功率分别是多少?
  • RQ3LLM引导的CTF求解中的主要失败模式是什么?不同模型之间的失败模式有何差异?
  • RQ4人类反馈在迭代式CTF求解中如何影响LLM的表现?
  • RQ5LLMs在多大程度上能够无需人工干预自主解决CTF挑战?

主要发现

  • 在实际比赛中,GPT-4的表现优于88.5%的人类CTF参赛者,表明其表现达到或超过平均水平的人类团队。
  • 在全自动工作流程中,GPT-4在26个挑战中取得了42.3%的成功率,是所有评估LLMs中的最高值。
  • 全自动求解中最常见的失败模式为:空解决方案(25.0%)、错误的flag输出(23.1%)和命令行错误(18.9%)。
  • 人机协同工作流程显著降低了失败率,尤其是在提供错误反馈时,表明人类监督可提升LLM的可靠性。
  • LLMs常因错误生成代码而失败,例如未定义的变量、无效的方法调用以及语法错误(如缩进不正确)。
  • 少数失败是由于LLMs在明确提示下仍生成了非预期的编程语言代码(例如将'rox'误作为Python使用)。

阅读本论文

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

在 Nubint 中阅读本论文

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