title: PHP or PHP-FPM Spawns a Shell or Downloader (Linux)
id: 7c2e1a90-4b3f-5d8e-9a11-0f6c4d8e2b17
status: experimental
description: |
  OUR PATTERN. A PHP, PHP-FPM, php-cgi or lsphp process starts a shell, interpreter or downloader.
  Baseline legitimate helpers first; see KQL Q1. No IOC; no one signal proves exploitation.
  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.004
  - attack.initial-access
  - attack.t1190
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/php'
      - '/php-fpm'
      - '/php-cgi'
      - '/lsphp'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/zsh'
      - '/ksh'
      - '/busybox'
      - '/python'
      - '/python3'
      - '/perl'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
      - '/socat'
  condition: selection_parent and selection_child
falsepositives:
  - Image tooling, queue workers or deployment hooks started by PHP
level: high
