title: Linux PHP Worker Starts Shell or Downloader
id: 0fc952b5-d91d-492c-93a2-c091588cf23a
status: experimental
description: >-
    Finds a direct shell or downloader child of a php-fpm or php-cgi process.
    This is a generic runtime investigation lead, not a PHP2Shell signature.
    Add verified worker names used in your deployment and baseline expected jobs.
author: Deception Check
date: '2026-10-23'
references:
    - https://sigmahq.io/docs/basics/log-sources.html
logsource:
    category: process_creation
    product: linux
    definition: 'Requires full executable paths for Image and direct ParentImage.'
detection:
    selection_parent:
        ParentImage|re: '/php-(fpm|cgi)([0-9]+([.][0-9]+)*)?$'
    selection_child:
        Image|re: '/(sh|bash|dash|ksh|zsh|curl|wget)$'
    condition: selection_parent and selection_child
fields:
    - Image
    - CommandLine
    - ParentImage
    - ParentCommandLine
    - User
    - ProcessId
    - ParentProcessId
falsepositives:
    - Application features that intentionally invoke shells, downloaders, or maintenance tasks
level: medium
