A web shell on a vulnerable internet-facing application was the entry point in every one of more than ten AI-agent campaigns Palo Alto Networks Unit 42 investigated from July through September 2026. The operators then used agents to run reconnaissance, harvest credentials and move into other systems. For teams running public web applications, the immediate question is what a compromised app server can reach after that first shell lands.
The pace changed sharply when an agent took over. In a subset of attacks Unit 42 analyzed, the median gap between commands fell from 23.9 seconds during a human-operated phase to 1.4 seconds during an agent-operated phase. The researchers’ November 24 report describes “hundreds of unique commands in just minutes.”
A shell becomes the launch point
The human operator supplied access, usually a web shell on a vulnerable web application, and chose targets and objectives. The agent worked through the local host, assessed what it could use, and returned machine-readable findings for human direction. Unit 42 observed the pattern across government, logistics, hospitality, manufacturing, agriculture and education. In one attack, roughly 800 unique commands ran during 140 minutes of activity spread over two days; another campaign ran more than 8,000 unique commands over 12 days.
One hospitality and gaming case shows why the host’s permissions matter. An agent on an AWS EC2 instance tried to obtain instance-role credentials through the Instance Metadata Service. Its first attempt against IMDSv1 was blocked; it switched to IMDSv2 token acquisition and succeeded after several tries. It then enumerated 20 AWS services across eight regions and exfiltrated information about buckets, email service and secrets management. After finding S3 bucket names in configuration files, it targeted payment and financial data paths. Unit 42 assessed that the human operator directed the financial focus. In that case the agent tested write access and deleted test files; Unit 42 observed no harmful actions there.
The same research describes a different path from a Linux PHP web shell into a Windows IIS server using stolen SMB credentials. Within two minutes of finding the Windows host, the agent began placing ASPX web shells over SMB; over the next 26 minutes, it placed shells in more than 40 locations using five variants and changed web.config to enable script execution. A responder who stops at the first Linux web host misses the Windows foothold.
Repeated commands leave a trail
The agents generated 40–100 distinct Base64-encoded payloads during a single web-shell session in Unit 42’s investigations. The large volume of changing content makes a single payload hash a poor organizing principle for this hunt. Look instead for web-server child processes executing rapid bursts of unique commands, along with structured output, section delimiters such as ===[Title]===, and conversational reasoning comments inside scripts. Unit 42 observed the delimiters in every campaign it analyzed and reasoning comments in more than half. Those strings help correlate a suspicious process chain; scripts written by defenders can have structured output too.
One agent ran a port sweep with scan.sh, then launched scan2.sh 21 seconds later with reconnaissance tailored to the discovered services. The difference between those two files is useful evidence of adaptation. In another sequence, the agent tried precompiled privilege-escalation tools before attempting custom code. One attempted tool targeted CVE-2024-1086, which the CVE Program identifies as a local Linux kernel nf_tables privilege-escalation vulnerability. A downloaded or attempted tool is evidence of intent; investigate process execution and subsequent privilege changes before recording an escalation as successful.
Unit 42 also traced attacker command infrastructure to 204.194.54[.]240, which it says hosted CyberStrikeAI. Search DNS, proxy and network telemetry for that defanged address, then corroborate matches with the web-host process chain. Unit 42 also observed the operator accidentally paste the local path /home/kali/exploitmasteryai/targets/warranty/shell5.php in one campaign; that path can join related command records.
Trace access beyond the web host
Start with the internet-facing application and the process tree around its web worker. Preserve server logs, web-shell artifacts, child-process command history, file writes and outbound connections, then compare their timing with cloud activity and lateral authentication. On EC2 hosts, review the instance role’s actual permissions and CloudTrail activity for the relevant role, especially unusual service and region enumeration and access to buckets or secrets. On Windows, inspect SMB authentication and IIS web-root writes from the compromised host, including new ASPX files and changes to web.config.
Remove the foothold and narrow access
Fix the vulnerable web application that admitted the shell, remove unauthorized shells, rotate credentials exposed on that host, and restrict the instance role and reachable SMB accounts to the access they need. Put web application traffic through a supported protective control while patching; investigate a matching process chain as an intrusion. On EC2, IMDSv2 resisted the first request in Unit 42’s example, yet the agent obtained a token from the compromised instance: metadata-token enforcement alone did not contain a host that already had code execution.
For an affected server, verify the web application fix is installed and retest that the unauthorized web-shell path is gone. Then reconcile the server’s process and file timeline against role activity, SMB logons, and destination web-root changes. If the same stolen credential still works or a second shell persists, the entry fix has left another route open.