Abstract
Capture-the-Flag (CTF) competitions are crucial for cybersecurity education and training. With the evolution of large language models (LLMs), there is growing interest in their ability to automate CTF challenge solving, with DARPA's AIxCC competition (since 2023) being a notable example. However, this demands a combination of multiple abilities of LLMs, from knowledge to reasoning and further to actions. In this paper, we highlight the importance of technical knowledge in solving CTF problems and deliberately construct a focused benchmark, CTFKnow, with 3,992 questions to measure LLMs' performance in this core aspect. Our study offers a focused and innovative measurement of LLMs' capability in understanding CTF knowledge and applying it to solve CTF challenges. Our key findings reveal that while LLMs possess substantial technical knowledge, they struggle to apply it accurately to specific scenarios and adapt based on feedback from CTF environments. Based on insights derived from this measurement study, we propose CTFAgent, a novel LLM-driven framework for advancing CTF problem-solving. CTFAgent introduces two new modules: two-stage Retrieval Augmented Generation (RAG) and interactive Environmental Augmentation, which enhance LLMs' technical knowledge and vulnerability exploitation on CTF, respectively. Experiments on two popular CTF datasets show that CTFAgent both achieves over 80% performance improvement. Moreover, in the picoCTF2024 hosted by CMU, CTFAgent ranked in the top 23.6% of nearly 7,000 participating teams. This reflects the benefit of our measurement study and the potential of our framework in advancing LLMs' capabilities in CTF problem-solving.
| Original language | English |
|---|---|
| Title of host publication | CCS '25: Proceedings of the 2025 ACM SIGSAC Conference on Computer and Communications Security |
| Editors | Chun-Ying HUANG, Jyh-Cheng CHEN, Shiuhpyng SHIEH |
| Publisher | Association for Computing Machinery, Inc |
| Pages | 603-617 |
| Number of pages | 15 |
| ISBN (Electronic) | 9798400715259 |
| DOIs | |
| Publication status | Published - 22 Nov 2025 |
| Event | 32nd ACM SIGSAC Conference on Computer and Communications Security - Taipei, Taiwan, China Duration: 13 Oct 2025 → 17 Oct 2025 |
Conference
| Conference | 32nd ACM SIGSAC Conference on Computer and Communications Security |
|---|---|
| Abbreviated title | CCS 2025 |
| Country/Territory | Taiwan, China |
| City | Taipei |
| Period | 13/10/25 → 17/10/25 |
Bibliographical note
Publisher Copyright:© 2025 Copyright held by the owner/author(s).
Keywords
- Capture-the-Flag
- Large Language Model