Back
Id56cda6d3-8402-4d6c-a2e7-f72b1efed280
RulenamePHP Worker Process Spawning Shell/Recon Tool
Description[Unvalidated] Identifies a shell or reconnaissance tool spawned

directly under a PHP worker process (php-fpm, lsphp, or Apache

mod_php, where PHP runs in-process inside the apache2/httpd worker).

This is a generic PHP child-process-monitoring indicator, useful

against any PHP RCE regardless of root cause - it does not itself

detect or confirm exploitation of CVE-2026-109618 or CVE-2026-109619

specifically.



CVE attribution is unvalidated: the reference sample this rule’s

field-matching was checked against

(https://github.com/rjmendez/phpup-2026/blob/master/examples/INDEX.md)

was produced by a direct shell_exec() test endpoint, not by triggering

either CVE’’s actual longjmp/bailout mechanism

(https://github.com/rjmendez/phpup-2026/blob/master/ANALYSIS.md). No

representative malicious sample produced by exploiting either CVE has

been validated against this query.



Benign-use tuning: legitimate applications routinely invoke shells,

Python, curl, or wget from PHP (build steps, package managers, image

processing, health checks). Expect overlap with existing generic

“process spawned a shell” content already present in most

environments; this rule adds PHP-worker-specific parentage as a

narrowing filter, not a new detection category. Tune the command-line

tokens and account/parent filters to your own environment before

enabling as an alert.



2026-10-21, same day, second fix: FileHash entity was mapped to this

table’s SHA256 column - Microsoft’s own DeviceProcessEvents schema

reference states that field “is usually not populated - use the SHA1

column when available”. Switched to SHA1, confirmed as the convention

a real, already-merged detection in this same repo uses for the same

table (Detections/DeviceProcessEvents/

SolarWinds_SUNBURST_Process-IOCs.yaml).

References:

- https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp

- https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w

- https://github.com/rjmendez/phpup-2026
SeverityHigh
TacticsInitialAccess
Execution
TechniquesT1190
T1059
T1059.004
Required data connectorsMicrosoftThreatProtection
KindScheduled
Query frequency1h
Query period1h
Trigger threshold0
Trigger operatorgt
Source Urihttps://github.com/Azure/Azure-Sentinel/blob/master/Detections/DeviceProcessEvents/phpup2026-PHPShellSpawn.yaml
Version1.0.1
Arm template56cda6d3-8402-4d6c-a2e7-f72b1efed280.json
Deploy To Azure
DeviceProcessEvents
| where InitiatingProcessFileName matches regex @"(?i)^(php-fpm[\d.]*|php[\d.]*|lsphp[\d]*|apache2|httpd)$"
| where FileName in~ ("sh", "bash", "dash", "zsh", "ash", "python", "python2", "python3",
    "perl", "ruby", "curl", "wget", "nc", "ncat", "nmap", "whoami", "id")
     or ProcessCommandLine has_any (
         "/bin/sh", "/bin/bash", "bash -i", "python -c", "python3 -c",
         "exec(", "eval(", "base64 -d", "curl ", "wget "
       )
| extend HashAlgorithm = "SHA1"
| project TimeGenerated, DeviceName,
          InitiatingProcessAccountName, InitiatingProcessAccountDomain,
          InitiatingProcessAccountSid,
          InitiatingProcessFileName, InitiatingProcessCommandLine,
          FileName, ProcessCommandLine, FolderPath, SHA1, HashAlgorithm
entityMappings:
- fieldMappings:
  - identifier: Name
    columnName: InitiatingProcessAccountName
  - identifier: NTDomain
    columnName: InitiatingProcessAccountDomain
  - identifier: Sid
    columnName: InitiatingProcessAccountSid
  entityType: Account
- fieldMappings:
  - identifier: HostName
    columnName: DeviceName
  entityType: Host
- fieldMappings:
  - identifier: CommandLine
    columnName: ProcessCommandLine
  entityType: Process
- fieldMappings:
  - identifier: Algorithm
    columnName: HashAlgorithm
  - identifier: Value
    columnName: SHA1
  entityType: FileHash
metadata:
  categories:
    domains:
    - Security - Threat Protection
  support:
    tier: Community
  source:
    kind: Community
  author:
    name: rjmendez
id: 56cda6d3-8402-4d6c-a2e7-f72b1efed280
OriginalUri: https://github.com/Azure/Azure-Sentinel/blob/master/Detections/DeviceProcessEvents/phpup2026-PHPShellSpawn.yaml
triggerOperator: gt
tactics:
- InitialAccess
- Execution
kind: Scheduled
requiredDataConnectors:
- dataTypes:
  - DeviceProcessEvents
  connectorId: MicrosoftThreatProtection
queryPeriod: 1h
severity: High
relevantTechniques:
- T1190
- T1059
- T1059.004
triggerThreshold: 0
version: 1.0.1
name: PHP Worker Process Spawning Shell/Recon Tool
status: Available
query: |
  DeviceProcessEvents
  | where InitiatingProcessFileName matches regex @"(?i)^(php-fpm[\d.]*|php[\d.]*|lsphp[\d]*|apache2|httpd)$"
  | where FileName in~ ("sh", "bash", "dash", "zsh", "ash", "python", "python2", "python3",
      "perl", "ruby", "curl", "wget", "nc", "ncat", "nmap", "whoami", "id")
       or ProcessCommandLine has_any (
           "/bin/sh", "/bin/bash", "bash -i", "python -c", "python3 -c",
           "exec(", "eval(", "base64 -d", "curl ", "wget "
         )
  | extend HashAlgorithm = "SHA1"
  | project TimeGenerated, DeviceName,
            InitiatingProcessAccountName, InitiatingProcessAccountDomain,
            InitiatingProcessAccountSid,
            InitiatingProcessFileName, InitiatingProcessCommandLine,
            FileName, ProcessCommandLine, FolderPath, SHA1, HashAlgorithm
description: |
  '[Unvalidated] Identifies a shell or reconnaissance tool spawned
  directly under a PHP worker process (php-fpm, lsphp, or Apache
  mod_php, where PHP runs in-process inside the apache2/httpd worker).
  This is a generic PHP child-process-monitoring indicator, useful
  against any PHP RCE regardless of root cause - it does not itself
  detect or confirm exploitation of CVE-2026-109618 or CVE-2026-109619
  specifically.

  CVE attribution is unvalidated: the reference sample this rule's
  field-matching was checked against
  (https://github.com/rjmendez/phpup-2026/blob/master/examples/INDEX.md)
  was produced by a direct shell_exec() test endpoint, not by triggering
  either CVE''s actual longjmp/bailout mechanism
  (https://github.com/rjmendez/phpup-2026/blob/master/ANALYSIS.md). No
  representative malicious sample produced by exploiting either CVE has
  been validated against this query.

  Benign-use tuning: legitimate applications routinely invoke shells,
  Python, curl, or wget from PHP (build steps, package managers, image
  processing, health checks). Expect overlap with existing generic
  "process spawned a shell" content already present in most
  environments; this rule adds PHP-worker-specific parentage as a
  narrowing filter, not a new detection category. Tune the command-line
  tokens and account/parent filters to your own environment before
  enabling as an alert.

  2026-10-21, same day, second fix: FileHash entity was mapped to this
  table's SHA256 column - Microsoft's own DeviceProcessEvents schema
  reference states that field "is usually not populated - use the SHA1
  column when available". Switched to SHA1, confirmed as the convention
  a real, already-merged detection in this same repo uses for the same
  table (Detections/DeviceProcessEvents/
  SolarWinds_SUNBURST_Process-IOCs.yaml).
  References:
  - https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp
  - https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
  - https://github.com/rjmendez/phpup-2026'
queryFrequency: 1h
tags:
- CVE-2026-109618
- CVE-2026-109619
- phpup-2026
- unvalidated
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/56cda6d3-8402-4d6c-a2e7-f72b1efed280')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/56cda6d3-8402-4d6c-a2e7-f72b1efed280')]",
      "properties": {
        "alertRuleTemplateName": "56cda6d3-8402-4d6c-a2e7-f72b1efed280",
        "customDetails": null,
        "description": "'[Unvalidated] Identifies a shell or reconnaissance tool spawned\ndirectly under a PHP worker process (php-fpm, lsphp, or Apache\nmod_php, where PHP runs in-process inside the apache2/httpd worker).\nThis is a generic PHP child-process-monitoring indicator, useful\nagainst any PHP RCE regardless of root cause - it does not itself\ndetect or confirm exploitation of CVE-2026-109618 or CVE-2026-109619\nspecifically.\n\nCVE attribution is unvalidated: the reference sample this rule's\nfield-matching was checked against\n(https://github.com/rjmendez/phpup-2026/blob/master/examples/INDEX.md)\nwas produced by a direct shell_exec() test endpoint, not by triggering\neither CVE''s actual longjmp/bailout mechanism\n(https://github.com/rjmendez/phpup-2026/blob/master/ANALYSIS.md). No\nrepresentative malicious sample produced by exploiting either CVE has\nbeen validated against this query.\n\nBenign-use tuning: legitimate applications routinely invoke shells,\nPython, curl, or wget from PHP (build steps, package managers, image\nprocessing, health checks). Expect overlap with existing generic\n\"process spawned a shell\" content already present in most\nenvironments; this rule adds PHP-worker-specific parentage as a\nnarrowing filter, not a new detection category. Tune the command-line\ntokens and account/parent filters to your own environment before\nenabling as an alert.\n\n2026-10-21, same day, second fix: FileHash entity was mapped to this\ntable's SHA256 column - Microsoft's own DeviceProcessEvents schema\nreference states that field \"is usually not populated - use the SHA1\ncolumn when available\". Switched to SHA1, confirmed as the convention\na real, already-merged detection in this same repo uses for the same\ntable (Detections/DeviceProcessEvents/\nSolarWinds_SUNBURST_Process-IOCs.yaml).\nReferences:\n- https://github.com/php/php-src/security/advisories/GHSA-6wmf-4rv5-p3rp\n- https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w\n- https://github.com/rjmendez/phpup-2026'\n",
        "displayName": "PHP Worker Process Spawning Shell/Recon Tool",
        "enabled": true,
        "entityMappings": [
          {
            "entityType": "Account",
            "fieldMappings": [
              {
                "columnName": "InitiatingProcessAccountName",
                "identifier": "Name"
              },
              {
                "columnName": "InitiatingProcessAccountDomain",
                "identifier": "NTDomain"
              },
              {
                "columnName": "InitiatingProcessAccountSid",
                "identifier": "Sid"
              }
            ]
          },
          {
            "entityType": "Host",
            "fieldMappings": [
              {
                "columnName": "DeviceName",
                "identifier": "HostName"
              }
            ]
          },
          {
            "entityType": "Process",
            "fieldMappings": [
              {
                "columnName": "ProcessCommandLine",
                "identifier": "CommandLine"
              }
            ]
          },
          {
            "entityType": "FileHash",
            "fieldMappings": [
              {
                "columnName": "HashAlgorithm",
                "identifier": "Algorithm"
              },
              {
                "columnName": "SHA1",
                "identifier": "Value"
              }
            ]
          }
        ],
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Detections/DeviceProcessEvents/phpup2026-PHPShellSpawn.yaml",
        "query": "DeviceProcessEvents\n| where InitiatingProcessFileName matches regex @\"(?i)^(php-fpm[\\d.]*|php[\\d.]*|lsphp[\\d]*|apache2|httpd)$\"\n| where FileName in~ (\"sh\", \"bash\", \"dash\", \"zsh\", \"ash\", \"python\", \"python2\", \"python3\",\n    \"perl\", \"ruby\", \"curl\", \"wget\", \"nc\", \"ncat\", \"nmap\", \"whoami\", \"id\")\n     or ProcessCommandLine has_any (\n         \"/bin/sh\", \"/bin/bash\", \"bash -i\", \"python -c\", \"python3 -c\",\n         \"exec(\", \"eval(\", \"base64 -d\", \"curl \", \"wget \"\n       )\n| extend HashAlgorithm = \"SHA1\"\n| project TimeGenerated, DeviceName,\n          InitiatingProcessAccountName, InitiatingProcessAccountDomain,\n          InitiatingProcessAccountSid,\n          InitiatingProcessFileName, InitiatingProcessCommandLine,\n          FileName, ProcessCommandLine, FolderPath, SHA1, HashAlgorithm\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "High",
        "status": "Available",
        "subTechniques": [
          "T1059.004"
        ],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "Execution",
          "InitialAccess"
        ],
        "tags": [
          "CVE-2026-109618",
          "CVE-2026-109619",
          "phpup-2026",
          "unvalidated"
        ],
        "techniques": [
          "T1059",
          "T1190"
        ],
        "templateVersion": "1.0.1",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}