<?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>Saiweb &#187; vulnerability</title>
	<atom:link href="http://www.saiweb.co.uk/tag/vulnerability/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saiweb.co.uk</link>
	<description>Ramblings of a Sys admin</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:57:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Apache 2.2.3 dual extention vulnerability</title>
		<link>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability</link>
		<comments>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability#comments</comments>
		<pubDate>Tue, 05 Jan 2010 11:33:17 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[537535]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[dual extension]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=802</guid>
		<description><![CDATA[Redhat bug 537535 Take for instance this code saved as test.php.png 123&#60;?PHP print_r&#40;$_POST&#41;; ?&#62; Low and behold this will render out the entire post array! and will interpret the php itself, now lets be clear here the proper use of selinux and directory structures to prevent UGC from being allowed to be access directly and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://bugzilla.redhat.com/show_bug.cgi?id=537535">Redhat bug 537535</a></p>
<p>Take for instance this code saved as test.php.png</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?PHP</span><br />
<a href="http://www.php.net/print_r"><span style="color: #990000;">print_r</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Low and behold this will render out the entire post array! and will interpret the php itself, now lets be clear here the proper use of selinux and directory structures to prevent UGC from being allowed to be access directly and / or run arbitrary code would of prevented this, however as is often the case the setup is such that the preventative conditions could not / are not deployed.</p>
<p>At any rate this bug comes courtesy of the apache AddHandler directive,</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddHandler x-httpd-php .php</div></td></tr></tbody></table></div>
<p>The statement above seems to &#8216;loose&#8217; match the .php extension meaning a file simply only contain .php anywhere in it&#8217;s filename to be interpreted as PHP.</p>
<p>The suggested work around for this is as follows:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#Workaround for bug here: https://bugzilla.redhat.com/show_bug.cgi?id=537535</span><br />
<span style="color: #000000; font-weight: bold;">&lt;</span>FilesMatch \.php$<span style="color: #000000; font-weight: bold;">&gt;</span><br />
SetHandler x-httpd-php<br />
ForceType text<span style="color: #000000; font-weight: bold;">/</span>html<br />
<span style="color: #000000; font-weight: bold;">&lt;/</span>FilesMatch<span style="color: #000000; font-weight: bold;">&gt;</span></div></td></tr></tbody></table></div>
<p>Note this does not effect the AddType directive, after testing on the same version using:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddType application<span style="color: #000000; font-weight: bold;">/</span>x-httpd-php .php</div></td></tr></tbody></table></div>
<p>Is not effected by this &#8216;bug&#8217;.</p>
<p><span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability" data-text="Apache 2.2.3 dual extention vulnerability" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Funcategorized%2Fapache-2-2-3-dual-extention-vulnerability&#038;text=Apache%202.2.3%20dual%20extention%20vulnerability" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/uncategorized/apache-2-2-3-dual-extention-vulnerability/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 3/11 queries in 0.018 seconds using apc
Object Caching 588/602 objects using apc
Content Delivery Network via Rackspace Cloud Files: cdn.saiweb.co.uk

Served from: www.saiweb.co.uk @ 2012-02-08 16:32:38 -->
