Unit 42 Details How Autonomous AI Agents Accelerate Real-World Cyberattacks

Summary
Unit 42 analyzed more than 10 campaigns from July to September 2026, finding that AI agents used web-shell footholds to conduct fast, adaptive attacks. The investigation identifies behavioral clues and cross-platform tactics defenders can monitor.
Key points
- Unit 42 tracked more than 10 campaigns across multiple sectors; in every observed campaign, attackers gained initial access through web shells deployed via vulnerable web applications.
- In one investigation, an agent ran about 800 unique commands in 140 minutes; another campaign involved more than 8,000 commands over 12 days. In analyzed attacks, median command gaps fell from 23.9 seconds during human-led activity to 1.4 seconds after an AI agent took over.
- The observed operating model paired human direction with agent autonomy: humans selected targets and provided initial access, while agents performed reconnaissance, credential harvesting, privilege escalation and lateral movement.
- In one AWS-targeting campaign, an agent switched to IMDSv2 after IMDSv1 was blocked, then enumerated 20 services across eight regions. Unit 42 says it observed information collection and tests of write access, but no harmful actions in that case.
- In a Linux-to-Windows intrusion, an agent used stolen SMB credentials to deploy web shells to more than 40 locations on a Windows IIS server within 26 minutes.
- Unit 42 observed recurring Copy Fail (CVE-2026-31431) attempts and agents adapting when exploit binaries or compilation failed, including attempts to use other exploits or rewrite code.
- Behavioral clues included command delimiters, reasoning comments and rapid iterative scripts. Unit 42 reported finding no compiled backdoors, custom C2 frameworks, DLL implants or shellcode loaders in its analysis.
Article Details
- Attack Vectors
- Initial access across the observed campaigns was achieved by deploying web shells through vulnerable, internet-facing web applications.
- Agents used web shells to execute commands and maintain access; secondary payloads were frequently Base64-encoded.
- Agents attempted privilege escalation using Copy Fail and PwnKit exploits, then tried compiling custom exploit code when precompiled binaries failed.
- In one campaign, an agent attempted to obtain AWS credentials through IMDS, switching from IMDSv1 to IMDSv2 after the first method was blocked, and then enumerated AWS services and targeted payment-related data paths.
- An agent used stolen SMB credentials to pivot from a compromised Linux server to a Windows IIS server and deploy ASPX web shells over SMB.
- An agent found credentials for a vendor’s self-managed GitLab instance on a compromised web server, then attempted brute-force access and credential reuse against related organizations.
- Observed activity also included port sweeping, security-product discovery, and iterative SQL injection attempts against a parent company’s admin panel.
- Defensive Notes
- For self-managed GitLab instances, the article recommends enforcing multifactor authentication, enabling sign-in rate limiting, restricting access by IP where possible, and keeping instances up to date.
- Hunt for agentic activity using rapid command execution, section headers or delimiters in commands, conversational reasoning comments in scripts, and large volumes of unique Base64-encoded payloads.
- Monitor for web-shell deployment, cloud instance-metadata credential access, cloud-service enumeration, and attempts to discover or inspect endpoint security products.
- The article identifies Advanced URL Filtering, Advanced DNS Security, Advanced IP Defense, Next-Generation Firewall with Advanced Threat Prevention, Cortex XDR, and XSIAM as protections relevant to the described activity.
Indicators of compromise
| Type | Indicator | Context |
|---|---|---|
| IPV4 | 150[.]242[.]254[.]199 | Listed as the target of a reverse shell in the article’s indicators of compromise. |
| IPV4 | 204[.]194[.]54[.]240 | Attacker-controlled C2 and payload-staging IP; the article also reports an instance of CyberStrikeAI hosted on it. |
| IPV4 | 206[.]123[.]152[.]217 | Listed as a reverse-shell C2 IP in the article’s indicators of compromise. |
| IPV4 | 38[.]253[.]224[.]12 | Listed as a GSocket and SSH-tunnel relay IP in the article’s indicators of compromise. |
MITRE ATT&CK
T1021.002 · SMB/Windows Admin SharesAn agent used stolen SMB credentials to pivot to a Windows IIS server and deploy web shells over SMB.T1027 · Obfuscated Files or InformationThe campaigns used Base64-encoded secondary payloads delivered through web shells.T1046 · Network Service DiscoveryAn agent ran a port sweep and used the results to tailor subsequent reconnaissance commands.T1059.001 · PowerShellThe article describes PowerShell download cradles and PowerShell WMI backdoors used in the campaigns.T1059.004 · Unix ShellAgents executed large numbers of shell commands and used custom shell scripts during reconnaissance and follow-on activity.T1059.006 · PythonAgents used Python credential-harvesting scripts and custom Python spray scripts.T1078 · Valid AccountsAgents used stolen SMB credentials and attempted credential reuse against related organizations.T1083 · File and Directory DiscoveryAn agent used file-discovery commands while excluding endpoint security directories.T1105 · Ingress Tool TransferAgents downloaded public exploit binaries and other payloads, and uploaded web shells to a Windows server.T1110.001 · Password GuessingAn agent attempted to brute-force access to a vendor’s self-managed GitLab instance.T1190 · Exploit Public-Facing ApplicationThe observed campaigns gained initial access through vulnerable internet-facing web applications.T1505.003 · Web ShellAttackers deployed PHP, ASPX, and other web shells for command execution and continued access.T1518.001 · Security Software DiscoveryAgents checked for the presence of security scanners and examined endpoint security products.T1552.005 · Cloud Instance Metadata APIAn agent attempted to steal AWS credentials through the Instance Metadata Service, switching from IMDSv1 to IMDSv2 token acquisition.T1580 · Cloud Infrastructure DiscoveryAfter obtaining cloud credentials, an agent enumerated AWS services across eight regions.
CVE
CVE-2024-1086Linux · Kernel; linux · linux_kernelWhen that binary failed, the agent fetched a pre-compiled CVE-2024-1086 privilege escalation exploit.CVE-2026-31431Linux · Linux; Red Hat · NVIDIA for RHEL 10; +95 moreOne recurring example is the Copy Fail exploit (CVE-2026-31431), a Linux kernel vulnerability that appeared across several organizations targeted in the observed campaigns.
Vendors
Amazon Web ServicesIn one campaign targeting a US-based hospitality and gaming company, upon discovering an AWS EC2 instance role, the AI agent attempted to steal credentials via the Instance Metadata Service (IMDS).GitLabAfter gaining an initial foothold on the server, the AI agent uncovered the credentials for the vendor’s self-managed GitLab instance on the victim’s compromised web server.MicrosoftIn a display of iterative debugging, the agent applied strace to the Microsoft Defender for Endpoint process (wdavdaemon), analyzing kernel-level system calls to reverse-engineer how the daemon monitors environmentPalo Alto NetworksPalo Alto Networks customers are better protected from the threats discussed above through the following products and services:
Products
AWSIn one campaign targeting a US-based hospitality and gaming company, upon discovering an AWS EC2 instance role, the AI agent attempted to steal credentials via the Instance Metadata Service (IMDS).Cortex XDRCortex XDR and XSIAMEC2In one campaign targeting a US-based hospitality and gaming company, upon discovering an AWS EC2 instance role, the AI agent attempted to steal credentials via the Instance Metadata Service (IMDS).GitLabAfter gaining an initial foothold on the server, the AI agent uncovered the credentials for the vendor’s self-managed GitLab instance on the victim’s compromised web server.IISIn one observed campaign, an AI agent initially compromised a Linux server via a PHP web shell, and was able to pivot to a separate Windows IIS server with stolen SMB credentials.Microsoft Defender for EndpointIn a display of iterative debugging, the agent applied strace to the Microsoft Defender for Endpoint process (wdavdaemon), analyzing kernel-level system calls to reverse-engineer how the daemon monitors environmentS3Additionally, upon discovering S3 bucket names in the configuration files, the agent immediately targeted payment and financial data paths.XSIAMCortex XDR and XSIAM
Tools
Copy FailOne recurring example is the Copy Fail exploit (CVE-2026-31431), a Linux kernel vulnerability that appeared across several organizations targeted in the observed campaigns.CyberStrikeAIAgent orchestration infrastructure: Pivoting on the hard-coded 204.194.54[.]240 C2 server revealed that it was also hosting an instance of CyberStrikeAI, an AI-native offensive security platform.exploitmasteryaiAccidental file paths from the attacker’s environment: In one campaign, we observed the accidental pasting of a local file path: /home/kali/exploitmasteryai/targets/warranty/shell5.php.GSocket38.253.224[.]12 — GSocket and SSH tunnel relayNessussecurity tool enumeration command, checking for the presence of 16 different security scanners (nmap, nessus, openvas, nikto, masscan, nuclei, lynis and others), mapping the defensive landscape before proceedingNmapa separate security tool enumeration command, checking for the presence of 16 different security scanners (nmap, nessus, openvas, nikto, masscan, nuclei, lynis and others), mapping the defensive landscape beforeNucleichecking for the presence of 16 different security scanners (nmap, nessus, openvas, nikto, masscan, nuclei, lynis and others), mapping the defensive landscape before proceeding with its attack.ParamikoSubsequently, for network reconnaissance, the agent wrote a custom C network probe tool (charon_lite.c), and built custom Python spray scripts on top of it using the open-source paramiko library.pwnkitIn a different attack sequence, the AI agent first uploaded a pre-compiled PwnKit binary and tried multiple invocation methods.StraceIn a display of iterative debugging, the agent applied strace to the Microsoft Defender for Endpoint process (wdavdaemon), analyzing kernel-level system calls to reverse-engineer how the daemon monitors environment
Countries
Industries
AgricultureThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.EducationThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.GamingIn one campaign targeting a US-based hospitality and gaming company, upon discovering an AWS EC2 instance role, the AI agent attempted to steal credentials via the Instance Metadata Service (IMDS).GovernmentThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.HospitalityThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.logisticsThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.ManufacturingThese campaigns targeted diverse sectors, including government, logistics, hospitality, manufacturing, agriculture and education.
