Rapid7 Vulnerability & Exploit Database

Serv-U FTP Server prepareinstallation Privilege Escalation

Back to Search

Serv-U FTP Server prepareinstallation Privilege Escalation

Disclosed
06/05/2019
Created
07/02/2019

Description

This module attempts to gain root privileges on systems running Serv-U FTP Server versions prior to 15.1.7. The `Serv-U` executable is setuid `root`, and uses `ARGV[0]` in a call to `system()`, without validation, when invoked with the `-prepareinstallation` flag, resulting in command execution with root privileges. This module has been tested successfully on Serv-U FTP Server version 15.1.6 (x64) on Debian 9.6 (x64).

Author(s)

  • Guy Levin
  • bcoles <bcoles@gmail.com>

Platform

Linux

Architectures

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

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

;