<?xml version="1.0" ?>
<rss version="2.0">
	<channel>
		<title>Keith's Weblog: Comments on &quot;Protect against automated form postings&quot;</title>
		<description>Keith's Weblog: Comments on &quot;Protect against automated form postings&quot;, posted on March 10, 2006</description>
		<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting</link>

		<category>Programming</category>
		<category>Security</category>
		<language>en-us</language>
		<image>
			<link>http://keithdevens.com/weblog</link>
			<title>Keith Devens .com</title>
			<url>http://keithdevens.com/images/kbd.gif</url>
		</image>

		<item>
			<title>by Joseph Scott</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9271</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9271</guid>
			<pubDate>Fri, 10 Mar 2006 21:38:54 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;&amp;quot;... it's unlikely anyone would go through the trouble.&amp;quot;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;They already have gone through the trouble.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Dennis Pallett</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9272</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9272</guid>
			<pubDate>Fri, 10 Mar 2006 21:43:08 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;This is quite a difficult problem, and although your solution counters it somewhat, it's far from foolproof. I can't think of any other good way though.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9273</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9273</guid>
			<pubDate>Fri, 10 Mar 2006 21:51:48 +0000</pubDate>
			<description>&lt;blockquote class=&quot;st-markup&quot;&gt;&lt;p&gt;They already have gone through the trouble.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p class=&quot;st-markup&quot;&gt;Well, I figured someone probably has... I just meant that someone would be less likely to go through the trouble for &lt;em&gt;my&lt;/em&gt; site (whereas if I was trying to implement something to, say, protect all WordPress blogs, all bets might be off).&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Hmm... what about &amp;quot;randomized&amp;quot; field names? Where each field name is a hash of the real field name + the timestamp or something. Would that do anything at all? It's more trouble than it's worth (though actually not that hard with my library); I'm just trying to think outside the box.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by mike macgirvin</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9274</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9274</guid>
			<pubDate>Sat, 11 Mar 2006 01:23:57 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;I thought long and hard about this problem recently, and my own conclusion was to just require moderation on &lt;em&gt;all&lt;/em&gt; comments. That's the best thing in the arsenal for small sites.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;I was going to generate a GUID on the form which would only allow one post per form view. But then I'd have to store the GUID and deal with time-to-live issues. Not too hard, but moderation seemed to accomplish the result on my small site without any extra code. Your idea seems to be a cut above the GUID solution by adding the IP check, but along the same principles.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;But it's relying a bit on obscurity, which I don't like to rely on. Once somebody knows the method, they can work around it. Hit the site a thousand times quickly to grab a collection of hidden variables and then post them back again just as quick. This would also get around your randomized field names. You can rate limit, but then spammer adds a sleep() call. It's an escalating war...  &lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9275</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9275</guid>
			<pubDate>Sat, 11 Mar 2006 02:19:08 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;I won't do full moderation because it's giving up too much, particularly for the tiny amount of comment spam I actually get. I'd &lt;em&gt;much&lt;/em&gt; rather have comment spam show up for a little while than make people wait to comment and kill any chance for spontaneous conversation.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;It'd also be weird if, say, four people responded saying the same thing, but didn't know that they said the same thing because all the comments were moderated. Then when I unmoderated them, the latter 3 would look strange.&lt;/p&gt;

&lt;blockquote class=&quot;st-markup&quot;&gt;&lt;p&gt;Once somebody knows the method, they can work around it.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p class=&quot;st-markup&quot;&gt;Yeah, but it takes them &lt;em&gt;work&lt;/em&gt; and that's the point. The harder you make it, the more people you'll weed out. You'll never weed out the most dedicated, or people who comment-spam by hand, but by raising the bar you'll lead people to go elsewhere. No one's going to waste time writing a form processor just for my site, for instance... their time is better spent hitting all the WordPress installs with default templates &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt;&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by mike macgirvin</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9276</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9276</guid>
			<pubDate>Sat, 11 Mar 2006 02:49:32 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;I understand your parameters... and given that environment, the hash should work fine. I was also recently contemplating a two-stage submit. I know several sites that have email verification for submissions (i.e. craigslist - which also uses captcha), but if you don't need that level of protection a two-click submit might do the trick. Hand back a hash when you get the form input, but wait until you get the hash back in a second POST to process it. This one has a much shorter lifespan than one where you have to wait for typing. Give them a minute or two to verify or toss it.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Just another outside-the-box approach.    &lt;/p&gt;

</description>
		</item>
		<item>
			<title>by mike macgirvin</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9279</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9279</guid>
			<pubDate>Sat, 11 Mar 2006 04:45:39 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Here's the word from WordPress&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;&lt;a href=&quot;http://codex.wordpress.org/Combat_Comment_Spam&quot;&gt;http://codex.wordpress.org/Combat_Comment_Spam&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://codex.wordpress.org/Plugins/Spam_Tools&quot;&gt;http://codex.wordpress.org/Plugins/Spam_Tools&lt;/a&gt;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;I found particularly interesting the 'hashcash' tool - which creates a randomized form element and then uses client-side javascript to compute the md5 of that element and send it back. That's pretty darn effective and relatively hassle free, unlike captcha and email verify. &lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9302</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9302</guid>
			<pubDate>Wed, 15 Mar 2006 03:26:01 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;This has been implemented. It only took a few lines of code, and it's now (automatically) on every form on my site &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt; View source if you'd like.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2006/Mar/10/automated-form-posting#comment9352</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/8007#comment9352</guid>
			<pubDate>Sat, 25 Mar 2006 20:02:32 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Just figured I'd update this... this technique has blocked &lt;em&gt;hundreds&lt;/em&gt; of comment spams. Success! &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Oh, but it also blocked one guy whose ISP uses NetCache NetApp... software that breaks the web.&lt;/p&gt;

</description>
		</item>
	</channel>
</rss>
