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

module

Bash Profile Persistence

Disclosed
Jun 8, 1989
Created
Dec 16, 2019

Description

This module writes an execution trigger to the target's Bash profile.
The execution trigger executes a call back payload whenever the target
user opens a Bash terminal. A handler is not run automatically, so you
must configure an appropriate exploit/multi/handler to receive the callback.

Author

Michael Long [email protected]

Platform

Linux,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 exploit/linux/local/bash_profile_persistence
msf exploit(bash_profile_persistence) > show targets
...targets...
msf exploit(bash_profile_persistence) > set TARGET < target-id >
msf exploit(bash_profile_persistence) > show options
...show and set options...
msf exploit(bash_profile_persistence) > exploit

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.