PHP::HTML htmlclass_path远程文件包含漏洞

受影响系统:
idanso PHP::HTML 0.6.4
描述:
--------------------------------------------------------------------------------
BUGTRAQ ID: 24477
CVE(CAN) ID: CVE-2007-3230

PHP::HTML是一套HTML类,用于帮助创建复杂的文档。

PHP::HTML处理用户请求时存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上执行任意命令。

PHP::HTML的phphtml.php脚本中没有正确地验证htmlclass_path参数的输入,允许攻击者通过包含任意本地或外部资源导致执行任意代码。漏洞代码如下:

<?

define (PHPHTML_VERSION, "0.6.4");

/* gettext is not implemented for now*/
$use_gettext=0;

/* We need to know where the PHP::HTML tree is installed.*/

if (strlen(chop($htmlclass_path))==0) $htmlclass_path=".";
if ($use_gettext==1)
{
if (function_exists("gettext"))
{
$gettext_enable=1;
}
}

include("$htmlclass_path/ext.php"); /* Some extenstions to PHP */
include("$htmlclass_path/core.php"); /* PHP::HTML Core */
include("$htmlclass_path/xhtml.php"); /* XHTML extensions */
include("$htmlclass_path/xhtml_table.php"); /* XHTML tables extensions */
include("$htmlclass_path/xhtml_forms.php"); /* XHTML forms extensions */
include("$htmlclass_path/xhtml_doc.php"); /* XHTML document extension */
include("$htmlclass_path/wml.php"); /* WML extension */

成功攻击要求打开了register_globals选项。

<*来源:o0xxdark0o (o0xxdark0o@msn.com)

链接:http://secunia.com/advisories/25687/
*>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!

http://www.example.com/phphtml.php?htmlclass_path=SH3ll.txt

建议:
--------------------------------------------------------------------------------
厂商补丁:

idanso
------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://sourceforge.net/projects/phphtml

文章来自: 绿盟科技

上一篇:Kaspersky Internet Security SSDT钩子多个本地拒绝服务漏洞
下一篇:台湾军方称电脑网络遭大陆黑客攻击

发表评论


评论内容 (必填):