<?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>Fooling Around &#187; captcha</title>
	<atom:link href="http://alax.info/blog/tag/captcha/feed" rel="self" type="application/rss+xml" />
	<link>http://alax.info/blog</link>
	<description>Software Production Line</description>
	<lastBuildDate>Tue, 03 Aug 2010 09:48:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>An easy tweak with PHPBB forums to avoid automated registration of spambot users</title>
		<link>http://alax.info/blog/906</link>
		<comments>http://alax.info/blog/906#comments</comments>
		<pubDate>Fri, 17 Apr 2009 17:10:54 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[bot]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[forum]]></category>
		<category><![CDATA[OCR]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpbb]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://alax.info/blog/?p=906</guid>
		<description><![CDATA[Spammers  finally reached PHPBB version 3 &#8220;Olympus&#8221; default CAPTCHA automated OCR task in their development schedule and recently started registering bot users passing the provided CAPTCHA confirmation code.

Luckily to them, PHPBB3 default CAPTCHA code is ridiculously easy to OCR, os basically this was rather expected. It does not however mean that there is no way [...]]]></description>
			<content:encoded><![CDATA[<p>Spammers  finally reached <a href="http://www.phpbb.com/downloads/olympus.php">PHPBB version 3 &#8220;Olympus&#8221;</a> default <a href="http://en.wikipedia.org/wiki/Captcha">CAPTCHA</a> automated <a href="http://en.wikipedia.org/wiki/Optical_character_recognition">OCR</a> task in their development schedule and recently started registering bot users passing the provided CAPTCHA confirmation code.</p>
<p><img class="alignnone size-full wp-image-907" title="PHPBB3 CAPTCHA Sample" src="http://alax.info/blog/wp-content/uploads/2009/04/17-captcha.jpg" alt="PHPBB3 CAPTCHA Sample" width="320" height="50" /></p>
<p>Luckily to them, PHPBB3 default CAPTCHA code is ridiculously easy to OCR, os basically this was rather expected. It does not however mean that there is no way to effectively stop automated registrations without spending too much time on forum engine update.</p>
<p>Automated registration spider sends HTTP POST with the code it OCR&#8217;red from the image and we can leave the same code querstion in place and just ask the interactive user to type some extra information into input field. For example, it is possible to instruct him/her to type an extra asterisk before the code, so that the following is expected to be typed in: *25K9RGS. This makes the only thing important: to put a proper not for the user so that he/she is aware that he needs this character to be also entered. PHP code update is relatively simple:</p>
<p><strong>includes\ucp\ucp_register.php</strong>, near line 235:</p>
<pre><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #a65700;">&lt;?php</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #696969;">////////////////////////////////</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #696969;">// NOTE: Checking extra asterisk in front of CAPCTCHA code to prevent from automated CAPTCHA readers</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$confirm_code</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$data</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">[</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #0000e6;">'confirm_code'</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">]</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #800080;">;</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$confirm_code</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">(</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #400000;">substr</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">(</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$confirm_code</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">,</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #008c00;">0</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">,</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #008c00;">1</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">)</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #0000e6;">"*"</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">)</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #800080;">?</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #400000;">substr</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">(</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$confirm_code</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">,</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #008c00;">1</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">)</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #800080;">:</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #0000e6;">""</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #800080;">;</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #800000; font-weight: bold;">if</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">(</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #400000;">strcasecmp</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">(</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$row</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">[</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #0000e6;">'code'</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">]</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">,</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;">$confirm_code</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">)</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">=</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #000000;"> </span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #008c00;">0</span><span style="background: #ffffe8 none repeat scroll 0% 0%; color: #808030;">)</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #696969;">// original:</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #696969;">//if (strcasecmp($row['code'], $data['confirm_code']) === 0)</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #696969;">////////////////////////////////</span>
<span style="background: #ffffe8 none repeat scroll 0% 0%; color: #a65700;">?&gt;</span></pre>
<p>then default style (e.g. subsilver2) HTML tempalte needs to have an extra character (9 instead of 8) space in the input field, <strong>styles\subsilver2\template\ucp_register.html</strong>, line 92:</p>
<pre><span style="color: #a65700;">&lt;</span><span style="color: #800000; font-weight: bold;">td</span><span style="color: #274796;"> </span><span style="color: #074726;">class</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"row2"</span><span style="color: #a65700;">&gt;</span><span style="color: #a65700;">&lt;</span><span style="color: #800000; font-weight: bold;">input</span><span style="color: #274796;"> </span><span style="color: #074726;">class</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"post"</span><span style="color: #274796;"> </span><span style="color: #074726;">type</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"text"</span><span style="color: #274796;"> </span><span style="color: #074726;">name</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"confirm_code"</span><span style="color: #274796;"> </span><span style="color: #074726;">size</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"9"</span><span style="color: #274796;"> </span><span style="color: #074726;">maxlength</span><span style="color: #808030;">=</span><span style="color: #0000e6;">"9"</span><span style="color: #274796;"> </span><span style="color: #a65700;">/&gt;</span><span style="color: #a65700;">&lt;/</span><span style="color: #800000; font-weight: bold;">td</span><span style="color: #a65700;">&gt;</span></pre>
<p>And finally the CONFIRM_CODE_EXPLAIN comment needs to be updated to instruct user to type the extra asterisk in <strong>language\en\common.php</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/906/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automated CAPTCHA reader</title>
		<link>http://alax.info/blog/348</link>
		<comments>http://alax.info/blog/348#comments</comments>
		<pubDate>Sun, 21 Oct 2007 15:40:04 +0000</pubDate>
		<dc:creator>Roman</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[captcha]]></category>
		<category><![CDATA[OCR]]></category>

		<guid isPermaLink="false">http://alax.info/blog/348</guid>
		<description><![CDATA[I recently came across a discussion about automated reader of CAPTCHA images. A guy told they sold an implementation of such a reader for $100K (in total; certain initial payment followed by $5K/mo payments). While this might appear to be an exaggeration, I recalled another interview given by another OCR fellow who mentioed a simiar [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across a discussion about automated reader of <a href="http://en.wikipedia.org/wiki/Captcha">CAPTCHA</a> images. A guy told they sold an implementation of such a reader for $100K (in total; certain initial payment followed by $5K/mo payments). While this might appear to be an exaggeration, I recalled another interview given by another <a href="http://en.wikipedia.org/wiki/Optical_character_recognition">OCR</a> fellow who mentioed a simiar offer he declined for reasons he chose to not specify.</p>
<p>I am afraid I am losing something here, as CAPTCHA reader questions in in most cases not an issue as soon as it is required to decode particular type of images. Image prefiltering followed by OCR will pass through 95% of the protection implementations around, one need only an experienced software engineer and a desire to break the protection complemented by a modest budget. Moreover, CAPTCHA code can be changed anytime so the game is actually of a different nature: one makes it harder to decode in automated fashion and the other tries to get even. I would rather say that the task for the former guy is more difficult (as soon as we still expect web user to be able to recognize the code).</p>
]]></content:encoded>
			<wfw:commentRss>http://alax.info/blog/348/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
