Rapid7 Vulnerability & Exploit Database

Service Persistence

Back to Search

Service Persistence

Disclosed
01/01/1983
Created
05/30/2018

Description

This module will create a service on the box, and mark it for auto-restart. We need enough access to write service files and potentially restart services Targets: System V: CentOS <= 5 Debian <= 6 Kali 2.0 Ubuntu <= 9.04 Upstart: CentOS 6 Fedora >= 9, < 15 Ubuntu >= 9.10, <= 14.10 systemd: CentOS 7 Debian >= 7, <=8 Fedora >= 15 Ubuntu >= 15.04 Note: System V won't restart the service if it dies, only an init change (reboot etc) will restart it.

Author(s)

  • h00die <mike@shorebreaksecurity.com>
  • Cale Black

Platform

Linux,Unix

Architectures

cmd

Development

References

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

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;