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

module

Python Exec, Command Shell, Bind TCP (via python)

Disclosed
N/A
Created
Mar 16, 2022

Description

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

Creates an interactive shell via Python, encodes with base64 by design. Compatible with Python 2.4-2.7 and 3.4+.

Authors

Spencer McIntyre
mumbai

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/python/shell_bind_tcp
msf payload(shell_bind_tcp) > show actions
...actions...
msf payload(shell_bind_tcp) > set ACTION < action-name >
msf payload(shell_bind_tcp) > show options
...show and set options...
msf payload(shell_bind_tcp) > 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.