<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Blocking comment spam using ModSecurity and realtime blacklists</title>
	<atom:link href="http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html</link>
	<description>Everything inline.</description>
	<lastBuildDate>Mon, 30 Jan 2012 16:49:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Victor Julien</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-28662</link>
		<dc:creator>Victor Julien</dc:creator>
		<pubDate>Mon, 16 May 2011 13:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-28662</guid>
		<description>@PPkiula did you check this link? http://blog.spiderlabs.com/2011/03/modsecurity-advanced-topic-of-the-week-malware-link-detection.html

It shows how to capture an url and check it against the google safe browsing database.</description>
		<content:encoded><![CDATA[<p>@PPkiula did you check this link? <a href="http://blog.spiderlabs.com/2011/03/modsecurity-advanced-topic-of-the-week-malware-link-detection.html" rel="nofollow">http://blog.spiderlabs.com/2011/03/modsecurity-advanced-topic-of-the-week-malware-link-detection.html</a></p>
<p>It shows how to capture an url and check it against the google safe browsing database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PPkiula</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-28658</link>
		<dc:creator>PPkiula</dc:creator>
		<pubDate>Sun, 15 May 2011 08:02:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-28658</guid>
		<description>Hi, 

First, thanks for sharing this. You don&#039;t have the &quot;Notify me when someone responds to my comment&quot; feature on this blog, so could you pls write to my email if you reply. 

I am looking for a rule set that works on not just REMOTE_ADDR, but looks at the *content* of form submissions. Will the rule above by &quot;Jens&quot; cover the posted content too? 

Thanks!</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>First, thanks for sharing this. You don&#8217;t have the &#8220;Notify me when someone responds to my comment&#8221; feature on this blog, so could you pls write to my email if you reply. </p>
<p>I am looking for a rule set that works on not just REMOTE_ADDR, but looks at the *content* of form submissions. Will the rule above by &#8220;Jens&#8221; cover the posted content too? </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mod Security for Apache &#8211; Web Server Smart Firewall</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-18934</link>
		<dc:creator>Mod Security for Apache &#8211; Web Server Smart Firewall</dc:creator>
		<pubDate>Mon, 22 Feb 2010 14:26:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-18934</guid>
		<description>[...] http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blackli... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blackli.." rel="nofollow">http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blackli..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marc Perkel</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-12315</link>
		<dc:creator>Marc Perkel</dc:creator>
		<pubDate>Tue, 23 Dec 2008 08:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-12315</guid>
		<description>Thanks for the rules. Feel free to use my blacklist at blacklist.junkemailfilter.com. It seems to work rather well. It&#039;s my email blacklist but it&#039;s mostly spambots.</description>
		<content:encoded><![CDATA[<p>Thanks for the rules. Feel free to use my blacklist at blacklist.junkemailfilter.com. It seems to work rather well. It&#8217;s my email blacklist but it&#8217;s mostly spambots.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Victor Julien</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-11176</link>
		<dc:creator>Victor Julien</dc:creator>
		<pubDate>Fri, 04 Apr 2008 08:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-11176</guid>
		<description>The idea was to exactly match on the filenames, and not on anything else. I think if you replace REQUEST_URI by REQUEST_FILENAME it should still work. REQUEST_URI also includes the QUERY_STRING and thats probably why it didn&#039;t work for you...</description>
		<content:encoded><![CDATA[<p>The idea was to exactly match on the filenames, and not on anything else. I think if you replace REQUEST_URI by REQUEST_FILENAME it should still work. REQUEST_URI also includes the QUERY_STRING and thats probably why it didn&#8217;t work for you&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-11174</link>
		<dc:creator>Samuel</dc:creator>
		<pubDate>Thu, 03 Apr 2008 23:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-11174</guid>
		<description>When you write &quot;^/blog/wp-(comments-post&#124;trackback)\.php$&quot;, what is rationale for the final &quot;$&quot;? My rules doesn&#039;t match with my URIs if I write this final $. Without it, they work perfectly. Perhaps am I misunderstanding something?</description>
		<content:encoded><![CDATA[<p>When you write &#8220;^/blog/wp-(comments-post|trackback)\.php$&#8221;, what is rationale for the final &#8220;$&#8221;? My rules doesn&#8217;t match with my URIs if I write this final $. Without it, they work perfectly. Perhaps am I misunderstanding something?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Samuel</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-11172</link>
		<dc:creator>Samuel</dc:creator>
		<pubDate>Wed, 02 Apr 2008 23:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-11172</guid>
		<description>Thank you !!!!!!

Thank you indeed. The latest updated information about mod_security and blacklists I was finding on other websites dated from 2006 and was completely useless (links to lists that not exist, rules for mod_security 1, etc.).</description>
		<content:encoded><![CDATA[<p>Thank you !!!!!!</p>
<p>Thank you indeed. The latest updated information about mod_security and blacklists I was finding on other websites dated from 2006 and was completely useless (links to lists that not exist, rules for mod_security 1, etc.).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-11152</link>
		<dc:creator>Jens</dc:creator>
		<pubDate>Wed, 26 Mar 2008 03:11:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-11152</guid>
		<description>This works for me:

SecRule REQUEST_METHOD &quot;^((?:post&#124;head))$&quot; &quot;t:none,t:lowercase,log,chain,deny,msg:&#039;IP address that has abusable vulnerabilities: web.dnsbl.sorbs.net&#039;&quot;
SecRule REMOTE_ADDR &quot;@rbl web.dnsbl.sorbs.net&quot;</description>
		<content:encoded><![CDATA[<p>This works for me:</p>
<p>SecRule REQUEST_METHOD &#8220;^((?:post|head))$&#8221; &#8220;t:none,t:lowercase,log,chain,deny,msg:&#8217;IP address that has abusable vulnerabilities: web.dnsbl.sorbs.net&#8217;&#8221;<br />
SecRule REMOTE_ADDR &#8220;@rbl web.dnsbl.sorbs.net&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VictorJ</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-1695</link>
		<dc:creator>VictorJ</dc:creator>
		<pubDate>Fri, 23 Feb 2007 12:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-1695</guid>
		<description>Thank you for this explanation Ivan. I have changed the rules according to your suggestions and am now waiting for new commentspam attempts to occur. I will update the blog when I know more!</description>
		<content:encoded><![CDATA[<p>Thank you for this explanation Ivan. I have changed the rules according to your suggestions and am now waiting for new commentspam attempts to occur. I will update the blog when I know more!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Ristic</title>
		<link>http://www.inliniac.net/blog/2007/02/23/blocking-comment-spam-using-modsecurity-and-realtime-blacklists.html/comment-page-1#comment-1694</link>
		<dc:creator>Ivan Ristic</dc:creator>
		<pubDate>Fri, 23 Feb 2007 09:39:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.inliniac.net/blog/?p=64#comment-1694</guid>
		<description>About your attempt to only lookup IP addresses doing POST requests. The rules are correct. I am guessing you are having trouble because, unless rules are explicitly configured differently, default transformation functions from the context are applied to arguments (REQUEST_METHOD in this case) before the operator is run. By default ModSecurity will perform the following transformations: lowercase, replaceNulls, and compressWhitespace. So it&#039;s either those or the ones specified with SecDefaultAction. If my hunch is correct than the first rule is not matching because a lowercase version of REQUEST_METHOD (&quot;post&quot;) is being compared to &quot;^POST$&quot;. The solution is to add &quot;t:none&quot; to the list of actions of the first rule. This will cancel any transformation functions specified in the context.

On a similar note, your rules using REQUEST_URI are easy to evade if spammers send their requests to &quot;/blog//wp-comments-post.php&quot; (notice the two forward slashes). Again, this is because you are using the default transformations and they are not adequate for the job. Adding &quot;t:normalisePath&quot; to the list of actions fixes this problem.

I always recommend enabling the debug log at level 9, especially if you are just starting with ModSecurity. For example, this is how you would find out exactly how input data is transformed before the operators are applied. ModSecurity will log variable values after each transformation takes place.</description>
		<content:encoded><![CDATA[<p>About your attempt to only lookup IP addresses doing POST requests. The rules are correct. I am guessing you are having trouble because, unless rules are explicitly configured differently, default transformation functions from the context are applied to arguments (REQUEST_METHOD in this case) before the operator is run. By default ModSecurity will perform the following transformations: lowercase, replaceNulls, and compressWhitespace. So it&#8217;s either those or the ones specified with SecDefaultAction. If my hunch is correct than the first rule is not matching because a lowercase version of REQUEST_METHOD (&#8220;post&#8221;) is being compared to &#8220;^POST$&#8221;. The solution is to add &#8220;t:none&#8221; to the list of actions of the first rule. This will cancel any transformation functions specified in the context.</p>
<p>On a similar note, your rules using REQUEST_URI are easy to evade if spammers send their requests to &#8220;/blog//wp-comments-post.php&#8221; (notice the two forward slashes). Again, this is because you are using the default transformations and they are not adequate for the job. Adding &#8220;t:normalisePath&#8221; to the list of actions fixes this problem.</p>
<p>I always recommend enabling the debug log at level 9, especially if you are just starting with ModSecurity. For example, this is how you would find out exactly how input data is transformed before the operators are applied. ModSecurity will log variable values after each transformation takes place.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

