How Do LLM Agents Actually Get the Flag? Trace-Level Provenance for Agentic Offensive Security Evaluation
Authors: Kimberly Milner, Minghao Shao, Nanda Rani, Haoran Xi, Venkata Sai Charan Putrevu, Meet Udeshi, Sandeep K. Shukla, Prashanth Krishnamurthy, Farshad Khorrami, Muhammad Shafique, Ramesh Karri
Organizations: NYU Tandon School of Engineering · NYU Abu Dhabi · CISPA - Helmholtz Center for Information Security, Saarbrücken · Indian Institute of Technology Tirupati · International Institute of Information Technology Hyderabad
Capture-the-Flag (CTF) benchmarks are widely used to assess the offensive security capabilities of autonomous language-model agents. Evaluations rely on shallow binary judgments or aggregate scores, overlooking the agent's trajectory to the flag. Consequently actual exploitation is conflated with direct flag exposure, memorized recall, external lookup, guessing, and unsupported claims, potentially overstating the agent's cybersecurity capability. We introduce CTF-ABACUS, a trace-based agent auditing framework that reconstructs each run as an evidence-grounded solve profile. By decomposing agent actions into penetration-testing phases and categorical techniques, it identifies where exploitation occurs, where the flag first appears, and whether the recovered flag is supported by demonstrated behavior. Aggregating solve profiles across agents yields challenge signatures that reveal whether success was achieved via the intended exploit or via shortcut pathways. We apply CTF-ABACUS to 1,435 CTF attempts by six frontier and open-source models on 240 challenges, yielding 2,870 solve profiles under two judge lenses. Trace-verified exploits account for only 62-87% of recovered flags across benchmarks, while shortcut recoveries follow substantially shallower trajectories. These findings shift CTF evaluation from counting recovered flags to verifying demonstrated exploitation and provide a basis for designing benchmarks that better isolate the offensive capabilities.
Figures & tables
Figure 1: CTF-Abacus reconstructs each run from its execution trace, separating demonstrated exploitation from shortcuts that flag matching counts as solved.
Item
Symbol
Meaning
Trace notation
Execution trace
T=(e1,…,en)
Ordered sequence of n execution steps.
Step
ei=(ai,oi)
Agent action ai and corresponding observation oi .
Step labels
zi=(ϕi,τi)
PTES phase ϕi and standards-grounded technique τi .
Table 1: Solve-profile notation and flag-provenance rules.
Figure 2: From execution trace to verified solve profile. Multi-agent trajectories are linearized into steps (ai,oi) , labeled with penetration-testing phases ϕi and techniques τi , assigned flag provenance π , evidence-audited, and aggregated into challenge signatures. Human review is restricted to reasoning-originated flags classified as recalled, guessed, leaked, or derived .
Figure 3: Trajectory geometry across category, benchmark, and model, under both judge lenses. Diagonal, zigzag, and baseline composition of all evaluable runs, cut three ways. Each group shows the Claude lens (C, upper bar) over the GPT lens (G, lower bar). Composition shifts sharply across category and benchmark but barely across model; the two lenses track closely.
Phase
Steps / # τ ( Eff )
Dominant technique (share)
Reconnaissance
52% / 71 (12)
Probe live service (27%)
Vulnerability analysis
19% / 126 (42)
Category-specific ( ≤ 18%)
Exploitation
15% / 66 (13)
Author solve script (40%)
Post-exploitation
< 2% / 12 (2)
Read captured flag (80%)
Table 2: Effort and technique diversity by PTES ϕ
# τ
PTES depth
monotonicity m
reached Exp.
Genuine
5.2
4.3
0.80
89%
Shortcut
4.3
2.8
0.50
42%
Table 3: genuine & ¬ϕ =Exploit Flag recoveries.
τ
m
d
gen.
r.Exp
rec.
r.Post
CTFTiny
6.5
0.75
4.21
86
88
86
40
Cybench
9.0
0.50
3.58
62
70
36
16
HTB
5.5
0.79
4.13
81
91
87
22
Intercode
2.5
0.65
3.60
64
64
79
23
Table 4: Benchmark quality by dimension , median over 6 models. τ techniques; m monotonicity (0–1); d PTES depth (0–5); gen. genuine share of recoveries; r.Exp / rec. / r.Post % of runs reaching Exploitation / recovering / reaching Post-Exploitation
Figure 5: Command- and run-summary features poorly distinguish execution-backed from unsupported flag recoveries.
Figure 6: Verification shifts model scores similarly, while the adjustment varies more across benchmarks, making rank changes primarily benchmark-dependent.
Figure 7: Recovery provenance varies substantially across benchmarks, with direct flag exposure accounting for far more unsupported recoveries than contamination.
Figure 8: Solve pathways remain mixed across models even after crediting verified derivations, while identical terminal scores can represent different evidence.
Figure 9: Execution-backed and unsupported recoveries follow coherent but opposing behavioral patterns, although no single feature reliably identifies an individual pathway.
Figure 10: Trajectories with no demonstrated exploitation