EnIGMA: Interactive tools substantially assist language model agents in discovering security vulnerabilitiesEnIGMA: Interactive Tools Substantially Assist LM Agents in Finding Security Vulnerabilities
The authors propose EnIGMA, a CTF agent with interactive tools, and state that it exceeds prior systems on NYU CTF, InterCode-CTF, and CyBench, and discover the soliloquizing phenomenon.
- Existing LM agents have low success rates on cybersecurity tasks: they do not support interactive tools such as debuggers and server connections, struggle to handle the very long outputs in CTF solving, and lack a development set.
- The authors build EnIGMA on SWE-agent, adding interactive agent tools (the gdb debugger, pwntools server connections), two long-output summarizers, and demonstrations and guides written by category, and construct a 55-problem development set.
- Evaluated four models on 390 challenges across four benchmarks: the authors state that EnIGMA exceeds previous systems on NYU CTF, InterCode-CTF, and CyBench; ablations show that removing demonstrations causes the largest decrease; they also find the soliloquizing phenomenon in Claude 3.5 Sonnet.
- The authors state that future work can continue improving interactive tools and add human-in-the-loop; the evaluation covers 4 models and 390 challenges, does not report the number of repetitions, and 63.1% of unsolved instances terminate due to exhausting the 3 USD per-challenge budget.
- Evaluated models
- Claude 3.5 SonnetGPT-4 TurboGPT-4oLLaMA 3.1 405B Instruct
- Benchmarks
- NYU CTFInterCode-CTFCyBenchHackTheBox (HTB)
- Metrics
- % Solved (pass@1)$ Avg. Cost
Researchers from NYU, Princeton and other institutions propose EnIGMA, a language model agent built on SWE-agent for autonomously solving CTF security challenges, which achieves the best results on NYU CTF, InterCode-CTF and CyBench across 390 challenges in four benchmarks. New interactive agent tools let the model run the gdb debugger and server connection tools in non-blocking sessions, paired with a summarizer to compress overly long outputs; on NYU CTF with Claude 3.5 Sonnet it solves 13.5%, more than three times the previous best system's 4%, and on InterCode-CTF with GPT-4 Turbo it reaches 72%, 29 percentage points above the previous best result.
Why it was selectedThe paper provides quantitative evidence that interactive tools improve the solve rate of CTF agents, and its analysis of training data leakage and the soliloquizing phenomenon can be transferred to auditing similar safety evaluations.
Paper analysis
What problem does this paper attempt to solve?
Enable LM agents to autonomously solve CTF cybersecurity challenges using interactive tools and long-output summarization.
Core question: how to let LM agents autonomously solve Capture The Flag (CTF) cybersecurity challenges—existing agents lack interactive tool interfaces and have low success rates.
- Setting and importance: CTFs simulate real attack-and-defense scenarios and are used as benchmarks for evaluating LM cybersecurity capabilities; software connecting to the internet expands the attack surface, and the authors believe autonomous tools that can quickly find vulnerabilities are needed.
- Shortcomings of existing methods: the authors state that existing CTF agents (Shao et al., 2024b; Zhang et al., 2024) have limited scope and capability, struggle to adjust strategy after an initial failed attempt, and lack cybersecurity-oriented interfaces; shell-centric agents cannot nest REPLs and cannot run interactive tools such as gdb and netcat.
- Core observation: solving CTFs often requires interactive operations such as debugging and interacting with remote servers, and often produces very long outputs (100+ lines from decompilation, 1000+ lines from strings) that exceed the model context; on this basis the authors judge that an interactive interface and output compression are needed.
- What the paper proposes: the EnIGMA agent (including Interactive Agent Tools and two summarizers), a 55-problem development set, and quantitative and qualitative analysis on 390 problems across four benchmarks, and proposes the soliloquizing phenomenon.
- Task setup (not an attack/defense paper, no threat model):
- Goal: autonomously find the flag string hidden in the challenge within a Docker environment.
- Victim system: the CTF challenge environment (including an optional remote challenge server).
- Success criterion: submitting the correct flag within a single run (pass@1); multiple submissions are allowed per run.
What related research exists?
Related work falls into three groups: CTF agents, offensive cybersecurity evaluation, and general LM agents; the authors state that EnIGMA exceeds the baselines on each benchmark.
CTF agents
- Yang et al. (2023a; 2023b), Shao et al. (2024a; 2024b), Team et al. (2024), Zhang et al. (2024)—frameworks for solving CTFs in Docker environments (often with Kali Linux preinstalled tools). The paper notes that these agents do not support interactive tools, and some rely on manually decomposing subtasks.
- Project Naptime / Big Sleep (Glazunov & Brand, 2024; Allamanis et al., 2024)—found a new SQLite vulnerability on CyberSecEval2 using tools such as a debugger and a browser. The paper notes that this agent executes only one command per session, whereas EnIGMA supports nested REPLs, multiple commands per session, and retains the main shell.
Offensive cybersecurity evaluation
- The CyberSecEval series (Bhatt et al., 2023; 2024; Wan et al., 2024)—benchmarks for evaluating the risk and capability of LMs assisting cyberattacks.
- Phuong et al. (2024), Team et al. (2024)—evaluate the "dangerous capabilities" of frontier models, including CTF tasks; the paper states their results on CTF are low.
General LM agents
- ReAct (Yao et al., 2023b), Reflexion (Shinn et al., 2023), Sumers et al. (2023)—reason-act-feedback agent frameworks; EnIGMA is based on the ReAct loop.
- SWE-agent (Yang et al., 2024)—a software engineering agent that proposes the Agent-Computer Interface (ACI); EnIGMA is built directly on it and follows the ACI principles.
Baselines and benchmarks: on NYU CTF, compared with the NYU agent of Shao et al. (2024b); on InterCode-CTF, compared with the Google DeepMind Agent of Team et al. (2024) and the InterCode-CTF agent of Yang et al. (2023a); on CyBench, compared with the CyBench agent of Zhang et al. (2024); on HTB, the NYU agent (GPT-4 Turbo) is used as the baseline.
The authors position the paper as: adding a cybersecurity-oriented interactive interface and summarizers on top of SWE-agent, emphasizing cross-benchmark generalization rather than manual subtasks; the authors state that it achieves results exceeding prior systems on NYU CTF, InterCode-CTF, and CyBench.
How does the paper address this problem?
Add interactive tools (debugger, server connection), a long-output summarizer, and category-specific demonstrations to SWE-agent, along with a 55-challenge development set.
Overall approach: building on SWE-agent's ReAct loop and ACI principles, extend the environment for cybersecurity tasks to obtain EnIGMA—adding interactive agent tools, a long-output summarizer, category-specific demonstrations and guides, and constructing a development set to avoid overfitting to the test benchmarks.
Environment and Base Interface
- Based on SWE-agent's thought-action-observation loop, executing commands in a Docker container.
- Integrates tools from Shao et al. (2024a): decompile, disassemble, check_flag, give_up.
- Pre-installs libraries and tools commonly used in the development set (pycryptodome, sage, RsaCtfTool, tshark, binwalk, wine, etc.).
- Improved runtime control: in addition to the overall timeout, commands that produce no output for a long time can be interrupted while preserving the output already produced, to support long brute-force tasks (Appendix D).
Interactive Agent Tools (IATs)
- Two design principles: a simple and unified interaction interface (start/stop plus each tool's basic commands, with only one parallel session allowed at a time); non-blocking sessions—interactive tools run in a separate REPL in parallel with the main shell, similar to a human using multiple windows at once.
- Two tools implemented: a gdb-based debugger (debug_start, debug_add_breakpoint, debug_continue, debug_step, debug_exec, debug_stop) and a pwntools-based server connection tool (connect_start, connect_sendline, connect_exec, connect_stop), with full documentation in Table 8.
- The authors state that these two tools were chosen because they are the most common tools in the development set experiments and are not supported by existing agents; IATs can be extended to any tool with a REPL structure.
EnIGMA Summarizers
- Simple summarizer: output exceeding the line limit is stored in a file and opened with SWE-agent's file viewing interface.
- LM summarizer: another LM agent generates a short summary based on the challenge context and the previous action; both summarizers come with warnings and guidance for accessing the original output.
Demonstrations and Guides
- Each challenge category has different demonstrations (in-context learning) and guides; demonstrations include trial-and-error examples (solutions that fail first and then succeed), and the guides were written by the authors after analyzing failed attempts in the development set.
Development Set
- 55 challenges from the CSAW 2013–2016 competitions, with no overlap with NYU CTF (2017–2023); covering six categories: 10 each for crypto, forensics, pwn, and web, 9 for rev, and 6 for misc (Appendix B, Table 5).
Success Determination and Evaluation Method
- Main metric % Solved (pass@1): the proportion of runs that successfully submit the correct flag within a single run; multiple submissions are allowed per run, and the run terminates upon a correct submission.
- $ Avg. Cost: the average API cost over all successful instances; the budget cap is 3 USD per challenge, and exceeding it is recorded as unsolved (exit_cost).
What experiments did the paper conduct?
Main experiments with four models × four benchmarks, 390 problems in total, plus interface ablations, data leakage and soliloquy analysis, and generalization tests on unseen challenges.
Experimental Setup
- Models evaluated: GPT-4 Turbo (gpt-4-1106-preview), GPT-4o (gpt-4o), Claude 3.5 Sonnet (claude-3-5-sonnet-20240620), LLaMA 3.1 405B Instruct (Meta-Llama-3.1-405B-Instruct-Turbo); temperature T=0, nucleus sampling p=0.95 (Appendix C.2).
- Benchmarks: NYU CTF 200 challenges, InterCode-CTF 100 challenges, CyBench 40 challenges, HTB 50 challenges, 390 challenges in total, six categories (Table 6).
- Baselines: NYU agent (Shao et al., 2024b), Google DeepMind Agent (Team et al., 2024, did not evaluate 19 of the 100 InterCode-CTF challenges), InterCode-CTF agent (Yang et al., 2023a), CyBench agent (Zhang et al., 2024).
- Metrics: % Solved (pass@1) and $ Avg. Cost; budget of 3 USD per challenge, exceeding the budget is recorded as unsolved.
- Evaluation method: submitted flags are judged correct or incorrect automatically by the environment, with no LLM review.
- Number of repetitions: not reported in the paper.
Main Results
According to Table 1 (% Solved / $ Avg. Cost, EnIGMA is pass@1):
Swipe horizontally to read the table
Benchmark Claude 3.5 Sonnet GPT-4 Turbo GPT-4o LLaMA 3.1 405B Previous best NYU CTF 13.5 / $0.35 7.0 / $0.79 9.0 / $0.62 7.0 / $0.34 NYU agent 4.0 CyBench 20.0 / $0.91 17.5 / $1.60 12.5 / $0.61 10.0 / $0.42 CyBench agent 17.5 InterCode-CTF 67.0 / $0.24 72.0 / $0.53 69.0 / $0.47 70.0 / $0.21 Google DeepMind Agent 43.0* HTB 26.0 / $0.53 18.0 / $1.35 16.0 / $1.71 8.0 / $0.75 NYU agent (GPT-4 Turbo) 20.0 - The authors state that EnIGMA solves more than three times as many challenges on NYU CTF as the previous best agent (13.5% vs. 4.0%, Table 2), and that its best result on InterCode-CTF is 29 percentage points higher than the previous best.
- Exceptions: on CyBench, GPT-4o (12.5%) ties the CyBench agent, and LLaMA 3.1 405B (10.0%) is lower than the 7.5% corresponding model row of the CyBench agent—Table 2 shows that under same-model comparisons EnIGMA is never lower than the CyBench agent; on HTB, LLaMA 3.1 405B (8.0%) is lower than the NYU agent baseline (20.0%).
- NYU CTF results by category (Table 9, EnIGMA is pass@1, NYU agent is pass@5): in the web category both EnIGMA models are 0, lower than the 1.92% of the NYU agent GPT-4 Turbo.
Interface Ablation (Table 3, 11, 12, Claude 3.5 Sonnet, four benchmarks combined)
- IATs: full 29.5%, without IATs 27.4% (↓2.1); by category, crypto, pwn, and rev decrease, while web instead increases (Table 11), which the authors attribute to the lack of a suitable interactive tool for web navigation.
- Summarizer: LM summarizer 29.5%, simple summarizer 26.9% (↓2.6), no summarizer 28.2% (↓1.3).
- Demonstrations: without demonstrations 23.3% (↓6.2), the largest decrease; however, the web and misc categories increase after removing demonstrations (Table 11), and the authors believe that demonstrations for some categories are not necessarily always useful.
- With IATs, solving takes an average of 11.5 turns, versus 14.9 turns without, 22.8% faster (p=0.019); each server connection session is accompanied by an average of 3.7 send-data commands.
Data Leakage, Soliloquy, and Generalization
- Leakage determination: submitting the flag directly in a single step, or the flag not appearing in any environment feedback (Appendix F); Table 4 shows low leakage rates: NYU CTF 2.7%, InterCode-CTF 14.1%, CyBench and HTB 0 (all Claude 3.5 Sonnet successful trajectories).
- Soliloquizing: the model generates "observation" text on its own within a single response without interacting with the environment; 48.4% of Claude 3.5 Sonnet trajectories on NYU CTF and 47.5% on CyBench contain soliloquy, GPT-4 Turbo and GPT-4o are 0, and LLaMA 3.1 405B is 3.6% (Table 4); the correlation between soliloquy and solving success is −26%.
- Soliloquy suppression experiment: on a 113-challenge NYU CTF sample, truncating content after the first action yields 13 successes, versus 14 under the default setting (4 of which were judged as leakage); the authors state that the success rates of the two settings are statistically compatible (Table 15).
- Unseen challenges: 21 challenges from the September 2024 CSAW qualifiers (later than all models' training cutoffs), Claude 3.5 Sonnet and GPT-4o each solved 2, GPT-4 Turbo and LLaMA 0; the authors believe this shows that EnIGMA can extrapolate to unseen challenges.
Other Ablations and Analyses
- Sampling temperature (24 challenges, Table 14): T=0 succeeds 14.3%, T=0.1 is 8.3%, T=0.25 is 10.5%; the proportion of steps containing soliloquy ranges from 32.1% to 37.6%, which the authors state is independent of temperature.
- Exit status (Table 13, Claude 3.5 Sonnet): 63.1% terminate due to exhausting the budget, only 0.5% voluntarily give up (exit_forfeit).
- Distribution of turns for success and failure (Figure 4): the authors state that most successes occur within the first 20 turns, while failures manifest as long periods without progress.
- Debugging action sequences (Figure 5, rev tasks): 75% of breakpoints are followed by continue; 30% of starts are followed by breakpoint.
- Cost by category (Table 10): for Claude 3.5 Sonnet and LLaMA 3.1 405B, most categories average about half a dollar or less per challenge.
What are some points that can be further explored?
The authors propose two future directions: interactive tools and human-in-the-loop; the evaluation covers 4 models and 390 problems, and the number of repetitions is not reported.
Limitations and future directions noted by the authors
- Future work can further improve on the new Interactive Agent Tools and extend agent capabilities beyond cybersecurity to areas such as software engineering (Section 6).
- Future work can introduce human-in-the-loop to amplify EnIGMA's performance; the authors also note that this could amplify attackers' capabilities (Impact Statement).
- The authors state that existing research shows LM-enabled security exploitation systems with human-in-the-loop do not yet exceed cybersecurity experts working alone, but this situation may change in the future (Impact Statement).
- The authors note that models rarely give up on their own and mostly stop only after exhausting the budget, and suggest setting a per-attempt cost cap by challenge category to improve cost efficiency (Section 4.1, Appendix E).
- The authors note that models struggle to install and use external tools without suitable interfaces—too many download, installation, and run steps and too much multi-round trial and error, and some tools also require a web interface (Appendix E).
Scope of the experiments
- The models tested are GPT-4 Turbo, GPT-4o, Claude 3.5 Sonnet, and LLaMA 3.1 405B Instruct, 4 in total (Appendix C.2).
- The evaluation covers 4 benchmarks with 390 problems in total and six categories; the HTB benchmark contains only the crypto and rev categories, with difficulty from very easy to medium (Table 6, Appendix C.1).
- The ablation experiments use only Claude 3.5 Sonnet and are reported at three granularities: the four-benchmark total, by category, and by benchmark (Table 3, 11, 12).
- The unseen-challenge generalization experiment has 21 problems (2024 CSAW qualifiers); the soliloquy suppression experiment has a sample of 113 problems; the temperature experiment has 24 problems (Section 4.2, Appendix F).
- The paper does not report the number of repeated runs for each condition; the main metric is pass@1, and the NYU agent baseline in Table 9 is pass@5.
Summarize the main content of the paper
EnIGMA improves CTF solving with interactive tools and summarizers; the authors state that it exceeds prior systems on three benchmarks and discover soliloquizing.
A work on cybersecurity agents: the authors build EnIGMA, letting LM agents autonomously solve CTF challenges.
- Problem: existing CTF agents do not support interactive tools such as gdb and server connections, struggle to handle very long outputs, struggle to adjust strategy after an initial failure, and have low success rates.
- Method: extend SWE-agent—add non-blocking Interactive Agent Tools (the gdb debugger, pwntools server connections), two long-output summarizers (simple and LM), demonstrations and guides written by category, and construct a 55-problem CSAW development set.
- Main results: on 390 problems across four benchmarks, EnIGMA with Claude 3.5 Sonnet solves 13.5% on NYU CTF (previous best 4.0%) and 20.0% on CyBench (previous best with the same model 17.5%); the best on InterCode-CTF is 72.0% (GPT-4 Turbo), which the authors state is 29 percentage points higher than the previous best (Table 1, 2).
- Ablation: removing demonstrations lowers the total % Solved from 29.5% to 23.3%, the largest drop; removing IATs lowers it to 27.4%, but the web category instead rises; the LM summarizer outperforms the simple summarizer and no summarizer (Table 3, 11).
- Analysis findings: the authors propose soliloquizing—48.4% of Claude 3.5 Sonnet's trajectories on NYU CTF fabricate observations on their own without interacting with the environment, correlated with a −26% success rate; on the 21 problems released after the training cutoff, Claude 3.5 Sonnet and GPT-4o each solve 2 problems, and the authors believe agents can extrapolate to unseen challenges.
- Authors' conclusion: the authors state that interactive tools and the summarization interface are key to agents solving CTFs, and that future work can continue to improve on this basis and explore human-in-the-loop.