AI agents for red teaming and offensive security: what they're good for
Where an AI agent helps on an authorized red team — recon parsing, ATT&CK-mapped emulation plans, Atomic Red Team and MITRE Caldera in a lab, report drafting — what stays with humans, rules of engagement, logging, client data, and the options as of 2026-11.
· 8 min read
A red team engagement is a long, careful exercise with a lot of text in it: scope documents, recon output, plans mapped to adversary techniques, logs of every action, and a report at the end. That text is where AI agents are most useful today. They read and structure faster than any person, they draft plans and reports well, and with a shell they can drive the open adversary-emulation frameworks in a lab. What they shouldn't do is make the calls that carry risk — what's in scope, what's safe to run on a client's production network, when to stop.
This guide covers what an agent is good for on an authorized engagement, what to keep with humans, how to set it up so the engagement stays inside its rules, and the realistic options (as of 2026-11, checked 2026-11-22). Everything here assumes a signed authorization and rules of engagement. It doesn't cover writing malware, building C2 implants or evading endpoint detection — those aren't things to hand an AI, and they aren't what makes a red team valuable to a client.
What an agent is good at on a red team
Parsing recon. An engagement produces piles of output: nmap XML, service banners, DNS records, directory listings, cloud asset inventories, AD data from authorized collection. An agent turns that into what a lead wants: a table of hosts and services, the exposures worth attention, and the questions to ask next. It also catches what a tired human misses at the end of a day — the one host with an outdated service among two hundred.
Planning adversary emulation against MITRE ATT&CK. Emulation means reproducing a real threat actor's techniques so the client can see whether they'd detect and stop them. MITRE ATT&CK is the shared vocabulary. An agent is good at the planning side: taking a threat profile relevant to the client, mapping its known techniques to ATT&CK IDs, and producing a test plan — which technique, which test, what telemetry the blue team should see, what "detected" looks like. It can also produce an ATT&CK Navigator layer from the plan, so the client sees coverage at a glance.
Running Atomic Red Team tests in a lab. Atomic Red Team is Red Canary's open library of small, documented tests, each mapped to an ATT&CK technique, with prerequisites and cleanup steps. Its PowerShell runner, Invoke-AtomicRedTeam, is easy for an agent to drive:
Invoke-AtomicTest T1059.001 -ShowDetailsBrief # what the tests for a technique do
Invoke-AtomicTest T1059.001 -CheckPrereqs # are the prerequisites present?
Invoke-AtomicTest T1059.001 -TestNumbers 1 # run one test
Invoke-AtomicTest T1059.001 -TestNumbers 1 -Cleanup
Have the agent read the test's YAML first and explain what it will change on the host, then run it in a lab that mirrors the client's environment, and check what the detection stack recorded. That last step — did the SIEM or EDR see it, and with what alert — is where the value for the client is.
Driving MITRE Caldera in a lab. Caldera is MITRE's open adversary-emulation platform: adversary profiles built from abilities mapped to ATT&CK, run as operations against hosts with Caldera's agent installed. It's a bigger tool than Atomic Red Team and has a learning curve; an agent helps by reading the abilities in a profile, explaining what an operation will do before it runs, and summarizing the results afterwards. Caldera's README covers installation; run it in an isolated lab, never on a host you'd mind rebuilding.
Drafting the report. The agent can turn your timeline, findings and evidence into the standard structure: executive summary, attack narrative, findings with ATT&CK mapping and severity, detection gaps, and recommendations. It writes well; you check every claim against the log.
What stays with humans
Some decisions are the engagement. Don't delegate them.
- Scope. Which hosts, ranges, accounts and techniques are authorized comes from the signed rules of engagement, interpreted by the engagement lead. The agent proposes targets; a person confirms they're in scope before any traffic goes out.
- OPSEC and timing. When to be noisy, when to be quiet, when testing hours are, who the client's emergency contact is and when to call them.
- Anything destructive or disruptive. Tests that change production systems, touch availability, alter data, or could lock accounts. These need a named human's decision, every time — and many are excluded by the rules of engagement outright.
- Stopping. If something unexpected happens — a system goes down, you find evidence of a real intrusion, you find data you weren't meant to see — the rules of engagement say what to do. That call is a person's.
- What goes in the report. The agent drafts; the lead signs.
Setting it up for an engagement
Write the rules of engagement where the agent reads them. Project instructions (AGENTS.md, CLAUDE.md or CAVEIRA.md) should carry the authorization, the in-scope and out-of-scope assets, the permitted and forbidden techniques, testing windows, and the stop conditions. Keep a machine-checkable scope file beside it, and make "is this target in scope?" a step the agent can't skip. The bug-bounty guide shows the pattern in detail.
Approvals on. Every command against client infrastructure should go through a human approval. Allow-list read-only tools once you trust them; keep everything that touches a target behind a prompt.
Isolate the agent. Run it in a VM or container with only the engagement folder mounted, so a mistaken command can't reach your own machine, and hostile output from a target can't either.
Log everything. A red team must be able to say exactly what was done, when, from where. Keep the agent's full session transcript, timestamped, alongside your own operator log, and archive both with the engagement. If the client's blue team asks "was that you at 14:02?", you need to be able to answer.
Keep client data out of hosted models unless the contract allows it. Recon output, credentials, hostnames and findings are client data, and many engagement contracts restrict where it may go. Sending it to a hosted model is sending it to a third party. Options, in order of strictness: a local model on your own hardware for anything sensitive; a hosted model only where the contract and the client allow it; and never credentials or secrets in the conversation in either case — reference them by environment variable so the command reads them, not the model.
The options, as of 2026-11
Frontier agents with a red-team access path. Claude Code's Cyber Verification Program has a Red Team Access tier covering authorized pentest, red teaming and exploit development — for organizations only, up to 75 users, with business verification, required data retention and a review that targets about two weeks; Anthropic says enrolled users may still see "some model refusals and classifier blocks." OpenAI's Trusted Access for Cyber offers GPT-Daybreak-Red for PoC, pentest and red-team workflows, approved separately from the defensive tier. Where they win: the strongest models and a written authorization path, which some clients will want to see. The cost: verification, retention, and a hosted model that sees client data. Claude Code compared.
Open-source frameworks and tool layers. PentestGPT (MIT) is an agentic pentest framework published at USENIX Security 2024; HexStrike AI (MIT) is an MCP server that lets an agent drive 150+ security tools. Both are free and only as willing — and as private — as the model behind them. How they compare.
Emulation frameworks. Atomic Red Team and Caldera aren't AI, but they're the right tools for the emulation work above, and an agent that can run them in a lab is more useful than one that writes its own attack code.
Enterprise platforms. Kindo runs Deep Hat (formerly WhiteRabbitNeo), an uncensored cybersecurity model, inside its own agent platform, with on-prem and air-gapped deployment; the vendor claims 300+ enterprises use it for red team ops, and pricing is by demo (deephat.ai, Kindo pricing). XBOW and Pentera are autonomous testing platforms for continuous validation of an estate, also sales-led. These fit an in-house team buying a platform more than a consultant running an engagement.
Open-weight agents. An agent harness on abliterated open-weight models won't refuse offensive work. Run one locally — Codex CLI with --oss, OpenCode or Aider pointed at a local model — and client data never leaves your machine, at the quality your hardware allows (local vs hosted). caveira is the hosted version: a terminal and desktop agent whose backend serves uncensored, abliterated open-weight models, with an approval mode (--confirm), a bash sandbox, an optional Docker box of tools (nmap, sqlmap, ffuf, pwntools, gdb, radare2, a headless Chromium behind mitmproxy), MCP, and full session logs under ~/.caveira/sessions/. It can also send requests to a model server on your own machine (--base-url, localhost only) when the data can't go to a hosted one. Plans are Free, then $20, $50, $100 and $200 a month (as of 2026-11, pricing). It's not frontier on raw model quality, and its terms, like everyone's, rule out testing without authorization.
The 2026 pentest tools comparison has the full table with prices and policies.
Which to choose
- A consultancy with clients who want a named, verified access path: Claude Code with Red Team Access, or Codex with Daybreak-Red, under contracts that allow hosted processing.
- Engagements where client data can't leave your hardware: an open-source agent with a local abliterated model.
- An in-house team that wants a platform: Kindo, XBOW or Pentera, compared on a demo.
- Individual operators who want an agent that doesn't refuse, with the tooling packaged: an open-weight harness like caveira, with local mode for sensitive data.
In every case, the shape is the same: rules of engagement in the instructions, a human on scope and on anything destructive, emulation in a lab before production, and a log that accounts for every action. The agent makes the engagement faster. The people running it make it safe.