PHP2Shell: PAN-OS management interface exploitation, root via Fragnesia
SIGMA php-fpm/php-cgi/apache spawning sh with curl, wget or /dev/tcp linux process_creation · high Threat Brief · experimental
title: Suspicious shell spawned by a PHP worker (PHP2Shell)
id: 62e0bd11-c170-44f7-8cfc-0629bdd8be32
status: experimental
description: Child shell of php-fpm, php-cgi, lsphp, frankenphp, httpd or apache2 with download, reverse shell or base64 decoding, PHP2Shell post-exploitation.
references:
- https://www.elastic.co/es/security-labs/threat-command/php2shell-php-rce-detection
- https://www.prophetsecurity.ai/blog/php2shell
author: Threat Brief (tlpclear.fr)
date: 2026-11-01
tags:
- attack.initial-access
- attack.t1190
- attack.persistence
- attack.t1505.003
- cve.2026-109618
logsource:
product: linux
category: process_creation
detection:
selection_parent:
ParentImage|endswith:
- '/php-fpm'
- '/php-cgi'
- '/lsphp'
- '/frankenphp'
- '/httpd'
- '/apache2'
selection_parent_fpm:
ParentImage|contains: '/php-fpm'
selection_shell:
Image|endswith:
- '/sh'
- '/bash'
- '/dash'
- '/zsh'
- '/ksh'
selection_cmd:
CommandLine|contains:
- 'curl '
- 'wget '
- '/dev/tcp/'
- 'base64 -d'
- '/etc/shadow'
condition: (selection_parent or selection_parent_fpm) and selection_shell and selection_cmd
falsepositives:
- PHP applications calling curl or wget via a shell (updates, imports)
level: high
PHP2Shell post-exploitation on Linux, including appliances: child shell of a PHP worker with download or reverse shell. False positives: PHP applications calling curl via a shell.
www.elastic.cowww.prophetsecurity.ai
Conversions
ParentImage IN ("*/php-fpm", "*/php-cgi", "*/lsphp", "*/frankenphp", "*/httpd", "*/apache2") OR ParentImage="*/php-fpm*" Image IN ("*/sh", "*/bash", "*/dash", "*/zsh", "*/ksh") CommandLine IN ("*curl *", "*wget *", "*/dev/tcp/*", "*base64 -d*", "*/etc/shadow*")((ParentImage:(*\/php\-fpm OR *\/php\-cgi OR *\/lsphp OR *\/frankenphp OR *\/httpd OR *\/apache2)) OR ParentImage:*\/php\-fpm*) AND (Image:(*\/sh OR *\/bash OR *\/dash OR *\/zsh OR *\/ksh)) AND (CommandLine:(*curl\ * OR *wget\ * OR *\/dev\/tcp\/* OR *base64\ \-d* OR *\/etc\/shadow*))