PHP2Shell, one month on: 23,357 servers attacked, 74 breached, and the test systems that leaked production secrets
PHP2Shell (CVE-2026-109618) has been patched since 21 October 2026, and most reporting since has been about single shells and proof-of-concept kits. On 19 November we collected an open folder from 194.165.16[.]21 that shows the next stage: the public exploit turned into a production line. Its logs record 31,014 exploit rounds against 23,357 servers and 74 servers opened, and its ledger rates most of what came back as worthless. This post walks the line from target list to sorted loot, and what the ledger says about who is really exposed.
In brief
- The exploit is the public
3em0/php2shellproof of concept, modified for live targets within a day of the patch and first successful on 23 October at 18:08 UTC. - A private scan fleet and a search-engine export fed it. 326,877 candidates were probed in 111 runs; the last run started minutes before we collected the folder.
- Offsets for 60 PHP builds were read out of the official Docker images, so the line is tuned for containers built from them.
- 23,357 servers attacked, 252 leaked memory addresses, 74 gave a shell: about one in 316.
- Each attempt uploads a single form field of 129 MB, and every command the exploit runs must fit in 14 bytes, so web shells are written five characters at a time.
- The operator's notes file most of the haul as test servers, a training lab, demos and sandboxes:
no value (demo node),revenue 0. - The real damage came from test systems holding real things: a QA password that also worked in production, signing certificates, live API keys and a client database.
The bench
The server's home directory was served as an open listing: 24,550 files, 22 GB. The PHP2Shell work sits in p2s-e2e (exploit, drivers, state) and p2s-loot (what came back), beside older projects that share the same scanning back end. Three things describe the person at the bench.
- Language. Code comments, run notes and the credential registry are in Russian. The PHP scanner carries a hard-coded list of four large Russian networks and exits with a message calling them
taboo
. - Working method. The deployment note for the operator's port scanner is titled as an instruction for a chat and continues:
Context for the model: you are the deployment operator.
A hand-off bundle,p2s_handoff.tgz, packs the exploit and its patches for the next session. - Motive. Targets are ranked by keyword scores for payment, banking, betting, shops and billing, a dedicated
money lane
retries the best 241 around the clock, and closing notes record revenue.
We have covered the probes that preceded the patch, the first confirmed shells and two operators' exploit labs. This folder is what comes after the lab.
Step 1: a target list that refills itself
The operator runs its own internet scanner, which writes every banner into a ClickHouse database. A watcher script asks that database every 30 minutes for hosts newly seen with an Apache banner, and sends each one a small multipart upload:
POST / HTTP/1.1
Content-Type: multipart/form-data; boundary=SCANBOUND99ac
User-Agent: Mozilla/5.0
name="PHP_SESSION_UPLOAD_PROGRESS" value: scancheck
name="f"; filename="test.txt" value: X
A PHPSESSID cookie in the answer means PHP started a session for an upload nobody asked for: the entry point of the bug. Over 111 runs the watcher probed 326,877 candidates and 13,242 answered that way. A second pool came from an internet search engine export: 78,954 servers with a PHP version in the banner, 66,954 of them in the vulnerable range.
The second test decides who is worth an exploit round. The public chain needs PHP to print its own errors, so the classifier posts 1,100 form variables (x0=1 to x1099=1), one hundred more than PHP's default limit, and looks for the warning Input variables exceeded in the page. On 2 November that sweep covered 29,856 servers and marked 5,954 as ON. A server that prints its errors to strangers is usually one somebody is still building.
Step 2: one offset file per PHP build
The final stage of the chain calls a function inside libphp.so, so it needs two addresses that differ in every PHP build. The pipeline does not guess them. When triage meets a version it has no file for, it pulls php:<version>-apache from a registry mirror, starts the container, reads the two symbol offsets out of the library and writes off<version>.env. The folder holds 60 of these files, almost all for 8.3, 8.4 and 8.5 builds.
That detail defines the exposed population. The offsets are only right for the official Docker images, which run Apache with mod_php in prefork mode, the layout the public exploit was written for. The ledger agrees. Of the 74 servers opened, 28 listened on port 8080 and 7 on port 8000, the ports a developer publishes a container on. In a list of 47 freshly opened servers dated 2 November, 43 sat at six VPS and cloud providers, and five of those six are presets in the operator's scanner.
Step 3: the round
A driver script takes a list of address, port and PHP version and runs the modified exploit, exploit_ka.py, with a 50-minute limit per attempt. The public version assumes an 8 MB memory limit. The operator's version adds keep-alive connections, repeated worker rotation and a --huge-mb setting, the size of the form field named big that pushes PHP over its memory limit. The drivers try 129 MB first, then 257 and 513: one megabyte above the common limits of 128, 256 and 512. Of 266 entries in the breach ledger, 261 landed at 129.
Most rounds end at the first stage: the logs hold 64,423 lines reading heap leak missed and 27,147 rounds closed as MISS. When the leak works, the two addresses are saved per server and later waves reuse them.
The exploit can only run commands of 14 bytes or less, because the command sits inside a 167-byte string in a forged structure. Everything the operator does on a server is therefore a file of very short lines. The success test is three of them:
mkdir q;x=OK
echo T0K3N>q/A
wc -c<q/A;x=OK
If a response body is exactly 6, the driver writes ***BREACH*** to its log and a line to breaches.tsv.
Step 4: shell, loot, registry
The web shell arrives the same way, five base64 characters per command:
echo PD9wa>Z0
echo HAgc3>Z1
...
cat Z*>w
base64 -d w>z
mv z s.php
Decoded, it is one line that passes the 0 parameter to system(), and the driver requests s.php?0=id to confirm it. A loot pack runs in the same session: env, then cat of .env, wp-config.php, config/database.php, app/etc/env.php and sites/default/settings.php in the current and parent directories. A planted z.php posts the same kind of file to a listener on the operator's server.
Every response is saved to disk. A harvester merges them into one dump per server and pulls out every line that mentions a password, secret, API key, token or private key: 3,461 lines when we collected it. A triage script profiles each new shell (reverse DNS, page title, e-mail addresses, phone numbers), and a 469-line credential registry carries a verdict per server.
What 74 shells were worth
The registry is candid. These are the operator's own classifications, translated where they were in Russian:
| What the server was | What was taken | The operator's verdict |
|---|---|---|
| Two game-server test stacks with their admin panels | Player databases, a validated panel login | 20 acc / 60 players / 0 online, test fleet |
| A security training lab with planted flags | All nine flags, then 18 more lab machines mapped on its private network | CTF, low priority |
| A public speed-test node | Nothing | no value (demo node) |
| A database admin console | Access to the database behind it, 175 password hashes | revenue 0 |
| A payment dashboard under development, East Africa | Full database, five API keys | transactions/users: 0 (demo), revenue: n/a |
| An e-invoicing test environment, South America | Database, API tokens, company signing certificates valid into 2027 | value: LOW (dev sandbox, all env=test) |
| A small firm's brochure site, Central Europe | Nothing | static site no-db, and a note that traces of another group's campaign were already on it |
This is what the filters in steps 1 and 2 select for. Errors printed to the page and an official image on a published port describe a demo, a lab, a staging copy or a side project far more often than a production system. The operator scored targets for money and the exploit delivered sandboxes.
Where the damage was real
Four entries in the same registry are not sandboxes, or did not stay inside one.
- QA into production. The QA interface of a monitoring product gave up its whole database in the first days of November. On 4 November the registry records a login marked
VALID
on the production interface, with an administrator token, and gives the source as a password hash cracked from the QA dump. - A billing application. All three user accounts and the client records of 25 companies, taken through the exploit channel with a PHP dump script on 6 November.
- A research database. A 9.76 MB full dump of a food-safety research system marked as production.
- A community app in production. Marked
FULL COMPROMISE
on 30 October, with the database copied out. The registry later notes it as closed.
The largest theft in the folder did not need the exploit at all. A city council in Southeast Asia had a web directory open to listing, with configuration files in it, and a staff account on its licensing portal still had the password the helpdesk issued in 2021. The registry notes that the operator changed that password on 28 October. A crawler then walked 2,532 result pages into a file of about 250,000 licence applications with names, identity numbers and addresses.
Timeline
| Time (UTC) | What the files show |
|---|---|
| 21 Oct 14:00 | PHP's security release fixes CVE-2026-1096181. |
| 22 Oct 10:00 to 11:32 | Modification times in the hand-off bundle: the live-target exploit, its keep-alive version and the error-display sweep. |
| 23 Oct 18:08 | First entry in the breach ledger: a game test server on PHP 8.3.32. |
| 24 Oct 21:37 | First logged run of the candidate watcher: 110,753 Apache hosts from the scan fleet, 4,789 answer with a session cookie. |
| 29 Oct | 36 parallel lanes launched over the target pools, with a watcher that logs each new breach. |
| 2 Nov | The error-display sweep of the search engine pool runs. 38 servers are opened for the first time in one day. |
| 4 Nov 12:16 | Last entry in the breach ledger. |
| 19 Nov 12:11 | Last logged run of the candidate watcher, 407 new hosts probed, minutes before we collected the folder. |
The same address on our decoys
On 19 November between 12:16 and 16:27 UTC, 194.165.16[.]21 sent a single request to port 443 of several huntback decoys: GET / with the user agent Mozilla/5.0 (Windows NT 10.0; Win64; x64), Accept: text/html,*/* and Connection: close. That is, header for header, the request built by ahsay_scan.py in the same folder, a scanner that looks for AhsayCBS backup consoles, a product we have written about before. PHP2Shell was one project on a server that was already scanning for the next.
What to check
- Rebuild PHP containers. The fix is in PHP 8.3.36, 8.4.27 and 8.5.12. An image built from
php:8.x-apachebefore the release keeps the old library until it is rebuilt, and the pipeline holds ready-made offsets for 60 of those builds. - Turn error display off.
display_errors = Offremoves a server from this operator's target pool, andsession.upload_progress.enabled = Offremoves the entry point. Do both on anything reachable from the internet, including demos. - Treat test systems as production for secrets. No password shared with production, no live API keys, no real signing certificates, no copy of the customer table.
- Look in the web root. Files named
s.php,.var.php,.v2.php,z.php,d.php,u.php,sx.php,sphx.php,d0.phporimages/.i.php; a directoryqholding single-letter files; files namedw,z,i.txtorZ0toZ6. - Read the web logs. A POST to
/with 1,100 variables namedx0tox1099; a multipart POST with the boundarySCANBOUND99ac; chunked multipart POSTs of 129 MB or more; any request for a.phpfile with?0=or?c=followed by a shell command. - If you find any of it, rotate. The loot pack reads every environment variable and configuration file the web user can reach: change database passwords, application keys and API tokens.
Indicators
| Indicator | Role | Confidence |
|---|---|---|
194.165.16[.]21 | Source of the exploit rounds, home of the scan database and the loot folders; also the Ahsay scan of 19 Nov 2026 | High |
http://194.165.16[.]21:18888/gloot | Where the planted z.php posts configuration files | High |
194.165.16[.]21 ports 34443 and 8999 | HTTP PUT receiver for stolen files; request-logging listener | High for the scripts |
Multipart boundary SCANBOUND99ac with field PHP_SESSION_UPLOAD_PROGRESS = scancheck | The operator's upload-progress probe | High |
POST body x0=1&x1=1 through x1099=1, user agent Mozilla/5.0 | The error-display classifier | Pattern |
Chunked multipart POST with a field named big of 129, 257 or 513 MB | The memory-exhaustion request of exploit_ka.py | Pattern |
T0K3N written to q/A; response body 6 | The success marker | High |
206.245.153[.]56 | Named in the registry as part of another group's campaign found on one of the opened servers | Context only |
References
- CVE Program, CVE-2026-109618 and CVE-2026-109619: PHP session upload-progress memory corruption (PHP2Shell), fixed in PHP 8.3.36, 8.4.27 and 8.5.12.