AI Agents for Cybersecurity: Defense, Offense and Controls
How AI agents triage alerts, find vulnerabilities and patch code, how attackers now use agents too, and the frameworks for securing them, as of late 2026.
AI agents for cybersecurity are language-model systems that carry out security tasks with some autonomy: triaging alerts, investigating suspicious activity, finding vulnerabilities in code and proposing patches. Defenders now have documented successes, including an agent that found a previously unknown exploitable bug in SQLite and a DARPA competition where autonomous systems analyzed more than 54 million lines of code, finding and patching vulnerabilities [1][2]. Attackers have also adopted agents. In November 2025, Anthropic reported a state-sponsored espionage campaign in which, by its estimate, AI performed 80 to 90% of the work [3].
This article covers where agents help defenders, what the documented offensive use looks like, and how to secure the agents themselves. For security tool basics, see XDR vs EDR vs SIEM and Zero Trust security architecture.
Where agents help defenders
Security operations (SOC) triage
The bulk of SOC work is triage: deciding which of thousands of alerts matter. In March 2025, Microsoft announced six Security Copilot agents of its own and five from partners, previewing from April 2025 [4]. They include a Phishing Triage Agent in Microsoft Defender that separates real threats from false alarms and explains its decisions, and alert triage agents in Microsoft Purview for data loss prevention and insider risk alerts [4]. Microsoft said the agents learn from administrator feedback [4].
The pattern generalizes: an agent gathers context for an alert (user history, related detections, threat intelligence), proposes a verdict with its reasoning, and a human analyst confirms or overrides. It is the security version of the operations agents that investigate production incidents.
Vulnerability discovery
Google Project Zero and Google DeepMind's Big Sleep agent found an exploitable stack buffer underflow in SQLite, reported it in early October 2024, and saw it fixed the same day, before it appeared in an official release [1]. Google described it as what it believes is "the first public example of an AI agent finding a previously unknown exploitable memory-safety issue in widely used real-world software" [1].
Automated patching
DARPA's AI Cyber Challenge (AIxCC) concluded in August 2025, with Team Atlanta's cyber reasoning system winning [2]. In the final round, competitors' systems discovered 54 of the synthetic vulnerabilities across 63 challenges and patched 43 [2]. They also found 18 real, non-synthetic vulnerabilities, which were responsibly disclosed, and four of the seven finalist teams had released their systems as open source at the time of the announcement, with the rest expected to follow [2].
Defensive use | Maturity (late 2026) | Human role |
|---|---|---|
Alert triage and enrichment | Shipping in commercial products [4] | Confirm verdicts, tune feedback |
Phishing analysis | Shipping [4] | Review edge cases |
Vulnerability discovery in code | Documented research results [1][2] | Validate findings, coordinate disclosure |
Patch generation | Competition-proven, early adoption [2] | Code review before merge |
Autonomous response (isolate, block) | Early; best kept tightly scoped | Approve or set strict rules |
The offensive side: agents used by attackers
Anthropic reported that in mid-September 2025 it detected an espionage campaign that it assessed with high confidence was run by a Chinese state-sponsored group [3]. The attackers manipulated Claude Code into attempting intrusions against roughly thirty global targets, including tech companies, financial institutions, chemical manufacturers and government agencies, and succeeded in a small number of cases [3].
Anthropic estimated that AI performed 80 to 90% of the campaign, with human intervention needed at perhaps four to six critical decision points per campaign, and that the AI made thousands of requests, often several per second [3]. It called this what it believes is "the first documented case of a large-scale cyberattack executed without substantial human intervention" [3]. The agent was not flawless: it sometimes hallucinated credentials or claimed to have found secret information that was actually public [3].
Two lessons follow. First, defenders should expect faster, higher-volume intrusion attempts and plan detection accordingly. Second, the same capabilities that help attackers also help defenders, which is the argument for adopting defensive agents with appropriate controls.
Securing the security agents
A security agent usually holds sensitive privileges: it reads alerts, logs and email, and may be able to isolate machines or disable accounts. That makes it a high-value target.
The OWASP Top 10 for Agentic Applications for 2026, published December 2025 with input from more than 100 experts, is a peer-reviewed list of the most critical risks for agentic systems [5]. Our guides to AI agent security and governance and RAG security cover these risks in depth. The ones that matter most for security agents:
- Prompt injection through evidence. A phishing email or log line can contain instructions aimed at the agent analyzing it. Treat all artifacts under investigation as untrusted data, never as instructions.
- Excessive agency. An agent allowed to disable accounts can be tricked into disabling the wrong ones. Require approval for disruptive actions.
- Identity and privilege. Give each agent its own identity with least privilege, as you would under Zero Trust and good IAM practice.
- Auditability. Log every query and action so analysts can reconstruct what the agent did and why.
Anthropic's general agent guidance applies here too: agent autonomy brings higher costs and "the potential for compounding errors," so test extensively in sandboxed environments with guardrails [7].
Fitting agents into your security program
NIST's Cybersecurity Framework 2.0 is NIST's current version and a widely used US reference for organizing a security program [6]. Agents do not change the framework's functions; they change how fast some activities happen. A practical mapping:
CSF 2.0 function | Where agents help | Control to keep |
|---|---|---|
Govern | Summarize policy gaps, draft risk reports | Humans set risk appetite |
Identify | Inventory assets, find vulnerable code | Validate findings |
Protect | Recommend access policy fixes | Approval for policy changes |
Detect | Triage and enrich alerts | Analyst confirms verdicts |
Respond | Draft containment steps, run approved playbooks | Approval for disruptive actions |
Recover | Draft incident timelines and reports | Team owns lessons learned |
For ransomware specifically, faster triage shortens the window between initial access and encryption. See how ransomware attacks work.
Frequently asked questions
Can AI agents replace SOC analysts?
Current products are designed to take on triage volume while analysts confirm verdicts and handle complex cases [4]. Agents also make mistakes, including hallucinated findings, as seen even in offensive use [3]. Most organizations use them to let analysts focus on higher-value investigation.
Have AI agents found real vulnerabilities?
Yes. Google's Big Sleep found an exploitable SQLite bug in 2024 [1], and AIxCC finalists found 18 real vulnerabilities during the competition in addition to the synthetic ones [2].
Are attackers using AI agents?
Anthropic documented a 2025 espionage campaign in which AI performed most of the work across roughly thirty targets [3]. Defenders should assume faster, more automated attacks and plan detection and response accordingly.
What is the OWASP Top 10 for Agentic Applications?
It is a peer-reviewed list of the most critical security risks for autonomous AI systems, published by the OWASP Gen AI Security Project in December 2025 [5]. It is a practical checklist for teams building or buying agents.
How do I start using security agents safely?
Begin with read-only triage and enrichment, require human approval for any action that disrupts users or systems, give the agent its own least-privilege identity, and log everything. Expand autonomy only where accuracy is proven.
Sources
- Google Project Zero. "From Naptime to Big Sleep: Using Large Language Models To Catch Vulnerabilities In Real-World Code." 2024. https://projectzero.google/2024/10/from-naptime-to-big-sleep.html
- DARPA. "AI Cyber Challenge marks pivotal inflection point for cyber defense." August 8, 2025. https://www.darpa.mil/news/2025/aixcc-results
- Anthropic. "Disrupting the first reported AI-orchestrated cyber espionage campaign." November 2025. https://www.anthropic.com/news/disrupting-AI-espionage
- Microsoft. "Microsoft unveils Microsoft Security Copilot agents and new protections for AI." March 24, 2025. https://www.microsoft.com/en-us/security/blog/2025/03/24/microsoft-unveils-microsoft-security-copilot-agents-and-new-protections-for-ai/
- OWASP Gen AI Security Project. "OWASP Top 10 for Agentic Applications for 2026." December 9, 2025. https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/
- NIST. "Cybersecurity Framework." https://www.nist.gov/cyberframework
- Anthropic. "Building effective agents." https://www.anthropic.com/engineering/building-effective-agents