Really stopping blog spam - part 1

There's not a day that goes by without me receiving an email from a blog I posted to a few months back. Do these emails have any use? Are they full of new information? No. They are simply blog spam posts being sent to me.

Welcome to the latest front in the war on innocent people by spammers. Actually, this welcome is quite late in coming as the war has been on for a while now. It's just gotten worse as the blog spammers have gotten better with their technology.

There is not a single public form on the internet today that has not been scanned by a bot from a spammer. Their database of form fields and types is immense and their bots have gotten rather sophisticated. They can tell what's a name, what's an email address and what's a password in most cases despite being named different things. They can then use this information to post directly to the action page of the form with anything they want.

So now that i've sung their praise for technical ability, lets talk about how to stop them. I've come up with a few ways to do this and for the most part each works well...to a point.

The first way I'll talk about is one totally ignored by the ColdFusion community at large but is rather obvious once you think about it. Lets walk through the thoughts. A form spammer has to see a form to know what to post and where. If there's no form, there's no spam. Simple, right? But how can we have a form without a form? Maybe.....Flash?

Yes, ColdFusion has a great advantage over other languages in the fight against spam as we can create forms on the fly in flash. Forms that are in effect a flash movie and can not be seen as a form. No form, no spam.

An example of this can be found by clicking on any trackback url on Blog of Fusion. The form looks exactly like the one Raymond wrote (in XForms, actually) but has been changed into a Flash Form. Oh, I also changed the form field names because most form spammers only look at the form once but after that post directly to the action url. Changing the form fields prevents that. But as I stated, only to a point. What happens when I give the template out to everyone? All a form spammer has to do is look at the source code to see where to post to. Don't think they'll look at the source by eye rather than by bot? You don't know these people or the popularity of Raymond's blog package.

But I've got a solution for that as well which I'll talk about next.

For those who want to listen to this post, I've included an MP3 of it here: http://blogoffusion.com/enclosures/formspam1.mp3

Related Blog Entries

Comments
Doug's Gravatar I am eagerly awaiting a good anti-spam article that does not focus on Wordpress or Moveable type plugins or see the CAPTCHA as the end-all-be-all of spam prevention. I don't like relying on flash either but I've been wondering if you can add a flash form element into an HTML form that gets passed with the form struct still.

But as I add layers of spam protection to my custom site, I realize that different people spam different ways. The latest thing I did is hand out session-based UUIDs for each form and compare it to a salted hash of that UUID that is passed in via a form field and I STILL get spam. These people are actually visiting my site, probably auto-populating the fields with some toolbar or widget, and submitting. I'd love to hear some more ideas.
# Posted By Doug | 8/4/06 8:09 PM
Tom Chiverton's Gravatar I would think randomising form fields would help a lot (store what you called them in the users session), as would a hidden form field containing a per-request secret that has to be passed back to the post page (if enter comment page is separate to comment list, so much the better).
# Posted By Tom Chiverton | 8/7/06 8:58 AM
Teja's Gravatar One of my colleagues is currently trying this solution..... Assuming a bot won't take not more than 1 or 2 secs to post a form, one of the hidden fields in the form is the time when it is loaded, on the post action page, he checks if there is atleast 2 sec time difference. If the difference is less than 2 (or whatever you set it to), it is a bot, don't process further.. would this work?
# Posted By Teja | 8/7/06 10:52 AM
Ben Nadel's Gravatar Doug, I am not a huge fan of CAPTCHA either. I actually find it hard to read and mess up a lot with some crazy looking letters. I use an all HTML, CSS, ColdFusion technique that is proving effective so far. If you are interested, take a look at: http://www.bennadel.com/blog/197-How-I-Stop-Spamme...

It's not fool-proof, but it uses the idea that bots are not as visually smart as people. I am not exactly sure how bots "see" the site, but I am assuming that they rely more on the source code than on the rendered page. That is why I used CSS to leverage the rendered-view of the page for users.
# Posted By Ben Nadel | 8/7/06 2:13 PM
Doug's Gravatar I've used posting limits to flag messages for moderation, but allowing someone to post a message every one or two seconds allows them to spam your site pretty badly. 100 or 200 spams in 15 minutes is nowhere near that threshold, yet, when I experienced that sort of volume, it was pretty annoying. Especially when they came in spurts of those amounts throughout the day.

The CSS idea is interesting, and while accessibility is not always a concern on my private sites, it still bugs me that it's not really accessible (being entirely visually oriented and breaking down without CSS or CSS support). CAPTCHA is not only inaccessible buy annoying to sighted users, so maybe the CSS is the lesser of two evils. I used CAPTCHA for a short time and while the spam went down, the complaints from my visitors went up and legit commeting went down.

There's someone who wrote a plugin called Bad Behavior that is supposed to work wonders, but of course it is a blog plugin for TypePad or Wordpress or something.
# Posted By Doug | 8/7/06 4:19 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner
House of Fusion | ColdFusion Jobs @ House of Fusion | Fusion Authority