Agentic attacks: how to detect and respond to them
Attackers have started handing whole intrusions to AI agents that plan, run real tools and keep going until they reach a goal. You will not win this by chasing each new tool. The durable move is to catch the behaviour they all share, and to have a response ready for an adversary that works at machine speed.
For most of the last decade an intrusion had a person at the keyboard. They were fast or slow, skilled or not, but they were one operator making one decision at a time. That assumption is now breaking. A class of open-source tooling has appeared that hands the keyboard to an AI agent: you give it a target and a goal, and it plans the steps, runs real attack tools, reads the output, decides what to do next, and carries on without waiting for a human. Some of these frameworks run a team of agents at once, each in its own container.
Security vendors have begun cataloguing them. ThreatDefence maintains an open agentic attack detections repository that tracks eight so far, including ARTEX and its renamed AntiFox fork, Cairn, PentAGI, HexStrike, CyberStrikeAI, Strix, Hermes Agent and Agent Zero, each studied from its source code and the public reporting on its use. The detail of who used which tool against whom sits after my own reliable knowledge of the field, so I will point at that reporting rather than restate it as settled fact. What matters for a defender is the shape of the problem, and that is clear enough to act on.
Chasing the tool is a treadmill
The instinct is to write a detection for each framework: its user agents, its file paths, its command lines. Do that and you sign up for a treadmill, for three reasons.
First, volume. Eight frameworks today, more next quarter, most of them a weekend fork away from the last one. Second, renaming. ARTEX became AntiFox with the same code under a new name, and any indicator tied to the old label went stale the day that happened. Third, and most important, the model is swappable. These frameworks are mostly a planning loop wrapped around whatever large language model you point them at, a Chinese model today, a Western one tomorrow, a local one next week. Fingerprint the model and you catch nothing when it changes.
The thing that does not change is the work. Whatever planner is driving, an intrusion still has to enumerate identities, spray credentials, find a path, reach the data. An agent does that work faster and more repetitively than a person, and that very regularity is what gives it away.
What they all do, and where you see it
Group the tell-tale behaviours by the telemetry you already collect. None of this needs a new sensor. It needs you to look at the logs you have with the agent in mind.
On the endpoint
In network and DNS
oast.*, Burp Collaborator, dnslog.cn. A server resolving those domains has had a payload run on it.In identity and Active Directory
In the cloud
You already have the telemetry
Map the behaviours above to what you run. Endpoint process creation comes from your EDR or Sysmon. The model-API and out-of-band and proxy signals live in DNS logs, netflow and your proxy or firewall. The identity sequence is in your domain controller and sign-in logs. The cloud patterns are in CloudTrail, Azure and M365 audit and Okta system log. The ThreatDefence set ships the same detections as Sigma, Microsoft Sentinel analytics and KQL hunts, Splunk, Elastic, Suricata and Zeek, so whichever stack you run, the behaviour rules convert into it. Start with the model-API hunt and the auto-approve agent hunt. They are the highest signal and the hardest for an attacker to avoid.
Responding to an adversary that does not pause
The hard part of an agentic intrusion is not that it is cleverer than a human one. It is that it is faster and more complete. By the time an analyst opens the ticket, the agent may have tried fifty things, touched a dozen identities and planted two ways back in. Your response has to assume breadth and move quickly, which usually means automating the first containment step rather than waiting for a person to click.
Contain, and assume it moved wide
- Isolate the host and kill the runtime. Many of these frameworks run in a container per engagement, so stopping the process is not enough, remove the container and cut the host's egress.
- Cut the two lifelines. Block egress to the model API and to the proxy pool. An agent that cannot reach its model cannot plan, and an agent that cannot reach its proxies loses its cover. These are also your cleanest pivot points for finding other affected hosts.
- Revoke broadly, not narrowly. Because the agent tested credentials at machine speed, treat every identity and key it could have reached as exposed. Revoke sessions and rotate secrets for the whole blast radius, not only the one account on the alert.
Capture what the agent tells you
An agent leaves a better account of itself than a human intruder does. Its logs, its prompts, its configuration and its tool output record what it was told to achieve and everything it tried. Preserve the container layers, the agent's working directory, /tmp and the web roots before you wipe. That evidence is the fastest way to scope the incident, because the agent has effectively written its own after-action report.
Eradicate and recover
- Close the initial access the agent came through, it will have found and noted it.
- Hunt for the persistence it left, cron jobs, tunnels, new accounts, web shells, agents are methodical about leaving a way back.
- Rotate everything in the blast radius, then confirm the behaviour has stopped in telemetry rather than assuming it.
A sanctioned agent in a Microsoft estate
The fair objection to all of this is that not every agent is hostile. Your own business is about to run plenty of benign ones, so does the same thinking help there? It does, it just runs in reverse. Take a concrete build. A person submits a task through Azure API Management. The call crosses an Azure Firewall into an app subnet, where a Durable Functions app orchestrates the run: it fetches from an approved web search and calls one approved Azure OpenAI deployment, then writes the result as JSON to a storage account for a human to check and for downstream systems to use. The runtime is ephemeral, it exists only for the length of the run.
For an attacker-run agent, a server calling a model API is rare and therefore suspicious. Here it is the normal case, so that signal inverts. You baseline this agent's legitimate behaviour, which is small and fully known, and you alert on anything outside it. Its honest footprint is four actions: take the request, call the one approved model, fetch from the approved search path, write one JSON. Everything else is a deviation worth a look.
What good looks like, and what breaks it
dnslog callback, or calling back to the site that served it, the firewall and DNS logs show a lookup the task has no reason to make. In this design that is your clearest sign of a prompt injection in progress.The risk the envelope does not catch
There are two ways an injection plays out here. The first steers the agent off its task, and the envelope above catches it. The second changes nothing about the agent's behaviour, it only poisons the content of the JSON, so the agent performs its four actions perfectly and hands a human a file with false data in it. The envelope will not see that. The control for it lives at the storage write: validate the JSON against a strict schema, attach provenance so each value can be traced to the page it came from, and treat the human check as a gate that must pass before anything downstream reads the blob, not a courtesy after the fact. The agent is faster and more complete than the reviewer, so a poisoned file can be consumed downstream before the person opens it unless that gate is enforced.
Responding in this estate
- Kill the orchestration and tear down the instance. It is ephemeral already, so terminating the Durable Functions run and its session is cheap and native.
- Block egress at the firewall for that identity, both the model endpoint and the search path. No model, no plan, and no search path to pull more poisoned content through.
- Revoke and rotate the managed identity, then quarantine the blob and anything downstream that read a JSON written in the suspect window. The write time on the blob gives you that window.
- Capture the run's own trace, the prompts, the pages it fetched and the JSON it produced, shipped by diagnostic settings to Log Analytics or Microsoft Sentinel. The agent has again written its own account of what it did.
Validate with simulation
A detection you have not fired is a hypothesis, and a runbook you have not run is a document. The way to trust either is to emulate the behaviours safely and watch what happens. Stand up a benign agent loop that calls a model API from a server, run a scripted credential check at machine speed against a test tenant, resolve an out-of-band domain from a host that should never do it. If your model-API hunt, your machine-speed-credential rule and your isolation playbook all fire and run, you have coverage. If they do not, you found the gap in a drill instead of an incident. In the Azure example above, that is a test page carrying a benign injection, then a check that the firewall alert fires, the orchestration is torn down, and a poisoned value is caught at the storage gate rather than downstream. This is the whole premise of breach and attack simulation, and it is exactly what I build toward with BreachForge: validate the behaviour, not the brand of tool, because the brand will change and the behaviour will not.
Sources and credit
The framework catalogue, the cross-framework behaviour rules and the indicator feed described here are the work of ThreatDefence, published openly as the agentic-attack-detections repository under an MIT licence, and built from each tool's source code and the public reporting the repository cites. The attributions and campaign details in that reporting post-date my own reliable knowledge, so I have kept this article on the durable detection and response concepts and credited the source for the specifics. A match is a lead, not a verdict, and absence of a match is not absence of compromise.