LLM-based agents are increasingly used for cybersecurity tasks, but most existing systems rely on fixed, human-designed scaffolds that struggle to adapt across diverse targets and failure modes. We introduce \textsc{CyberEvolver}, a self-evolving cybersecurity agent framework that iteratively revises its own scaffold based on experience from failed execution attempts. Self-evolution in cybersecurity is challenging because the space of possible scaffold changes is largely unstructured, execution feedback is sparse and often obscured by the environment, and low-diversity updates can cause errors to compound over repeated iterations. \textsc{CyberEvolver} addresses these challenges with a four-layer evolvable agent architecture that decomposes scaffold optimization into structured components, a trace-to-diagnosis mechanism that converts noisy execution logs into actionable revision signals, and a population-based beam search strategy that preserves diverse agent variants during evolution. We evaluate \textsc{CyberEvolver} on CTF challenges, vulnerability exploitation, and penetration-testing tasks using four open-source LLMs. Across these settings, \textsc{CyberEvolver} improves the seed agent's success rate by $13.6$\,\% on average, and outperforms six human-designed cybersecurity agents as well as two self-improvement methods adapted from other domains. These results suggest that scaffold self-evolution is a promising direction for building adaptive LLM agents for security testing.
翻译:基于大语言模型的智能体日益广泛地应用于网络安全任务,但现有系统大多依赖固定的、人工设计的框架,难以适应多样化的目标与故障模式。我们提出CyberEvolver——一个自我进化的网络安全智能体框架,它能够根据失败执行尝试的经验,迭代式地修正自身框架。在网络安全领域实现自我进化极具挑战性,因为可能的框架变化空间基本是非结构化的,执行反馈稀疏且常受环境干扰,而低多样性的更新在多次迭代中可能导致错误累积。CyberEvolver通过以下机制应对这些挑战:一个四层可进化智能体架构,将框架优化分解为结构化组件;一个从跟踪到诊断的机制,可将杂乱的执行日志转化为可操作的修正信号;以及一个基于种群的波束搜索策略,能在进化过程中保留多样化的智能体变体。我们在CTF挑战、漏洞利用及渗透测试任务上,使用四个开源大模型对CyberEvolver进行了评估。在各项设置中,CyberEvolver平均将初始智能体的成功率提升了13.6%,并优于六个人工设计的网络安全智能体及两种从其他领域借鉴的自我改进方法。这些结果表明,框架自我进化是为安全测试构建自适应大语言模型智能体的一个有前景的方向。