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

module

PHP Exec, PHP Command Shell, Bind TCP (via PHP)

Disclosed
N/A
Created
May 29, 2025

Description

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

Listen for a connection and spawn a command shell via php

Authors

Spencer McIntyre
msutovsky-r7
egypt [email protected]
diaul [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/bind_php
msf payload(bind_php) > show actions
...actions...
msf payload(bind_php) > set ACTION < action-name >
msf payload(bind_php) > show options
...show and set options...
msf payload(bind_php) > 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.