Rapid7

module

Bash Profile Persistence

Disclosed
Jun 8, 1989
Created
Sep 2, 2025

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.
Verified on Ubuntu 22.04 and 18.04 desktop with Gnome

Author

Michael Long [email protected]

Platform

Linux,Unix

Architectures

cmd, x86, x64, armle, aarch64, ppc, mipsle, mipsbe

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/persistence/bash_profile
msf exploit(bash_profile) > show targets
...targets...
msf exploit(bash_profile) > set TARGET < target-id >
msf exploit(bash_profile) > show options
...show and set options...
msf exploit(bash_profile) > 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.