title: Linux Apache Starts Shell or Downloader
id: ce2c0053-14c1-40f7-b0a4-28fed13196cd
status: experimental
description: >-
    Finds direct shell or downloader children of apache2 or httpd. Use on
    inventoried Apache servers, including mod_php deployments. A process name
    does not establish that mod_php is loaded. Baseline CGI, application jobs,
    and server administration before alerting; this is a noisy runtime hunt.
author: Deception Check
date: '2026-10-23'
references:
    - https://github.com/php/php-src/security/advisories/GHSA-w8hw-w9fx-j79w
    - 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: '/(apache2|httpd)$'
    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:
    - CGI handlers, authorized application subprocesses, and maintenance tasks
    - Apache piped logging or other configured server helpers invoking a shell
level: low
