Abstract
Traditional evaluation of offensive security agents relies on binary pass/fail metrics, which fail to capture the nuance of agent reasoning or the impact of minor execution errors. This paper presents CTFJudge, a framework for granular, multi-dimensional scoring of security agents, and CTFTiny, a lightweight benchmark designed for rapid experimentation and hyperparameter tuning. Our analysis reveals that high-temperature sampling ($T=1.0$) significantly enhances agent performance in complex tasks by encouraging creative exploration. Furthermore, we identify a "Goldilocks zone" for context window limits, finding that excessive context can lead to performance degradation.
1. Introduction
Capture the Flag (CTF) competitions serve as a rigorous testing ground for cybersecurity skills, requiring a combination of domain expertise and creative problem-solving. While Large Language Model (LLM) agents have shown promise in these environments, current evaluation methods are often too coarse. An agent may be penalized for a trivial syntax error despite correct reasoning, or conversely, may succeed through brute force without understanding the underlying vulnerability. This research addresses these limitations by proposing a more sophisticated evaluation paradigm and a streamlined benchmark for systematic study.
2. Methodology
The researchers propose a three-pronged approach to professionalize the evaluation of offensive security agents: the CTFJudge framework, the CTF Competency Index (CCI), and the CTFTiny benchmark.
2.1 CTFJudge and the Competency Index
CTFJudge utilizes a high-capability model to evaluate an agent's "trajectory"—the sequence of thoughts, commands, and intermediate results—against an expert-curated "gold standard" write-up. This allows for a more nuanced assessment than simple flag verification.
The CTF Competency Index (CCI) scores agents across six critical dimensions: vulnerability understanding, reconnaissance thoroughness, exploitation methodology, technical accuracy, efficiency of approach, and adaptability.
2.2 CTFTiny Benchmark
To facilitate rapid hyperparameter sweeps, the authors introduced CTFTiny, a curated subset of 50 representative challenges from the NYU CTF Bench. Spanning domains such as binary exploitation, web security, and reverse engineering, CTFTiny is designed to be lightweight enough for reproducible experimentation while remaining representative of real-world security tasks.
3. Results and Analysis
The study conducted extensive tests on decoding parameters, including temperature, top-p, and max tokens, to identify optimal configurations for offensive security agents.
3.1 Model Performance and Difficulty Scaling
Performance varied significantly across models and challenge difficulties. Claude 4 Sonnet emerged as the top performer, solving 76% (38/50) of the CTFTiny challenges.
As shown in Figure 4, while most models handle "very easy" tasks effectively, performance drops sharply as complexity increases. Only top-tier models like Claude 4 Sonnet and Gemini 2.5 Pro demonstrated the ability to tackle "difficult" challenges.
3.2 The Impact of Hyperparameters
A key finding was the "Creativity Boost" provided by higher temperatures. Contrary to the standard practice of using low temperature ($T \approx 0.1$) for technical tasks, Claude 4 Sonnet performed best at $T=1.0$. This suggests that high-temperature sampling allows models to explore diverse attack paths, which is essential when initial exploit attempts fail.
Additionally, the researchers identified a "Goldilocks zone" for token limits. Performance peaked at a 4096-token limit; at 8192 tokens, performance declined due to "context saturation," where models became distracted by verbose reasoning or repetitive loops.
4. Conclusion
This work moves beyond binary evaluation to provide a deeper understanding of LLM agent competency in offensive security. By introducing CTFJudge and CTFTiny, the researchers provide the community with tools for more rigorous and efficient agent development. Future work will focus on adaptive calibration for the CCI and incorporating real-time feedback from the judge to improve agent learning during execution.
Citation: Shao, M., Rani, N., et al. (2025). Towards Effective Offensive Security LLM Agents: Hyperparameter Tuning, LLM as a Judge, and a Lightweight CTF Benchmark. arXiv:2508.05674v1.
Summary updated