PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。 PHP在处理配置选项时存在漏洞,远程攻击者可能利用此漏洞绕过安全限制。 如果将PHP用作Apache模块的话,就可以使用Apache配置文件(如httpd.conf)中的指令更改配置设置。例如,httpd.conf中的open_basedir: - --- <Directory /usr/home/frajer/public_html/> Options FollowSymLinks MultiViews Indexes AllowOverride None php_admin_flag safe_mode 1 php_admin_value open_basedir /usr/home/frajer/public_html/ </Directory> - --- 在PHP中有两个config选项,分别是Local Value和Master Value。如果在Local Value中为选定的用户设置了safe_mode或open_basedir且Master Value为默认值,就可以通过ini_restore()函数将Master Value恢复为Local Value: - --- ini_restore (PHP 4, PHP 5) ini_restore -- Restores the value of a configuration option - --- 恢复了php.ini文件的值攻击者就可以绕过httpd.conf的PHP选项。 PHP PHP 5.1.6 PHP PHP 4.4.4 厂商补丁: PHP --- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://cvs.php.net/viewcvs.cgi/php-src/NEWS
PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。 PHP在处理配置选项时存在漏洞,远程攻击者可能利用此漏洞绕过安全限制。 如果将PHP用作Apache模块的话,就可以使用Apache配置文件(如httpd.conf)中的指令更改配置设置。例如,httpd.conf中的open_basedir: - --- <Directory /usr/home/frajer/public_html/> Options FollowSymLinks MultiViews Indexes AllowOverride None php_admin_flag safe_mode 1 php_admin_value open_basedir /usr/home/frajer/public_html/ </Directory> - --- 在PHP中有两个config选项,分别是Local Value和Master Value。如果在Local Value中为选定的用户设置了safe_mode或open_basedir且Master Value为默认值,就可以通过ini_restore()函数将Master Value恢复为Local Value: - --- ini_restore (PHP 4, PHP 5) ini_restore -- Restores the value of a configuration option - --- 恢复了php.ini文件的值攻击者就可以绕过httpd.conf的PHP选项。 PHP PHP 5.1.6 PHP PHP 4.4.4 厂商补丁: PHP --- 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载: http://cvs.php.net/viewcvs.cgi/php-src/NEWS