Rapid7 Vulnerability & Exploit Database

update-motd.d Persistence

Back to Search

update-motd.d Persistence

Disclosed
01/01/1999
Created
09/13/2024

Description

This module will add a script in /etc/update-motd.d/ in order to persist a payload. The payload will be executed with root privileges everytime a user logs in.

Author(s)

  • Julien Voisin

Platform

Linux,Unix

Architectures

cmd

Development

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

;