Rapid7

module

Autostart Desktop Item Persistence

Disclosed
Feb 13, 2006
Created
Sep 11, 2025

Description

This module will create an autostart .desktop entry to execute a payload.
The payload will be executed when the users logs in.
Verified on Ubuntu 22.04 desktop with Gnome, and 18.04.3.
The following payloads were used in testing:
- cmd/unix/reverse_netcat
- linux/x64/meterpreter/reverse_tcp
- cmd/linux/http/x64/meterpreter/reverse_tcp

Author

Eliott Teissonniere

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