title: PHP Spawns a Shell or Downloader (Windows)
id: 91b4c0de-6a22-5471-8c09-3e5a7f1d9c44
status: experimental
description: |
  OUR PATTERN. php.exe, php-cgi.exe or php-fpm.exe starts a shell, interpreter or downloader.
  Baseline first; see KQL Q1. No IOC. PHP 19 Nov 2026 security release. Pack 1.0.0.
  Not run against live data.
references:
  - https://www.php.net/ChangeLog-8.php
  - https://github.com/php/php-src/security/advisories/GHSA-qc49-hpvq-g2w6
author: CybaVerse threat hunt
date: 2026-11-19
tags:
  - attack.execution
  - attack.t1059.001
  - attack.t1059.003
  - attack.initial-access
  - attack.t1190
logsource:
  category: process_creation
  product: windows
detection:
  selection_parent:
    ParentImage|endswith:
      - '\php.exe'
      - '\php-cgi.exe'
      - '\php-fpm.exe'
      - '\lsphp.exe'
  selection_child:
    Image|endswith:
      - '\cmd.exe'
      - '\powershell.exe'
      - '\pwsh.exe'
      - '\wscript.exe'
      - '\cscript.exe'
      - '\curl.exe'
      - '\wget.exe'
      - '\certutil.exe'
  condition: selection_parent and selection_child
falsepositives:
  - Scheduled PHP tasks or installers that launch a shell
level: high
