Evaluating Context Segmentation in Locally Deployable SLMs for Cybersecurity CTF Tasks
Abstract
The proliferation of highly capable open-weight Small Language Models (SLMs) democratizes access to advanced cybersecurity capabilities, posing an escalating risk as these models can bypass proprietary API guardrails when deployed locally. However, SLMs deployed as autonomous agents often struggle with long-horizon, exploratory tasks like cybersecurity Capture The Flag (CTF) challenges due to context bloat and cognitive degradation from accumulated tool-call outputs. To understand and mitigate this cybersecurity threat, we introduce context segmentation, a two-level agentic framework that divides complex exploitation tasks into manageable, contextually isolated sub-problems. Evaluating on the picoCTF dataset using memory-constrained gemma-4 models, we demonstrate that for the E4B model, our strategy acts as an intelligent search, achieving competitive rewards with superior token efficiency compared to brute-force retries, and successfully solving 18.52% of tasks that standard agentic execution fails to complete. Code is available at https://github.com/9xeb/context-segmentation.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- Accepted at the RAISE 2026 Workshop (ESORICS 2026). Non-archival
Related papers
Abliterated, but Better? Paired Evaluations of Cybersecurity Agents
Shared title terminologycs.CRAlan Zabihi, Ismail Pelaseyed
AgentLSD: Evaluating AI Security Agents Under Adversarial Task Contamination
Shared title terminologycs.CRMatteo Golinelli, Idilio Drago, Matteo Boffa et al.
Evaluating the Impact of Personalization in Conversational Cybersecurity Assistants
Shared title terminologycs.CRLea Duesterwald, Anika Jain, Shreya Kochar et al.
Detecting and Localizing Segment-Level Poisoning in Multi-Source LLM-Agent Inputs
Shared title terminologycs.CRXue Tan, Changhui Wang, Sanrui Yang et al.
LLM Agent Capabilities Should Follow Task Intent and Context Source
Shared title terminologycs.CRYusheng Zheng, Wenhui Zhang, Yu Mao
TrajMark: Ownership Attribution and Segment-Level Tamper Localization for Coding-Agent Trajectories
Shared title terminologycs.CRBokang Zeng, Zheng Gao, Xiaoyu Li et al.