Web/PHP process spawning a child from a non-standard path (XSS2Shell hunting) - BROAD
SIGMA detection rule by Adama ASSIONGBON (SOC & CTI Consultant), https://linkedin.com/in/adama-assiongbon-9029893a · Unknown
Detects a web server or PHP runtime process, on Linux or Windows/IIS, spawning a child process whose executable does not reside under a standard system or program directory. This is a behavioral companion to webserver_shell_spawn_post_xss2shell_cve_2026_64638_strict.yml, which relies on a closed list of known shell/tool filenames and known suspicious drop paths. An attacker who renames their implant and places it in a writable directory absent from that list (a custom cache directory outside wp-content, the site docroot itself, or any other web-writable location) evades the STRICT rule entirely while still producing a process_creation event this rule catches, because it does not depend on filename or drop-path knowledge at all: any child of a web/PHP process living outside standard system paths is anomalous by construction, legitimate web server operation never exec()s/launches a standalone binary from an arbitrary location. This rule merges what were previously two OS-specific BROAD rules (Linux and Windows/IIS) into a single cross-platform process_creation rule, since the underlying anomaly and its FP surface (legitimate helper binaries shipped outside standard directories) are the same shape regardless of hosting platform. This is a BROAD hunting rule, not a zero-FP confirmation signal: legitimate applications occasionally ship helper binaries outside standard system paths (composer vendor/bin, bundled tools under /opt/, language runtime managers, third-party PHP extensions bundling a Windows binary), so filter_optional_known_application_paths requires environment-specific tuning before this rule is relied upon for direct escalation. SOC L1 should verify the source, affected host, user, process or request fields, timing, and related activity.
Détecte un processus serveur web ou runtime PHP, sous Linux ou Windows/IIS, qui lance un processus enfant dont l'exécutable ne réside pas sous un répertoire système ou programme standard. C'est un complément comportemental à webserver_shell_spawn_post_xss2shell_cve_2026_64638_strict.yml, qui repose sur une liste fermée de noms de shells/outils connus et de chemins de dépôt suspects connus. Un attaquant qui renomme son implant et le place dans un répertoire inscriptible absent de cette liste (un répertoire cache personnalisé hors de wp-content, la racine du site elle-même, ou tout autre emplacement inscriptible par le serveur web) échappe entièrement à la règle STRICT tout en produisant un événement process_creation que cette règle capture, car elle ne dépend ni du nom de fichier ni de la connaissance du chemin de dépôt : tout enfant d'un processus web/PHP situé hors des chemins système standards est anormal par construction. Cette règle fusionne deux anciennes règles BROAD spécifiques à un OS (Linux et Windows/IIS) en une seule règle process_creation cross-plateforme, sur demande explicite de l'utilisateur visant à réduire le nombre de règles du pack de 6 à 4 : l'anomalie sous-jacente et sa surface de FP (binaires auxiliaires légitimes livrés hors des répertoires standards) ont la même forme quelle que soit la plateforme d'hébergement. Ceci est une règle BROAD de hunting, pas un signal de confirmation à FP quasi nul : des applications légitimes embarquent parfois des binaires auxiliaires hors des chemins systèmes standards (vendor/bin de composer, outils embarqués sous /opt/, gestionnaires de runtime de langage, extensions PHP tierces embarquant un binaire Windows), donc filter_optional_known_application_paths nécessite un tuning spécifique à l'environnement avant de s'appuyer sur cette règle pour une escalade directe. Le SOC L1 doit vérifier la source, l’hôte affecté, l’utilisateur, les champs de processus ou de requête, la chronologie et les activités associées.
title: Web/PHP process spawning a child from a non-standard path (XSS2Shell hunting) - BROAD
id: 4fc16c50-0ed6-42df-be58-7dd73bedcece
status: experimental
description: |
Detects a web server or PHP runtime process, on Linux or Windows/IIS, spawning a child process whose executable does not reside under a standard system or program directory. This is a behavioral companion to webserver_shell_spawn_post_xss2shell_cve_2026_64638_strict.yml, which relies on a closed list of known shell/tool filenames and known suspicious drop paths. An attacker who renames their implant and places it in a writable directory absent from that list (a custom cache directory outside wp-content, the site docroot itself, or any other web-writable location) evades the STRICT rule entirely while still producing a process_creation event this rule catches, because it does not depend on filename or drop-path knowledge at all: any child of a web/PHP process living outside standard system paths is anomalous by construction, legitimate web server operation never exec()s/launches a standalone binary from an arbitrary location. This rule merges what were previously two OS-specific BROAD rules (Linux and Windows/IIS) into a single cross-platform process_creation rule, since the underlying anomaly and its FP surface (legitimate helper binaries shipped outside standard directories) are the same shape regardless of hosting platform. This is a BROAD hunting rule, not a zero-FP confirmation signal: legitimate applications occasionally ship helper binaries outside standard system paths (composer vendor/bin, bundled tools under /opt/, language runtime managers, third-party PHP extensions bundling a Windows binary), so filter_optional_known_application_paths requires environment-specific tuning before this rule is relied upon for direct escalation. SOC L1 should verify the source, affected host, user, process or request fields, timing, and related activity.
Détecte un processus serveur web ou runtime PHP, sous Linux ou Windows/IIS, qui lance un processus enfant dont l'exécutable ne réside pas sous un répertoire système ou programme standard. C'est un complément comportemental à webserver_shell_spawn_post_xss2shell_cve_2026_64638_strict.yml, qui repose sur une liste fermée de noms de shells/outils connus et de chemins de dépôt suspects connus. Un attaquant qui renomme son implant et le place dans un répertoire inscriptible absent de cette liste (un répertoire cache personnalisé hors de wp-content, la racine du site elle-même, ou tout autre emplacement inscriptible par le serveur web) échappe entièrement à la règle STRICT tout en produisant un événement process_creation que cette règle capture, car elle ne dépend ni du nom de fichier ni de la connaissance du chemin de dépôt : tout enfant d'un processus web/PHP situé hors des chemins système standards est anormal par construction. Cette règle fusionne deux anciennes règles BROAD spécifiques à un OS (Linux et Windows/IIS) en une seule règle process_creation cross-plateforme, sur demande explicite de l'utilisateur visant à réduire le nombre de règles du pack de 6 à 4 : l'anomalie sous-jacente et sa surface de FP (binaires auxiliaires légitimes livrés hors des répertoires standards) ont la même forme quelle que soit la plateforme d'hébergement. Ceci est une règle BROAD de hunting, pas un signal de confirmation à FP quasi nul : des applications légitimes embarquent parfois des binaires auxiliaires hors des chemins systèmes standards (vendor/bin de composer, outils embarqués sous /opt/, gestionnaires de runtime de langage, extensions PHP tierces embarquant un binaire Windows), donc filter_optional_known_application_paths nécessite un tuning spécifique à l'environnement avant de s'appuyer sur cette règle pour une escalade directe. Le SOC L1 doit vérifier la source, l’hôte affecté, l’utilisateur, les champs de processus ou de requête, la chronologie et les activités associées.
related:
- id: 9f2ae8e2-13cc-408c-ae91-8c26fd5f13f5
type: derived
- id: 6651aeef-a7f9-4aed-95bb-370fbe7da24d
type: derived
- id: 1cb448aa-2092-4d01-9509-5f723226e3a9
type: derived
references:
- https://www.cve.org/CVERecord?id=CVE-2026-64638
- https://nvd.nist.gov/vuln/detail/CVE-2026-64638
- https://wordpress.org/news/2026/08/wordpress-7-0-3-release/
- https://hadrian.io/blog/wordpress-xss2shell-unauthenticated-login-screen-xss-to-php-code-execution-cve-2026-64638
- https://pwn.ai/blog/xss2shell
author: Adama ASSIONGBON (SOC & CTI Consultant), https://linkedin.com/in/adama-assiongbon-9029893a
date: 2026-08-13
modified: 2026-08-14
tags:
- attack.execution
- attack.t1059.004
- attack.t1059.003
- cve.2026-64638
logsource:
category: process_creation
definition: >
Process creation telemetry from Linux (auditd, Sysmon for Linux, EDR) or Windows (Sysmon
Event ID 1, Security 4688, EDR) with command line capture. Required fields: Image,
ParentImage, ParentCommandLine.
detection:
# Web server / PHP binary as direct parent - combined Linux and Windows/IIS process names.
selection_web_parent:
ParentImage|endswith:
- '/apache2'
- '/apache2-prefork'
- '/apache2-worker'
- '/httpd'
- '/httpd.worker'
- '/httpd.event'
- '/nginx'
- '/php'
- '/php-cgi'
- '/lsphp'
- '\w3wp.exe'
- '\php-cgi.exe'
- '\php.exe'
- '\httpd.exe'
- '\nginx.exe'
# Linux-specific: PHP-FPM pool worker identified by ParentImage.
selection_php_fpm_parent_image:
ParentImage|contains:
- '/php-fpm'
- '/php7.'
- '/php8.'
- '/php-cgi'
- '/lsphp'
# PHP-FPM / PHP-CGI parent identified by ParentCommandLine - combined Linux and Windows.
selection_php_parent_cmdline:
ParentCommandLine|contains:
- 'php-fpm'
- 'php-cgi'
- 'lsphp'
- 'pool www'
- 'php-cgi.exe'
- 'php.exe'
- 'wp-content'
- 'wp-admin'
- 'index.php'
# Anything the child Image starts with here is considered a standard, expected location for a
# web/PHP process to legitimately launch from - combined Linux and Windows system paths.
filter_standard_system_paths:
Image|startswith:
- '/bin/'
- '/usr/bin/'
- '/usr/sbin/'
- '/sbin/'
- '/usr/local/bin/'
- '/usr/local/sbin/'
- '/snap/bin/'
- 'C:\Windows\System32\'
- 'C:\Windows\SysWOW64\'
- 'C:\Program Files\'
- 'C:\Program Files (x86)\'
# Placeholder only: replace with the organization's actual known-legitimate application
# binary paths (e.g. composer vendor/bin, a bundled tool under /opt/, a vendor-specific
# Windows install directory) before enabling this rule. Never ship or rely on this example
# value as-is.
filter_optional_known_application_paths:
Image|contains:
- '/example-approved-app-path/'
- '\example-approved-app-path\'
condition: >
(selection_web_parent or selection_php_fpm_parent_image or selection_php_parent_cmdline) and
not filter_standard_system_paths and
not filter_optional_known_application_paths
fields:
- Computer
- User
- Image
- CommandLine
- ParentImage
- ParentCommandLine
- CurrentDirectory
- ProcessId
- ParentProcessId
falsepositives:
- Legitimate applications shipping helper binaries outside standard system/Windows directories (composer vendor/bin, bundled tools under /opt/, language runtime managers such as nvm/rbenv shims, third-party PHP extensions bundling a Windows binary), tune filter_optional_known_application_paths to the organization's known application paths before relying on this rule
- Hosting control panels or deployment tooling that invokes application-specific binaries from a non-standard install path
- Container images that intentionally install application dependencies outside /usr, common in some Docker/Kubernetes base images
level: medium