Rapid7’s 2026 Global Cybersecurity Summit is now available on-demand.Watch sessions.
Rapid7

module

PHP Exec, PHP Execute Command

Disclosed
N/A
Created
May 29, 2025

Description

Execute a PHP payload as an OS command from a Posix-compatible shell.

Execute a single system command

Authors

Spencer McIntyre
msutovsky-r7
egypt [email protected]

Platform

Unix

Architectures

cmd

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':


msf > use payload/cmd/unix/php/exec
msf payload(exec) > show actions
...actions...
msf payload(exec) > set ACTION < action-name >
msf payload(exec) > show options
...show and set options...
msf payload(exec) > run

Title
Rapid7 Labs

2026 Global Threat Landscape Report

The predictive window has collapsed. Exploitation follows disclosure in days. See how attackers are accelerating and how to stay ahead.