Large Language Modelsfor Cybersecurity

A Survey of Data, Training, Models, Agent Systems, Evaluation, and Applications

Fasheng Miao1,2,*, Yuanda Wang1,3, Zhaoyu Hu1, Jiutian Zeng1, Xiang Li4, Shuying Zhuang5, Yiliang Zhang1, Ziang Weng1, Chengwei Dai1, Junjie Li1, Haokang Zhang1, Ruipeng Jia6, Jiadong Fu7, Yang Ge1, Xiuqi Lu2, Zhenhao Tian2, Yuqi Qiu4, Zuyao Xu4, Lu Sun4, Aichun Huang4, Changqing An2, Xinhui Han3, Chao Zhang2, Longtao Huang1,6, Haixin Duan2, Zheli Liu4, Jilong Wang2,8

1XekRung Team, Alibaba Group2Tsinghua University3Peking University4Nankai University5Zhongguancun Laboratory6Minjur Team, Alibaba Group7Institute of Information Engineering, Chinese Academy of Sciences8Quan Cheng Laboratory

*Discussion and feedback are welcome at mfs24@mails.tsinghua.edu.cn

Overview

One field. Six connected perspectives.

Security capability emerges from data, training, and the systems that turn model outputs into verified action.

Advances in language understanding, code reasoning, and tool use are enabling cybersecurity agents to progress from question answering and single-step analysis to vulnerability research, incident investigation, and multistage task execution. This survey examines research on Large Language Models (LLMs) for cybersecurity across six dimensions: data, training, models, agent systems, evaluation, and applications.

We argue that cybersecurity LLMs are progressing from acquiring domain knowledge to learning how to perform interactive tasks. Task quality and cost depend on both the model and its harness: the model reasons and selects actions, while the harness organizes information, tools, and execution state.

Three contributions

Section 1.4 of the survey

One framework, six dimensions

Connects data, training, models, agent systems, evaluation, and applications through inputs, outputs, updates, validation, and resource use.

Cross‑study comparisons

Examines how domain adaptation depends on the task, how harnesses shape model behavior, and how validation limits operational benefit.

Resources and a research agenda

Organizes security datasets, models, agents, and benchmarks, and sets open questions in agentic training and model–harness optimization.

Jump to a dimension

Sections 3–8 of the survey
Introduction

A shared foundation for attack and defense

The same models, knowledge, and tools support offensive research and defensive operations.

Click to zoom
Figure 1Attack and defense share models, knowledge, tools, and execution feedback.

Offensive applications

Reconnaissance, vulnerability research, exploit chains, and social engineering.

Defensive applications

Threat detection, vulnerability remediation, incident response, and forensics.

Shared feedback

Execution results become new training material and policy feedback.

Context matters

The balance depends on access, resources, validation, and deployment.

Cybersecurity Tasks, Capability Evolution, and Analytical Framework

Understand the task before the score

Shared inputs do not imply shared objectives. Compare tasks, capability building, and evaluation together.

Click to zoom
Figure 3Security objects, representative workflows, and six shared challenges.

Four capability levels

Knowledge understanding → single-step analysis → tool interaction → multistep execution.

Six aspects of expansion

Representations, instructions, tools, verifiable reasoning, multistage execution, and feedback-driven learning.

The task changes the problem

Function judgment, repository localization, and vulnerability reproduction need different evidence and tools.

The harness changes the result

On 33 Cybench tasks, CSI's best single harness solves 15; shared-blackboard coordination solves 19.

Security Data and Interactive Environments

From raw data to verified experience

Build data for the learning objective. Preserve provenance, validate outcomes, and keep training separate from evaluation.

Fig. 7Data pipelineClick to zoom
Figure 7From security sources to validated data, with training–evaluation separation.
≈20Bsecurity tokens in SecCorpus
266,180RedSage multiturn conversations
≈219,700MiST seeds

Filtered domain corpora

SecCorpus combines 4,000+ keywords with a classifier to select security text.

From documents to supervision

Instructions, reasoning traces, and preference pairs turn documents into task supervision.

Environments and trajectories

Fix initial states; record observations, actions, and outcomes; retain validated trajectories.

Validation and separation

Check executable outcomes and split related code, patches, and reports together.

Training and Domain Adaptation

Train for knowledge, judgment, and action

Different objectives build different capabilities. Validated experience connects training stages to later improvements.

Click to zoom
Figure 8Domain adaptation, from continued pretraining to learning from validated experience.
11.7BRedSage CPT tokens after deduplication
5.0% → 17.5%Qwen3-32B pass@1 on Cybench after CTF-Dojo SFT
7,000+task environments in MiMo-V2.6 RL

Domain knowledge

Continued pretraining blends security corpora with general data to build domain knowledge.

Action imitation

Trajectory SFT supervises analyses, tool calls, and answers; tool returns remain context.

Judgment & rewards

Preference optimization and verifiable rewards improve judgments through explicit feedback.

Experience reuse

Agentic RL updates action policies; runtime feedback can also improve the harness.

Large Language Models for Cybersecurity

Domain expertise. General capability.

Specialized and general-purpose models converge through code, reasoning, and interaction. Their value remains task-dependent.

Security-domain models

Domain knowledge → task-aligned capabilities

  1. Adapt domain knowledge

    Security corpora, continued pretraining, and domain instructions build familiarity with terminology, code, and operational records.

  2. Learn task-specific behavior

    Reasoning supervision, preferences, and interaction feedback align predictions and tool decisions with security tasks.

  3. Match inputs and deliverables

    Specialization targets structured intelligence, vulnerability locations, binary representations, logs, and secure code.

General-purpose models

Code, reasoning, and interaction → security transfer

  1. Develop transferable foundations

    Broad language and code training supports program understanding and reasoning across unfamiliar tasks.

  2. Learn through interaction

    Tool use and interactive training support investigation; security tasks can also be included in general post-training.

  3. Handle open-ended investigation

    Cross-file dependencies, conflicting evidence, and multistage decisions draw on reasoning and context processing.

Shared requirements: tools, context, and validation

Both paths depend on access to useful evidence, reliable tool decisions, and validated outputs. Combine specialists for routine screening with general models for complex investigation, then evaluate quality, latency, and human review cost.

Synthesis of Sections 5.1–5.6

Staged domain adaptation

Foundation-Sec separates Base, Instruct, and Reasoning; XekRung connects domain knowledge to tool use.

Verifiable rewards and trajectories

Minerva uses intelligence-task rewards; CTF-Dojo trains on validated interaction trajectories.

Security inside general models

Coding transfer, expert distillation, and interactive training also build security capability in general models.

When does specialization pay?

Test which tasks benefit reliably from specialization under matched execution conditions.

Cybersecurity Agent Systems

From one answer to a chain of decisions

The harness organizes plans, tools, memory, and verification—and decides when to act, recover, or stop.

Click to zoom
Figure 10Runtime mechanisms traced through one alert investigation, from planning to validated outcome.
3execution structures
17 → 19Cybench tasks (of 33) when CSI harnesses share findings
$7,322 → $5,480CSI cost, independent vs. shared blackboard

Plans over explicit state

PentestGPT uses task trees; STAIR represents incidents as Graph-as-State.

Interfaces built for analysis

EnIGMA preserves debugging sessions; IRIS combines model inference with CodeQL analysis.

Coordination through shared state

Sharing CSI findings improves Cybench coverage while reducing cost relative to independent harnesses.

Validation and permissions

Approval gates and independent checks constrain what agents can execute.

Capability Evaluation and Benchmarks

A score is only part of the story

Inputs, permissions, success criteria, and budgets define what a benchmark score actually measures.

Click to zoom
Figure 14What each benchmark gives, asks for, and how the result is checked.
101benchmarks and versions catalogued
28model–harness configurations compared
15 / 17 / 19Cybench tasks: best single harness, union of four, shared blackboard

Paired versions expose shortcuts

Require correct decisions on both vulnerable and repaired versions—not just high single-sample F1.

Clues change completion

BountyBench and ProtoArena show how task scope and supplied clues change completion rates.

Separate model from harness

Keep the model fixed when measuring gains from tools, orchestration, or shared state.

Report cost with success

Report success alongside cost, time, and steps; better coverage need not mean lower cost.

Cybersecurity Applications

Turn findings into accepted outcomes

Practical value depends on validated deliverables, human review, and the work saved across the full response cycle.

Fig. 18Interfaces & loopClick to zoom
Figure 18Five application interfaces connect inputs, validation, and accepted outcomes.

Repair & regression

Check builds, vulnerability regression, functionality, dependencies, and maintainer acceptance.

Alert to response

Correlate users, hosts, and events before moving from an alert to an approved response.

Traceable conclusions

Ground malware and forensic conclusions in behavior, records, and a reliable timeline.

Measure total work

Track useful discoveries, review burden, erroneous responses, and time to deployment.

Discussion and Future Directions

Faster discovery. A different bottleneck.

As discovery accelerates, reproduction, repair, and deployment become critical—and agents join the security boundary.

Click to zoom
Figure 19Discovery removes risk only when validated findings reach remediation.

Measure remediation

Count accepted repairs, deployment time, and exposure duration alongside discoveries.

Agents are part of the boundary

Treat external content as untrusted; apply least privilege and independent verification.

Hand off with the evidence

Escalate uncertainty with original evidence, completed checks, and the consequences of each option.

Open questions & future directions

Adversarial interaction drives intelligence; intelligence advances security.

Five open questions frame the discussion in Section 9, followed by four research directions for turning stronger capability into lasting security benefit.

Five open questions

  1. Q1

    Offense and defense

    How will stronger LLMs change the relative advantages of attackers and defenders?

  2. Q2

    Remediation bottlenecks

    Where will security research bottlenecks move as vulnerability discovery becomes easier?

  3. Q3

    Domain specialization

    How will the value of security-specialized models change as general models improve?

  4. Q4

    Co-optimization

    Will the next capability gains come primarily from models or harnesses?

  5. Q5

    Continual evolution

    Can attack–defense self-play sustain the improvement of security agents?

Future directions

Section 9.8 of the survey

AI‑native security architectures

Build perception, reasoning, decisions, and feedback learning in from the outset; validated experience feeds further learning.

Transferable failure recovery

Diagnose invalid hypotheses, tool faults, and interrupted paths, then choose alternatives while retaining useful findings.

Alternating model–⁠harness updates

Revise the harness from failures, update the model on the resulting interactions, and test whether gains transfer.

From discovery to remediation

Track backlogs, confirmed and resolved issues, review hours, and exposure duration over time.

Citation

Cite this survey

If you find this survey useful for your research, please cite it.

BibTeX
@article{202610.2235,
  doi = {10.20944/preprints202610.2235.v1},
  url = {https://doi.org/10.20944/preprints202610.2235.v1},
  year = {2026},
  month = {October},
  publisher = {Preprints},
  author = {Fasheng Miao and Yuanda Wang and Zhaoyu Hu and Jiutian Zeng and Xiang Li and Shuying Zhuang and Yiliang Zhang and Ziang Weng and Chengwei Dai and Junjie Li and Haokang Zhang and Ruipeng Jia and Jiadong Fu and Yang Ge and Xiuqi Lu and Zhenhao Tian and Yuqi Qiu and Zuyao Xu and Lu Sun and Aichun Huang and Changqing An and Xinhui Han and Chao Zhang and Longtao Huang and Haixin Duan and Zheli Liu and Jilong Wang},
  title = {Large Language Models for Cybersecurity: A Survey of Data, Training, Models, Agent Systems, Evaluation, and Applications},
  journal = {Preprints}
}

Published on Preprints.org · Version 1 · October 2026. DOI: 10.20944/preprints202610.2235.v1

Figure explorer Preview
100% Save SVG