<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Sonic Cube &#187; apache</title>
	<atom:link href="http://soniccube.net/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://soniccube.net</link>
	<description>On The Road ...</description>
	<lastBuildDate>Sun, 14 Jun 2009 10:54:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>重大漏洞, 让Apache上传不安全 &#8211; php.*</title>
		<link>http://soniccube.net/2009/06/14/apache-security-bug-of-php</link>
		<comments>http://soniccube.net/2009/06/14/apache-security-bug-of-php#comments</comments>
		<pubDate>Sun, 14 Jun 2009 10:53:00 +0000</pubDate>
		<dc:creator>Sonic</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[漏洞]]></category>

		<guid isPermaLink="false">http://soniccube.net/?p=8</guid>
		<description><![CDATA[今天Google Reader上几个朋友share出几篇不错的文章,重大漏洞, 让Apache上传不安全-php.rar是其中一篇.
文章主要针对apache的一个问题,当一个连接请求xxx.php.suffix文件时,若该suffix在mime中没有定义,则apache会将这个文件当作是php文件来执行!而在apache默认配置中,rar,7z等等可能允许上传的文件中,都是没有定义mime的.
我简单测试了几个文件,甚至连test.php.gif这样的文件名都存在问题.而gif是有在mime中定义的.
上面文章中提到修改mime和添加type的方法,我也测试了一下,在我用的一台机器上,不能解决问题.
最后只能暂时将*.php.*全部禁止访问.禁止方法是在http.conf中加入如下内容:

&#60;FilesMatch &#8220;\.php.(.*)$&#8221;&#62;
        deny from all
&#60;/FilesMatch&#62;

该问题在apache 2.2.6中测试存在.上面的解决方法,可能造成部分正常文件无法访问.比如test.php.tar.bz2
]]></description>
			<content:encoded><![CDATA[<p>今天Google Reader上几个朋友share出几篇不错的文章,<a href="http://www.php-oa.com/2008/12/17/apache-phprar.html" target="_blank">重大漏洞, 让Apache上传不安全-php.rar</a>是其中一篇.</p>
<p>文章主要针对apache的一个问题,当一个连接请求xxx.php.suffix文件时,若该suffix在mime中没有定义,则apache会将这个文件当作是php文件来执行!而在apache默认配置中,rar,7z等等可能允许上传的文件中,都是没有定义mime的.</p>
<p>我简单测试了几个文件,甚至连test.php.gif这样的文件名都存在问题.而gif是有在mime中定义的.</p>
<p>上面文章中提到修改mime和添加type的方法,我也测试了一下,在我用的一台机器上,不能解决问题.</p>
<p>最后只能暂时将*.php.*全部禁止访问.禁止方法是在http.conf中加入如下内容:</p>
<blockquote><p>
&lt;FilesMatch &#8220;\.php.(.*)$&#8221;&gt;<br />
        deny from all<br />
&lt;/FilesMatch&gt;
</p></blockquote>
<p>该问题在apache 2.2.6中测试存在.上面的解决方法,可能造成部分正常文件无法访问.比如test.php.tar.bz2</p>
]]></content:encoded>
			<wfw:commentRss>http://soniccube.net/2009/06/14/apache-security-bug-of-php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
