<?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>technoratica &#187; Apache</title>
	<atom:link href="http://gavin.mclelland.ca/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://gavin.mclelland.ca</link>
	<description>The personal blog of a Stealth Mode CEO</description>
	<lastBuildDate>Thu, 10 Dec 2009 19:55:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>.HTACCESS PCFG_OPENFILE: UNABLE TO CHECK HTACCESS FILE, ENSURE IT IS READABLE</title>
		<link>http://gavin.mclelland.ca/2009/12/10/htaccess-pcfg_openfile-unable-to-check-htaccess-file-ensure-it-is-readable/</link>
		<comments>http://gavin.mclelland.ca/2009/12/10/htaccess-pcfg_openfile-unable-to-check-htaccess-file-ensure-it-is-readable/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 19:16:26 +0000</pubDate>
		<dc:creator>gavin.mclelland</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[CFML]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[rewrite]]></category>

		<guid isPermaLink="false">http://gavin.mclelland.ca/?p=57</guid>
		<description><![CDATA[If your running across this error in your error logs, there may be a simple solution for you. This 403 error is usually caused by having AllowOverride set to All. You can either fix this by Chmod&#8217;ding all your files to 644 (not very elegant) or paste the following into your apache conf file, replacing [...]]]></description>
			<content:encoded><![CDATA[<p>If your running across this error in your error logs, there may be a simple solution for you.</p>
<p>This 403 error is usually caused by having AllowOverride set to All.</p>
<p>You can either fix this by Chmod&#8217;ding all your files to 644 (not very elegant) or paste the following into your apache conf file, replacing your &#8220;AllowOverride all&#8221; rule:</p>
<p><code>AllowOverride none<br />
Order deny,allow<br />
Allow from none</code></p>
<p>Just a quick tip, but hope this can save you some time!</p>
]]></content:encoded>
			<wfw:commentRss>http://gavin.mclelland.ca/2009/12/10/htaccess-pcfg_openfile-unable-to-check-htaccess-file-ensure-it-is-readable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Added SQL Injection attack protection with Rewrite Rules</title>
		<link>http://gavin.mclelland.ca/2008/06/07/added-sql-injection-attack-protection-with-rewrite-rules/</link>
		<comments>http://gavin.mclelland.ca/2008/06/07/added-sql-injection-attack-protection-with-rewrite-rules/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 00:50:03 +0000</pubDate>
		<dc:creator>gavin.mclelland</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://gavin.mclelland.ca/2008/06/07/added-sql-injection-attack-protection-with-rewrite-rules/</guid>
		<description><![CDATA[Sure you can protect against SQL injection attacks at the code layer, but what happens when hackers find something you missed? With Rewrite Rules, using mod_rewrite on apache or ISAPI_Rewrite for IIS, you can add rules to ignore URL based SQL Injection all together. Below is and example of some basic protection you can add. [...]]]></description>
			<content:encoded><![CDATA[<p>Sure you can protect against SQL injection attacks at the code layer, but what happens when hackers find something you missed? With Rewrite Rules, using mod_rewrite on apache or ISAPI_Rewrite for IIS, you can add rules to ignore URL based SQL Injection all together. Below is and example of some basic protection you can add.</p>
<p>In ISAPI_Rewrite</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteRule</span> .*DECLARE.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*NVARCHAR.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*INSERT .* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*INSERT %20.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .* xp_.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*%20xp_.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*%20@.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .* @.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*@%20.* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*@ .* /security-violation.htm [I]
<span style="color: #00007f;">RewriteRule</span> .*<span style="color: #7f007f;">';* /security-violation.htm [I]
RewriteRule .*EXEC<span style="color: #000099; font-weight: bold;">\(</span>@.* /security-violation.htm [I]
RewriteRule .*sp_password.* /security-violation.htm [I]
RewriteRule /security-violation.htm /security.cfm[I,L]</span></pre></div></div>

<p>In mod_rewrite</p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteRule</span> .*DECLARE.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*NVARCHAR.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*INSERT .* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*INSERT %20.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .* xp_.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*%20xp_.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*%20@.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .* @.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*@%20.* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*@ .* /security-violation.htm [NC]
<span style="color: #00007f;">RewriteRule</span> .*<span style="color: #7f007f;">';* /security-violation.htm [NC]
RewriteRule .*EXEC<span style="color: #000099; font-weight: bold;">\(</span>@.* /security-violation.htm [NC]
RewriteRule .*sp_password.* /security-violation.htm [NC]
RewriteRule /security-violation.htm /security.cfm[NC,L]</span></pre></div></div>

<p>Add security.cfm to your webroot:</p>

<div class="wp_syntax"><div class="code"><pre class="cfm" style="font-family:monospace;"><span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #000000; font-weight: bold;">h1</span><span style="color: #0000FF;">&gt;</span></span>
HACK ATTEMPT LOGGED FROM IP: <span style="color: #0000FF;">#remote_addr#</span> 
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #000000; font-weight: bold;">h1</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
#DateFormat(Now(), &quot;MM-DD-YYYY&quot;)# @ #TimeFormat(Now(), &quot;HH:MM:SS&quot;)#
&nbsp;
<span style="color: #0000FF;">#script_name#</span>&amp;<span style="color: #0000FF;">#query_string#</span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfoutput</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfmail</span> <span style="color: #0000FF;">to</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Sysadmin&quot;</span> <span style="color: #0000FF;">from</span><span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;Your Website&quot;</span> subject<span style="color: #0000FF;">=</span><span style="color: #009900;">&quot;HACK ATTEMPT FROM IP: #remote_addr#&quot;</span><span style="color: #0000FF;">&gt;</span></span>
&nbsp;
HACK ATTEMPT RECORDED:
&nbsp;
#DateFormat(Now(), &quot;MM-DD-YYYY&quot;)# @ #TimeFormat(Now(), &quot;HH:MM:SS&quot;)#
&nbsp;
IP: <span style="color: #0000FF;">#remote_addr#</span>
&nbsp;
ATTEMPT:
&nbsp;
http://<span style="color: #0000FF;">#server_name#</span><span style="color: #0000FF;">#script_name#</span>&amp;<span style="color: #0000FF;">#query_string#</span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;/</span><span style="color: #990000; font-weight: bold;">cfmail</span><span style="color: #0000FF;">&gt;</span></span>
<span style="color: #333333;"><span style="color: #0000FF;">&lt;</span><span style="color: #990000; font-weight: bold;">cfabort</span><span style="color: #0000FF;">&gt;</span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://gavin.mclelland.ca/2008/06/07/added-sql-injection-attack-protection-with-rewrite-rules/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
