How to Detect AI Agent Attacks: The 1.4-Second Tell

By 6 min read
How to detect AI agent attacks: command timing, noise and log signals from Unit 42 and the UK NCSC

A human intruder pauses for about 24 seconds between commands. An AI agent pauses for about one and a half. That gap, measured by Palo Alto Networks’ Unit 42 across real intrusions, is one of the clearest signals defenders now have.

The short answer to how to detect AI agent attacks: watch for machine-speed activity that still behaves like exploration, with dense command bursts, sprays of endpoints and parameters, rapid retries and high error rates. Two publications from 24 November 2026, one from Unit 42 and one from the UK NCSC, describe these signals in detail. This article puts them side by side.

What did Unit 42 find?

Unit 42 tracked more than 10 campaigns between July and September 2026 in which AI agents drove intrusions. The report, by Noa Dekel and Tom Fakterman, covers victims in government, logistics, hospitality, manufacturing, agriculture and education.

In every campaign the first foothold was a web shell deployed through a vulnerable web application. Unit 42 does not name the vulnerable software. After that, a human typically did some manual reconnaissance, then handed control to an agent.

Four-stage flow from web shell to manual recon to agent handoff to agent expansion
Unit 42 saw the same pattern in every campaign: a web shell first, then a human, then an agent. Data: Unit 42.
Measurement (Unit 42) Value
Campaigns tracked More than 10, July to September 2026
Median gap between commands, human phase 23.9 seconds
Median gap between commands, agent phase 1.4 seconds
One attack: agent active time 140 minutes across two days
One attack: unique commands About 800
One campaign: unique commands over 12 days More than 8,000
Web shells pushed after finding an IIS server More than 40 locations in 26 minutes

The timing figures come from a subset of the intrusions, not all of them. Treat 1.4 seconds as a median from Unit 42’s data, not a universal threshold.

Bar chart comparing the 23.9 second human command gap with the 1.4 second agent gap
Once an agent took over, the median pause between commands fell from 23.9 to 1.4 seconds. Data: Unit 42.

What did the agents actually do?

They did what a thorough human would do, much faster. Unit 42 describes cloud reconnaissance across 20 AWS services in eight regions, lateral movement with stolen SMB credentials, attempts on a vendor’s self-managed GitLab, and probing of more than a dozen sister companies.

The agents were also security-aware. They checked for 16 security scanners, excluded EDR paths from file searches and inspected Microsoft Defender for Endpoint processes. One command server also hosted CyberStrikeAI, the platform covered in our piece on the CyberStrikeAI shutdown and its forks.

How do you detect AI agent attacks?

You detect the pattern of work, not a tool signature. Unit 42 and the NCSC agree on the core signals, and each adds some of its own.

Signal Where it shows up Source
Very short, regular gaps between commands EDR, shell history, process telemetry Unit 42
Bursts of requests followed by short thinking pauses Web and API logs NCSC
Many endpoints and parameters, including garbage variants WAF and API gateway logs NCSC
Rapid failures and rapid retries, high error rates API and auth logs NCSC
Section delimiters and chain-of-thought comments inside scripts Dropped files, command lines Unit 42
Mixed Python, PHP and Bash under one process chain Process trees Unit 42
Dozens of unique Base64 payloads in one session Command lines Unit 42

The script artefacts are worth highlighting. Unit 42 says section delimiters appeared in every campaign it saw, and reasoning-style comments in more than half. Humans rarely annotate throwaway attack scripts. Agents often do.

What does the NCSC add?

The NCSC’s blog post says it has seen a marked rise in AI-assisted attacks since September 2026, using what it calls agentic offensive frameworks. It names ARTEX as the framework most associated with the activity, and lists Cairn, PentAGI, RedAmon, Xalgorix and Darkmoon as others that come and go. For background, see our explainers on why ARTEX became so popular and the Cairn zero-day case.

Its most useful point is blunt: none of the weaknesses are new. The NCSC lists credentials committed to code repositories, infrastructure-as-code misconfigurations, default or missing authentication, and API flaws. What changed is speed, persistence and cost, with agents able to go from discovery to exploitation in minutes.

The catch: speed alone is not proof

Fast commands are a lead, not a verdict. Backup jobs, deployment pipelines and legitimate scanners also run quickly. The signal gets strong when speed combines with exploration: new commands, failed attempts, retries and recon that no scheduled job would perform.

Attribution is weaker still. Unit 42 says it found no behavioural markers that tie activity to a specific model or framework, so do not expect your SIEM to say “this was ARTEX”. Both sources also note these agents are noisy today. The NCSC warns future frameworks may trade some speed for stealth, which would erode the timing signal.

And the agents failed often. Unit 42 reports pre-built exploits that did not work, compilation that failed, and five privilege escalation techniques tried in sequence on one host. That persistence is itself a tell.

What should defenders do?

Start with exposure, then detection, then friction.

  1. Find what is exposed. Inventory internet-facing assets, including forgotten legacy sites. The NCSC lists this first.
  2. Take admin services off the internet. Use an identity-aware proxy with phishing-resistant authentication, VPN-only access or mutual TLS.
  3. Patch internet-facing web apps fast. Every Unit 42 campaign started with a web shell on a vulnerable web application.
  4. Alert on command cadence. Build a detection for bursts of distinct commands with sub-few-second gaps from web server processes or web shell children.
  5. Rate-limit by identity, not IP. The NCSC says IP blocking is often ineffective because agents rotate proxies. Key limits to accounts, tokens and sessions, and throttle sign-ups.
  6. Say less in error messages. Agents read every error, so external errors should reveal as little as possible.
  7. Add deception. Honeytokens give high-confidence alerts, and tarpits burn an agent’s attempt budget. Our guide to AI agent honeypots covers where to start.
  8. Hunt with the published indicators. Unit 42 published IP addresses and URLs from these campaigns; load them from the original report.

The bottom line

AI agents do not bring new vulnerabilities; they bring old ones at machine speed. The clearest tell today is tempo: Unit 42 measured a drop from 23.9 to 1.4 seconds between commands when an agent took over. Detect that pattern, close the familiar gaps, and assume the next generation of agents will be quieter.

Sources

This article is written for defenders and authorised security testers. Only test systems you own or have written permission to assess.

Frequently asked questions

How can you tell if an AI agent is attacking you?

Look for machine-speed, high-volume activity that still looks exploratory: very short gaps between shell commands, bursts of requests followed by brief pauses, many endpoints and parameters tried including nonsense variants, rapid retries after failures and unusually high error rates. Unit 42 and the UK NCSC both describe these patterns in their November 2026 publications.

How fast do AI agents run commands during an intrusion?

In a subset of intrusions Unit 42 studied, the median interval between commands was 23.9 seconds during the human-operated phase and 1.4 seconds after an agent took control. In one attack the agent ran about 800 unique commands while active for only 140 minutes across two days.

Can defenders identify which AI model or framework was used?

Not reliably from behaviour. Unit 42 says it found no behavioural markers linking the activity to specific language models or orchestration frameworks. Infrastructure can still give clues: one Unit 42 command server also hosted the CyberStrikeAI platform.

Does blocking IP addresses stop AI agent attacks?

The UK NCSC says IP blocking is often ineffective because agents rotate through proxies and VPNs. It recommends rate limits keyed to accounts, API tokens and authenticated sessions, plus throttled account creation and deception such as honeytokens and tarpits.

Are AI agent attacks using new vulnerabilities?

Mostly not. The NCSC says the weaknesses being exploited are not new: exposed credentials in code, infrastructure-as-code mistakes, default or missing authentication and API flaws. Unit 42 also saw known public exploits used for privilege escalation. What changed is the speed and persistence of the attempts.

Keep reading

detect AI agent attacksUnit 42UK NCSCthreat detectionagentic offensive frameworksoffensive AI