Rapid7

module

Service SystemD override.conf Persistence

Disclosed
Mar 30, 2010
Created
Sep 26, 2025

Description

This module will create an override.conf file for a SystemD service on the box.
The ExecStartPost hook is used to launch the payload after the service is started.
We need enough access (typically root) to write in the /etc/systemd/system
directory and potentially restart services.
Verified on Ubuntu 22.04

Author

h00die

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