[Paper Review] An Empirical Evaluation of LLMs for Solving Offensive Security Challenges
This paper evaluates large language models (LLMs) in solving real-world Capture The Flag (CTF) cybersecurity challenges using two workflows: human-in-the-loop (HITL) and fully automated. GPT-4 outperformed 88.5% of human CTF participants, demonstrating LLMs' strong potential in offensive security tasks, though failures due to incorrect code, command-line errors, and lack of feedback persist.
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.
Motivation & Objective
- To evaluate the effectiveness of LLMs in solving real-world offensive security challenges from live CTF competitions.
- To compare LLM performance against human CTF participants using both automated and human-in-the-loop workflows.
- To identify common failure modes in LLM-guided CTF solving and assess the impact of human feedback on success rates.
- To provide a benchmark for integrating LLMs into cybersecurity education and automated red-teaming workflows.
Proposed method
- Developed a fully automated CTF-solving framework that prompts LLMs with challenge descriptions, source code, and executable files, then executes generated solutions in isolated environments.
- Implemented a human-in-the-loop (HITL) workflow where users iteratively refine LLM outputs using error feedback from execution results.
- Used six LLMs—GPT-3.5, GPT-4, Claude, Bard, DeepSeek Coder, and Mixtral—across 26 diverse CTF challenges spanning cryptography, reverse engineering, and web exploitation.
- Integrated tools like Ghidra for binary decompilation and containerized environments to simulate real competition conditions.
- Collected human contestant results from a live CTF event (LLM Attack Challenge at NYU CSAW) for comparative analysis.
- Open-sourced the dataset and framework to enable reproducibility and further research: https://github.com/NickNameInvalid/LLM_CTF
Experimental results
Research questions
- RQ1How do LLMs perform in solving real CTF challenges compared to average human participants?
- RQ2What are the success rates of fully automated versus human-in-the-loop LLM workflows in CTF solving?
- RQ3What are the primary failure modes in LLM-guided CTF solving, and how do they vary across models?
- RQ4How does human feedback influence LLM performance in iterative CTF solving?
- RQ5To what extent can LLMs autonomously solve CTF challenges without human intervention?
Key findings
- GPT-4 outperformed 88.5% of human CTF participants in a real competition, indicating it matches or exceeds the performance of an average human team.
- In the fully automated workflow, GPT-4 achieved a success rate of 42.3% across 26 challenges, with the highest success rate among all evaluated LLMs.
- The most common failure modes in automated solving were empty solutions (25.0%), wrong flag outputs (23.1%), and command-line errors (18.9%).
- Human-in-the-loop workflows significantly reduced failure rates, especially when error feedback was provided, indicating that human oversight improves LLM reliability.
- LLMs frequently failed due to incorrect code generation, such as undefined variables, invalid method calls, and syntax errors like improper indentation.
- A small number of failures were due to LLMs generating code in unintended languages (e.g., 'rox' instead of Python), even when explicitly prompted.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.