<?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>Spind.net Blog &#187; Paranoia</title>
	<atom:link href="http://blog.spind.net/tag/paranoia/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.spind.net</link>
	<description>Stories from the trenches of System Administration</description>
	<lastBuildDate>Mon, 19 Dec 2011 09:21:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>The mysterious case of the 501 error</title>
		<link>http://blog.spind.net/2009/05/13/the-mysterious-case-of-the-501-error/</link>
		<comments>http://blog.spind.net/2009/05/13/the-mysterious-case-of-the-501-error/#comments</comments>
		<pubDate>Wed, 13 May 2009 09:10:30 +0000</pubDate>
		<dc:creator>hc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ModSecurity]]></category>
		<category><![CDATA[Paranoia]]></category>

		<guid isPermaLink="false">http://blog.spind.net/?p=137</guid>
		<description><![CDATA[I recently installed mod_security on our Apache server, and everything seemed to be working fine. Suddenly, while working on the previous post, I was presented with this error: Method Not Implemented POST to /wp/wp-admin/post.php not supported. I checked the log files, and found these hits: [Wed May 13 10:52:48 2009] [error] [client xxx.xxx.xxx.xxx] ModSecurity: Access [...]]]></description>
			<content:encoded><![CDATA[<p>I recently installed <a href="http://www.modsecurity.org/">mod_security</a> on our Apache server, and everything seemed to be working fine. Suddenly, while working on the <a href="http://blog.spind.net/2009/05/13/prioritizing-linux-services/">previous post</a>, I was presented with this error:</p>
<div class="codebox">
Method Not Implemented<br />
POST to /wp/wp-admin/post.php not supported.
</div>
<p>I checked the log files, and found these hits:</p>
<div class="codebox">
[Wed May 13 10:52:48 2009] [error] [client xxx.xxx.xxx.xxx] ModSecurity: Access denied with code 501 (phase 2). Pattern match &#8220;(?:\\b(?:\\.(?:ht(?:access|passwd|group)|www_?acl)|global\\.asa|httpd\\.conf|boot\\.ini)\\b|\\/etc\\/)&#8221; at ARGS:content. [file "/etc/httpd/modsecurity.d/modsecurity_crs_40_generic_attacks.conf"] [line "114"] [id "950005"] [msg "Remote File Access Attempt"] [data "/etc/"] [severity "CRITICAL"] [tag "WEB_ATTACK/FILE_INJECTION"] [hostname "blog.spind.net"] [uri "/wp/wp-admin/post.php"] [unique_id "xxxxxxxxxxxxx"]
</div>
<p>In short, it&#8217;s <tt>mod_security</tt> telling me that the text <tt>/etc/</tt> triggered rule 950005, which should be protecting our server against malicious attempts to access local files &#8211; like the ones in the <tt>/etc</tt> directory. The access file only showed a POST to <tt>/wp/wp-admin/post.php</tt> so I had no idea where the <tt>/etc/</tt> string was coming from. Maybe some weird hidden Javascript? Maybe something else?</p>
<p><a href="http://techpulp.com/2009/02/how-to-resolve-post-to-wp-admin-post-php-not-supported-error-in-wordpress/">This post</a> narrowed acknowledged it to be related to <tt>mod_security</tt> and suggested to disable it permanently or just turn it temporarily off while posting. I aim to do better.</p>
<p>The <a href="http://blog.spind.net/2009/05/13/prioritizing-linux-services/">previous post</a> has a wonderful nugget of enlightenment about prioritizing services on Linux, and suggested a couple of changes to the Linux configuration files &#8211; most of which are located in.. the <tt>/etc/</tt> folder. In short, I triggered <tt>mod_security</tt> rule 950005 by posting data containing <tt>/etc/</tt>.</p>
<p>If you ever plan to cover issues related to deployment and administration of operating system in the Unix family, this rule absolutely has got to go. Obviously it&#8217;s written with the best of intentions, but as it is doesn&#8217;t work and should be disabled.</p>
<p>Avoid messing with <tt>/etc/httpd/modsecurity.d/modsecurity_crs_40_generic_attacks.conf</tt> and just disable the specific rules in <tt>/etc/httpd/conf.d/mod_security.conf</tt> by adding this:</p>
<div class="codebox">
# Disable a couple of rules in modsecurity.d/modsecurity_crs_40_generic_attacks.conf<br />
# that prevents submitting text containing filenames in the Unix family.<br />
SecRuleRemoveById 950005<br />
SecRuleRemoveById 950006
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.spind.net/2009/05/13/the-mysterious-case-of-the-501-error/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VMWare vs Paranoia</title>
		<link>http://blog.spind.net/2009/03/10/vmware-vs-paranoia/</link>
		<comments>http://blog.spind.net/2009/03/10/vmware-vs-paranoia/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 10:58:08 +0000</pubDate>
		<dc:creator>hc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Paranoia]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://blog.spind.net/?p=102</guid>
		<description><![CDATA[As a website developer, I unfortunately need to test everything in Microsoft&#8217;s dreaded Internet Explorer. For this, I&#8217;ve got a Windows XP running on an installation of VMware® Workstation on my Linux desktop. It works like a charm, except when the kernel is updated. Aside from being a website developer, I&#8217;m also a paranoid system [...]]]></description>
			<content:encoded><![CDATA[<p>As a website developer, I unfortunately need to test everything in Microsoft&#8217;s dreaded Internet Explorer. For this, I&#8217;ve got a Windows XP running on an installation of <a href="http://www.vmware.com/">VMware® Workstation</a> on my Linux desktop. It works like a charm, except when the kernel is updated.</p>
<p>Aside from being a website developer, I&#8217;m also a paranoid system administrator. One of the first thing I add to my login scripts, is <tt>umask 077</tt> &#8211; the command that sets the permission mask for newly created files. Setting this to <tt>077</tt> prevents anyone but the current user from being granted any rights &#8211; read, write or execution. It&#8217;s a sane thing to do, but unfortunately a lot of scripts fail to explicitly grant access to other users, especially when installing RPM packages or &#8211; in this case &#8211; running VMWare after a kernel upgrade to build new VMWare-specific kernel modules.</p>
<p>In this specific case, VMWare kernel modules were built by the <tt>root</tt> user, and ended up in <tt>/lib/modules/2.6.27.19-170.2.35.fc10.x86_64/misc/</tt> which was created by the build process. Read permissions were not explicitly granted to everyone, so when running <tt>vmware</tt> as a mortal user, it was unable to actually read and verify the newly built kernel modules. The natural response to the user wasn&#8217;t <em>&#8220;Unable to read kernel module files&#8221;</em>, but instead <em>&#8220;You need to build kernel modules for your specific kernel&#8221;</em>. Makes a lot of sense, eh? <img src='http://blog.spind.net/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Manually granting read and execution rights on the <tt>/misc</tt> directory and the files in it fixed the issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.spind.net/2009/03/10/vmware-vs-paranoia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

