PHP/FI 1.0/2.0示例脚本远程读取任意文件漏洞

QQ空间 新浪微博 微信 QQ facebook twitter
漏洞ID 1105331 漏洞类型 其他
发布时间 1997-10-19 更新时间 2005-05-02
CVE编号 CVE-1999-0068 CNNVD-ID CNNVD-199710-017
漏洞平台 PHP CVSS评分 7.5
|漏洞来源
https://www.exploit-db.com/exploits/19553
http://www.cnnvd.org.cn/web/xxk/ldxqById.tag?CNNVD=CNNVD-199710-017
|漏洞详情
PHP/FI是一种CGI语言,是PHP的前身。早期版本的PHP/FI中自带了一些例程文件。其中某些例程文件存在安全问题,可导致本地文件泄漏。mylog.phtml和mlog.phtml是和早期有PHP一起发布的一个例子脚本。由于未对用户输入做充分过滤,攻击者可以利用它读取服务器上任意它有权限读取的文件。
|漏洞EXP
source: http://www.securityfocus.com/bid/713/info

The PHP/FI package which was originally written by Rasmus Lerdorf is an is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.

Since its inception, PHP/FI has been turned over to another development team and is now known only as PHP. Certain versions of PHP/FI shipped with two flawed example script for logging examples. These scripts were mylog.html & mlog.html. in both mlog.html and mylog.html. The idea is to include a file for each type of logging stats, however, there is no escaping of slashes, so one can specify any file on the system.

The problem lies in the line:

<?include "$screen">

By exploiting this problem users can view any file on the system which the http daemon user id has access to. 

http://some.stupid.isp.net/~dumbuser/cool-logs/mlog.html?screen=[fully
qualified path to any file on the system]
|参考资料

来源:BID
名称:713
链接:http://www.securityfocus.com/bid/713
来源:OSVDB
名称:3396
链接:http://www.osvdb.org/3396