Unit 42 reveals the tempo and traces of autonomous AI agent attacks

This article has been automatically translated.
Loading article...
Merry Christmas & Happy New Year!
Loading article...

This article has been automatically translated.
If a session shows up on your server that fires off dozens of distinct commands within two minutes—first probing system information, then digging through credentials, then attempting privilege escalation, with only a second or two between each command—would you treat it as an ops script or as an intrusion?
Unit 42 (the threat research team under Palo Alto Networks) published an analysis in November 2026 tracking more than a dozen real attack campaigns between July and September 2026. What these attacks share: a human operator first gains a web shell on a web server, then hands off the subsequent reconnaissance, credential theft, privilege escalation, and lateral movement to an autonomous AI agent. The agent is typically a large language model (LLM) with tool-calling capabilities that can plan, execute, observe results, and adjust its next step on its own.
The conclusion favors defenders: these attacks are fast, but they are not stealthy. Unit 42 states plainly that using an AI agent comes at the cost of operational stealth—the agent leaves behavioral traces that human operators rarely produce. Below, we break down these traces and give concrete investigation steps you can put into practice.
A regular chatbot is question-and-answer, but an agent is a loop: observe the environment, reason about the next step, execute an action, then look at the result. No human makes decisions between steps in this loop, so the command sequence is generated in real time based on the target environment.
Unit 42 describes a clear division of labor: the human sets the objective and provides the initial access point; the agent autonomously handles reconnaissance, credential collection, privilege escalation, and lateral movement, then reports findings in a machine-readable format; the human then issues high-level strategic instructions, and the agent continues executing.
This means static signatures targeting payload hashes are largely useless. In a single campaign, the agent may deliver 40 to 100 distinct Base64-encoded payloads, none of which match a known tool signature, and no two victims receive identical payloads.
But the loop's rhythm and output format are stable. This is the core judgment of this article: the content changes, but the behavioral pattern does not.
Unit 42 compared the median command intervals across two phases of the same set of attacks. In the first phase, a human operator performed manual reconnaissance and connectivity testing, with a median interval of 23.9 seconds; in the second phase, after handoff to the AI agent, the median interval dropped to 1.4 seconds.
The contrast is vivid: a human has to read the output, think, then type the next command; the agent fires the next command almost the moment it sees the result.
The volume tells the story too. In one attack, the agent was active for only 140 minutes over two days and executed roughly 800 unique commands, progressing from initial web shell access all the way to enumerating cloud environments, websites, and databases. In another campaign lasting 12 days, the total command count exceeded 8,000.
For defenders, the handoff point is visible from timing data alone—no need to read command content. Once a session's rhythm suddenly compresses from tens of seconds to single-digit seconds, it is worth escalating as an agent takeover.
In every campaign Unit 42 observed, it found the same format: shell commands and scripts containing section headers such as ===[Title]===. The agent uses these delimiters to parse command output faster; human attackers rarely write this way unless they are using pre-written scripts.
Another type of trace is reasoning comments. In more than half of the campaigns, scripts contained conversational, step-by-step comments explaining the logic, reading as if the agent were talking to itself about why it was executing something a certain way.
Both types of traces exist in command lines and script bodies.
One limitation needs to be stated honestly: Unit 42 notes that these behaviors are implemented in too many different ways to constitute a unique fingerprint. So they are hunting leads, not reliable signatures; failing to find them does not mean a host is clean.
These attacks are not technically novel. The agent uses open-source tools and known vulnerabilities that attackers have used for years, such as Copy Fail (CVE-2026-31431), PwnKit, and CVE-2024-1086. What is genuinely different is speed and adaptability.
Unit 42 documented an AWS scenario that is well suited to understanding how the agent works. After discovering an EC2 instance role, the agent first tried to steal credentials through the instance metadata service (IMDS); when IMDSv1 was blocked, it immediately switched to the IMDSv2 token retrieval method and succeeded after multiple iterative attempts. Once it had the identity, it enumerated 20 AWS services across eight regions and exfiltrated information related to storage buckets, email services, and key management.
An analogy: it is like a burglar who finds the front door locked, does not retreat, but instead goes around to the back door and tries a few times; once inside, he opens every room in the building one by one. The difference is that the agent's trial-and-error and enumeration speed is machine-grade.
Exploitation follows the same escalating logic: first upload a precompiled PwnKit binary and try multiple invocation methods; after failure, download a precompiled exploit for CVE-2024-1086; only after both fail does it start writing C source code on the target machine, repeatedly trying different compilers and linkers; if compilation also fails, it rewrites the exploit logic in Python.
For defenders, what is detectable is enumeration fan-out and retry patterns, not the hash of some malicious file.
This is the escalation point Unit 42 particularly emphasizes: the agent does not just evade detection—it actively maps out the defense posture.
A typical example: the agent executed the same find command on six compromised hosts but excluded the directories of three different security vendors. The same agent also ran separate security tool enumeration commands, checking for the presence of 16 scanners, including nmap, nessus, openvas, nikto, masscan, nuclei, lynis, and others.
More aggressive behavior was also recorded: the agent tried to enumerate and exfiltrate the local directories of endpoint security products, looking for sensitive configuration and stored credentials; in another instance, it used wdavdaemon on the Microsoft Defender for Endpoint process strace to analyze kernel-level system calls, attempting to reverse-engineer how the daemon monitors activity in the environment.
Legitimate management scripts rarely enumerate competing security products, so file discovery commands that exclude security directories and one-shot probes of multiple scanners are both high-value alerts.
Unit 42 acknowledges that during the research period it found no behavioral markers linking the activity to a specific LLM model or orchestration framework. Since AI-generated code is customized for each target, signature-based attribution is largely ineffective.
Attribution clues come from what the human operators and infrastructure left behind:
Unit 42 also published several IOCs, including reverse shell targets, C2 and payload staging IPs, and a web shell download address on pastebin, which can be used to supplement blocklists.
The following steps are organized based on the traces Unit 42 documented; they are hunting hypotheses, not validated production rules.
These clues come with an obvious cost: false positives. Unit 42 itself acknowledges that no single behavioral fingerprint can reliably identify an agent.
So before you deploy any blocking rule, it's advisable to run it in monitor-only mode first and observe how often it fires on normal activity. If a rule mainly hits legitimate automation, tune it to require multiple conditions to be met at once rather than triggering on any single trace.
One more thing to note about the source's position: this is a vendor report, and the end of the document recommends Palo Alto Networks' own products, such as Cortex XDR, XSIAM, and Idira. The GitLab hardening recommendations in the report (enforce multi-factor authentication, rate-limit logins, restrict access by IP, and keep instances updated) are generic and worth adopting.
Finally, an important observation from Unit 42: among the hundreds of script payloads extracted, none contained a compiled backdoor, a custom C2 framework, a DLL implant, or a shellcode loader. The agent's entire arsenal consists of one-off scripts like PHP web shells, PowerShell WMI backdoors, and Python credential collectors. This is both why it is flexible and why it is noisy—and that noise is exactly the defender's opportunity.