Spam Busting in Community Server 2007 - Part 2
In the first post I gave an introduction and outlined eights spam rules to fight against spammers in Community Server 2007. In this second post I want to talk about other spam rules and using a few options in Subkismet to block spams.
Flood From IP
This spam rule lets you block posts from a specific IP in an interval and restrict them to a specific number of posts.
Recent Duplicate
This is a very helpful rule. It lets you block feedbacks with same content as recent feedbacks. Usually when spammers attack your site, send many posts with same content so using this rule you can assign points to new feedbacks that come with same content as recent feedbacks.
RegEx
the last spam rule is regular expression spam rule. You can use this spam rule to define some regular expressions that may match your spam feedbacks and assign a specific point to each match in a post. Using this spam rule depends on your personal experience if you can find a regular expression in your spam feedbacks. I couldn't find any pattern in my spam feedbacks yet.
Invisible CAPTCHA
Invisible CAPTCHA is a clever CAPTCHA control that is designed by Phil Haack and doesn't have some negative points about normal CAPTCHA controls. Actually it relies on the browser capabilities and the fact that spam bots are unable to evaluate JavaScript expressions. First let me describe how it works shortly then will show you how to port into Community Server 2007. It's one of best ways to block spams.
Spam bots can evaluate JavaScript codes and also web browsers with JavaScript disabled (this is very uncommon though). Invisible CAPTCHA is a control that uses JavaScript to disappear from browsers with JavaScript enabled (this can be considered equal to humans) and appear for spam bots and anything that can't parse JavaScript codes. The result is anyone with JavaScript disabled will see the CAPTCHA text and must enter the CAPTCHA value but others don't need to do this.
But how to port this control to Community Server 2007? Steps are pretty easy to follow.
First you need to drop the Subkismet DLL file to bin folder on your server then edit your post.aspx page for your blog theme to add the Invisible CAPTCHA functionality to it.
To do this, first you need to import the Subkismet namespace and register a tag prefix for your Invisible CAPTCHA control by adding two lines of codes to the header:
<%@ Import Namespace="Subkismet" %>
<%@ Register TagPrefix="sbk" Assembly="Subkismet" Namespace="Subkismet.Captcha" %>
The next step is to add the control tag to the page right before the submit button of your comment form. Note that the ValidationGroup property of your Invisible CAPTCHA control and submit button must be set to same value.
<sbk:InvisibleCaptcha id="commentValidator" runat="server"
ErrorMessage="Oops! You must be bad at math." Display="dynamic" ValidationGroup="CreateCommentForm" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="CreateCommentForm"
CssClass="button" />
I've already implemented this CAPTCHA control on my blog and it stopped my comment spams.
Honeypot CAPTCHA
The last way that I just point out is Honeypot CAPTCHA. Honeypot CAPTCHA is a new clever kind of CAPTCHA designed originally by Phil and is a part of Subkismet. I don't step in details about this CAPTCHA control but you can read more about it on Phil's blog and the way to implement is (it's not very straightforward) on Thommi's blog.
In these two post I talked about several ways to block spams. I think can reduce your spam feedbacks to almost zero posts per day by applying a combination of these options with good configurations. I didn't talk about normal image and sound CAPTCHA controls because in my honest opinion they're not good solutions at all.
[advertisement] Axosoft OnTime 2008 is four developer tools in one: bug tracking, project wiki, feature management, and help desk. It manages your development process so developers can focus on coding. Installed or Hosted – Free Single-user license -- Free 30-day team trial.
3 Comments : 10.07.07
#1
Dave Burke
10.13.2007 @ 8:42 AM