Analytics Story: PHP2Shell
Description
This analytic story covers exploitation attempts and post-exploitation activity associated with PHP2Shell (CVE-2026-109618 and CVE-2026-109619). Its detections identify suspicious multipart upload and PHP session upload-progress patterns, large POST requests that receive HTTP 500 responses, PHP memory exhaustion correlated with web requests, and endpoint process activity that may follow successful exploitation.
Why it matters
PHP2Shell is associated with remote code execution vulnerabilities in PHP session upload-progress and multipart request handling. The web detections in this story look for related request patterns: a PHP_SESSION_UPLOAD_PROGRESS field accompanied by a serialized PHP structure in an upload filename, a PHPSESSID field accompanied by a PHP opening tag in an upload filename, and large POST request bodies that receive HTTP 500 responses. Another detection correlates multipart access events with PHP memory exhaustion errors in Apache or Nginx logs.
These web indicators identify suspicious activity for investigation; any one result alone does not confirm successful exploitation. Review the full request headers, filenames, source and destination addresses, URI, response status, and PHP error details. Correlate access and error records by host, client, and PID, and consider request identifiers where the logs provide them.
Endpoint detections add post-exploitation coverage by identifying inline PHP interpreter execution, web or application servers spawning shells, and suspicious child processes spawned from Windows web servers. Review process ancestry, command lines, users, network activity, and timing alongside the web events. Validate the affected PHP version and configuration, including upload-progress and session handling settings, and tune for approved large uploads or development activity.
Detections
Data Sources
| Name | Platform | Sourcetype | Source |
|---|---|---|---|
| Zeek HTTP | Web | zeek:http |
http.log |
| Sysmon for Linux EventID 1 | sysmon:linux |
Syslog:Linux-Sysmon/Operational |
|
| Sysmon EventID 1 | XmlWinEventLog |
XmlWinEventLog:Microsoft-Windows-Sysmon/Operational |
|
| CrowdStrike ProcessRollup2 | Other | crowdstrike:events:sensor |
crowdstrike |
| Windows Event Log Security 4688 | XmlWinEventLog |
XmlWinEventLog:Security |
|
| Nginx Error Log | Web | nginx:plus:error |
/var/log/nginx/error.log |
| Nginx Access | Web | nginx:plus:kv |
/var/log/nginx/access.log |
References
- https://www.php2shell.com/
- https://github.com/php/php-src/commit/3584a98bda0f2c0d367255b046798b0d3a221a19
Source: GitHub | Version: 2