<?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>Parallel Interface</title>
	<atom:link href="http://www.paralint.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paralint.com/blog</link>
	<description>Programming security in Java and C++, one line at a time</description>
	<lastBuildDate>Thu, 26 Aug 2010 17:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Interdit de d&#233;sosser le logiciel Simple Comptable</title>
		<link>http://www.paralint.com/blog/2010/02/21/interdit-de-dsosser-le-logiciel-simple-comptable/</link>
		<comments>http://www.paralint.com/blog/2010/02/21/interdit-de-dsosser-le-logiciel-simple-comptable/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 04:08:03 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[En français]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2010/02/21/interdit-de-dsosser-le-logiciel-simple-comptable/</guid>
		<description><![CDATA[Je lis toujours les contrats de licence. Celui de Simple Comptable 2010 est particulier : il nous interdit de désosser le logiciel ! Après vérification, le terme “désosser” est bien celui qu’il faut utiliser pour désigner, en français, le reverse engineering. Malheureusement, je n’aurai peut-être pas l’occasion d’apprendre de nouveaux mots avec eux, puisque le [...]]]></description>
			<content:encoded><![CDATA[<p>Je lis toujours les contrats de licence. Celui de Simple Comptable 2010 est particulier : il nous interdit de <strong>désosser</strong> le logiciel !</p>
<p style="text-align: center;"><img class="aligncenter" style="display: inline;" title="Désosser Simple Comptable est interdit !" src="http://www.paralint.com/blog/wp-content/uploads/2010/02/desosser.png" alt="Désosser Simple Comptable est interdit !" width="514" height="444" /></p>
<p>Après <a href="http://www.granddictionnaire.com/">vérification</a>, le terme “désosser” est bien celui qu’il faut utiliser pour désigner, en français, le <em>reverse engineering</em>. Malheureusement, je n’aurai peut-être pas l’occasion d’apprendre de nouveaux mots avec eux, puisque le contrat de license stipule aussi ceci :</p>
<blockquote><p>16.6    Québec :   En regard du Québec, les parties déclarent par les présentes qu&#8217;elles exigent que cette entente et tous les documents afférents, soit pour le présent ou l&#8217;avenir, soient rédigés en anglais seulement.</p></blockquote>
<p>Too bad !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2010/02/21/interdit-de-dsosser-le-logiciel-simple-comptable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Notifu now supports silent operation</title>
		<link>http://www.paralint.com/blog/2010/02/16/notifu-now-supports-silent-operation/</link>
		<comments>http://www.paralint.com/blog/2010/02/16/notifu-now-supports-silent-operation/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 02:32:05 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2010/02/16/notifu-now-supports-silent-operation/</guid>
		<description><![CDATA[I just release a small update to Notifu. You can now display a pop-up without playing the system event sound (-q). Notifu also supports the Windows 7 quiet time. By default, pop-up will not be displayed in the first hour or so after the very first logon. I you must display a pop, you can [...]]]></description>
			<content:encoded><![CDATA[<p>I just release a small update to Notifu. You can now display a pop-up without playing the system event sound (-q). Notifu also supports the Windows 7 quiet time. By default, pop-up will not be displayed in the first hour or so after the very first logon. I you must display a pop, you can ignore the quiet time with the –w flag.</p>
<p>Go ahead and <a href="/projects/notifu/index.html#Download">download the new version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2010/02/16/notifu-now-supports-silent-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aucun reboots computer, unless a debugger is present</title>
		<link>http://www.paralint.com/blog/2009/11/25/aucun-reboots-computer-unless-a-debugger-is-present/</link>
		<comments>http://www.paralint.com/blog/2009/11/25/aucun-reboots-computer-unless-a-debugger-is-present/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 05:02:53 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2009/11/25/aucun-reboots-computer-unless-a-debugger-is-present/</guid>
		<description><![CDATA[There is a bug in my replacement GINA. I left a call to DebugBreak in my initialisation code. When Winlogon can&#8217;t load a GINA, the server reboots. I run all my tests in virtual machines attached to a remote kernel debugger. I had set up a rule to ignore this first hardcoded breakpoint. In a [...]]]></description>
			<content:encoded><![CDATA[<p>There is a bug in my replacement GINA. I left a call to <a href="http://msdn.microsoft.com/en-us/library/ms679297%28VS.85%29.aspx">DebugBreak</a> in my <a href="http://src.paralint.com/diff.php?repname=Aucun&amp;path=%2Ftrunk%2FGinaHook.c&amp;rev=0">initialisation code</a>.</p>
<p>When Winlogon can&#8217;t load a GINA, the server reboots. I run all my tests in virtual machines attached to a remote kernel debugger. I had set up a rule to ignore this first hardcoded breakpoint. In a regular environment, Winlogon did the only sensible thing to do when it received that unhandled exception : terminate. </p>
<p>That triggered the reboot process.</p>
<p>Please use version 1.4.5. I have updated the <a href="http://www.paralint.com/projects/aucun/">project page</a>, <a href="http://www.paralint.com/projects/aucun/dl/aucun-1.4.5.zip">binary</a> and <a href="http://www.paralint.com/projects/aucun/dl/aucun-src-1.4.5.zip">source code snapshot</a>. I also <a href="http://src.paralint.com/diff.php?repname=Aucun&amp;path=%2Ftrunk%2Fmakezip.cmd&amp;rev=171">updated my build script</a> so that it never happens again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/11/25/aucun-reboots-computer-unless-a-debugger-is-present/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aucun now supports 64 bits versions of Windows</title>
		<link>http://www.paralint.com/blog/2009/09/09/aucun-now-supports-64-bits-versions-of-windows/</link>
		<comments>http://www.paralint.com/blog/2009/09/09/aucun-now-supports-64-bits-versions-of-windows/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 02:16:20 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=128</guid>
		<description><![CDATA[Again with much help from user Abdul Khaliq, I can now offert you a 64 bits version of my replacement GINA, called aucun64.dll. This release also comes with a important bug fix. You can donwload it here.]]></description>
			<content:encoded><![CDATA[<p>Again with much help from user Abdul Khaliq, I can now offert you a 64 bits version of my replacement GINA, called aucun64.dll.</p>
<p>This release also comes with a important bug fix. You can <a href="http://www.paralint.com/projects/aucun/#Download">donwload it here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/09/09/aucun-now-supports-64-bits-versions-of-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FIX : Changing password with Aucun crashes winlogon</title>
		<link>http://www.paralint.com/blog/2009/09/09/fix-changing-password-with-aucun-crashes-winlogon/</link>
		<comments>http://www.paralint.com/blog/2009/09/09/fix-changing-password-with-aucun-crashes-winlogon/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 02:11:20 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=124</guid>
		<description><![CDATA[There is an important update to aucun that fixes a bug in the dialog procedure hooking code. If you have Aucun version 1.4.2 or earlier, you will experiment the following bug : Login to the pc. Hit CTRL-alt-Del to get to the Windows Security Screen Click &#8220;Change Password&#8221; Click &#8220;Cancel&#8221; to get back to the [...]]]></description>
			<content:encoded><![CDATA[<p>There is an important update to aucun that fixes a bug in the dialog procedure hooking code. If you have Aucun version 1.4.2 or earlier, you will experiment the following bug :</p>
<ol>
<li>Login to the pc.</li>
<li>Hit CTRL-alt-Del to get to the Windows Security Screen</li>
<li>Click &#8220;Change Password&#8221;</li>
<li>Click &#8220;Cancel&#8221; to get back to the main Windows Security Screen.</li>
<li>Click &#8220;Lock workstation&#8221;  At this point, the workstation won&#8217;t lock.</li>
<li>Click &#8220;Cancel&#8221;.</li>
</ol>
<p>At this point Winlogon will crash and the pc will reboot. There are other ways to make the computer crash because of the same bug.</p>
<p>Please update to <a href="http://www.paralint.com/projects/aucun/#Download">version 1.4.3</a>.</p>
<p>Many thanks to <span><span>Abdul Khaliq for helping me test and debug this release !</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/09/09/fix-changing-password-with-aucun-crashes-winlogon/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Attaque mathématique des codes Bixi (vélo libre-service)</title>
		<link>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/</link>
		<comments>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 14:30:12 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[En français]]></category>
		<category><![CDATA[Life (the real one)]]></category>
		<category><![CDATA[Math]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=119</guid>
		<description><![CDATA[J&#8217;étais au centre ville aujourd&#8217;hui et j&#8217;avais affaire pas très loin. Au lieu d&#8217;utiliser le métro, j&#8217;ai loué un Bixi, vélo en libre service. J&#8217;ai été surpris de constater que les codes Bixi ne comporte que 3 chiffres, sur 5 caractères, soit 3^5=243 codes possibles. Ça semble bien peu, mais si les codes ne sont [...]]]></description>
			<content:encoded><![CDATA[<p>J&#8217;étais au centre ville aujourd&#8217;hui et j&#8217;avais affaire pas très loin. Au lieu d&#8217;utiliser le métro, j&#8217;ai loué un Bixi, vélo en libre service. J&#8217;ai été surpris de constater que les codes Bixi ne comporte que 3 chiffres, sur 5 caractères, soit 3^5=243 codes possibles.</p>
<div id="attachment_120" class="wp-caption aligncenter" style="width: 427px"><img class="size-full wp-image-120" title="bixi21213" src="http://www.paralint.com/blog/wp-content/uploads/2009/06/bixi21213.jpg" alt="Billet bixi portant le code 21213" width="417" height="283" /><p class="wp-caption-text">Billet bixi portant le code 21213</p></div>
<p>Ça semble bien peu, mais si les codes ne sont utilisables qu&#8217;au point de service où ils sont émis, et pour une durée limitée, avec peut-être une détection d&#8217;attaque en force brute, on devrais pouvoir dormir tranquille&#8230;</p>
<p>Je me suis rappellé une attaque mathémaitque sur des codes de ce genre. Avec une location de 24 heures à 5$, on peut prendre et remettre le vélo plusieurs fois, histoire de tester la théorie&#8230; Bonne nouvelle, Bixi n&#8217;est pas vulnérable. Mais j&#8217;écris quand même la démarche, c&#8217;est trop rare qu&#8217;on a l&#8217;occasion d&#8217;utiliser des math pour (tenter de) contourner les règles d&#8217;un système.</p>
<p><span id="more-119"></span>La vulnérabilité apparais lorsque l&#8217;implémentation utilise une fenêtre coulissante pour vérifier les codes entrés. Cette attaque a déjà été utilisée pour <a href="http://everything2.com/index.pl?node_id=1520430">dévérouiller une porte de voiture</a> à combinaison.</p>
<p>Pour les Bixi, les chiffres du codes de dévérouillage de vélo peuvent être 1, 2 ou 3. Le dictionnaire des valeurs possibles à une taille k=3. Il faut entrer 5 chiffres, on dit que n=5. Avec ces variables, une fenêtre coulissante fonctionne comme ceci :</p>
<ol>
<li>On entre n chiffres (par exemple 12222)</li>
<li>Ce ne sera pas le bon code</li>
<li>On entre un chiffre supplémentaire, disons 3</li>
<li>Pour accomoder le chiffre supplémentaire, l&#8217;implémentation décale les chiffres déjà entrés pour faire de la place. Dans notre exemple, c&#8217;est le 1 qui disparaît à gauche à la faveur du 3 à droite.</li>
<li>L&#8217;implémentation vérifie le nouveau code dans la fenêtre, soit 22223.</li>
</ol>
<p>On réussi ainsi à tester 2 codes en ne saisissant que 6 chiffres, au lieu de 10. Et ainsi de suite, à chaque fois qu&#8217;on ajoute un seul chiffre, on se trouve à tester un nouveau code de 5 chiffres. La première étape ne sert qu&#8217;à initialiser le processus, sans affecter la complexité de l&#8217;attaque.</p>
<p>C&#8217;est une vielle idée. Un mathématicien Hollandais, Nicolaas Govert de Bruijn, a formalisé une <a href="http://en.wikipedia.org/wiki/De_Bruijn_sequence">séquence de chiffres</a> dans laquelle n&#8217;importe quelle séquence de n chiffres n&#8217;apparait qu&#8217;une seule fois. Autrement dit, si vous <a href="http://www.hakank.org/comb/debruijn.cgi?k=3&amp;n=5">générez une séquence de Bruijn avec k=3 et n=5</a> (les codes Bixi) et que vous y cherchez votre code Bixi, il n&#8217;y sera qu&#8217;une seule fois. C&#8217;est la façon la plus optimale d&#8217;attaquer un système de codes comme celui de Bruijn.</p>
<p>Voici la séquence dans l&#8217;ordre. Elle se lit de gauche à droite, de haut en bas. 1111121111311&#8230;&#8230; Le 1111 de la fin de la séquence est en fait les premiers chiffres qui se répêtent.</p>
<pre>11111 21111 31112 21112 31113 21113 31121 21121 31122 21122</pre>
<pre>31123 21123 31131 21131 31132 21132 31133 21133 31212 21212</pre>
<pre>31213 21213 31221 31222 21222 31223 21223 31231 31232 21232</pre>
<pre>31233 21233 31313 21313 31322 21322 31323 21323 31332 21332</pre>
<pre>31333 21333 32222 23222 33223 23223 33232 33233 33311 11</pre>
<p>La protection contre cette attaque est heureusement toute simple : à l&#8217;étape 2, effacer tous les chiffres et en redemander n autres. C&#8217;est ce qu&#8217;on fait les designers de Bixi. L&#8217;histoire ne dit pas s&#8217;ils connaissaient l&#8217;attaque, ou s&#8217;ils ont été chanceux&#8230; Au moins il pourrons dire qu&#8217;il m&#8217;ont fais marcher et pédaler !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/06/17/attaque-mathematique-des-codes-bixi-velo-libre-service/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Notifu 1.5 supports IUserNotification2 new result codes</title>
		<link>http://www.paralint.com/blog/2009/06/09/notifu-15-supports-iusernotification2-new-result-codes/</link>
		<comments>http://www.paralint.com/blog/2009/06/09/notifu-15-supports-iusernotification2-new-result-codes/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 01:09:39 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Updates]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/2009/06/09/notifu-15-supports-iusernotification2-new-result-codes/</guid>
		<description><![CDATA[I updated my Notifu utility to use the new IUserNotification2 interface introduced in Vista. It allows to detect a left or right click on the icon in the system notification area. If you run Windows XP, behaviour is unchanged. On Vista, you can also revert to the old interface by adding the /xp switch. I [...]]]></description>
			<content:encoded><![CDATA[<p>I updated my Notifu utility to use the new IUserNotification2 interface introduced in Vista. It allows to detect a left or right click on the icon in the system notification area. If you run Windows XP, behaviour is unchanged.</p>
<p>On Vista, you can also revert to the old interface by adding the /xp switch.</p>
<p>I am also investigating a timeout problem. In short, the timeout is not honoured if the user is doing something. A system default is used. On my Windows XP SP2 and Vista Business SP1, it is 10 seconds. Some users report shorter times than that (3 seconds).</p>
<p>You can <a href="http://www.paralint.com/projects/notifu/download.html">download it here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/06/09/notifu-15-supports-iusernotification2-new-result-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Porting a custom Gina to a Credential provider</title>
		<link>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/</link>
		<comments>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 02:27:36 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=108</guid>
		<description><![CDATA[Making a replacement Gina behave like a Credential Provider (not the other way around) looks like the ticket to have a single source solution to a Gina and Credential Provider.]]></description>
			<content:encoded><![CDATA[<p>I am still amazed by the popularity of <a title="Any user can unlock now with this replacement Gina" href="/projects/aucun/">my replacement Gina</a> (it allows any user to unlock). Most users are quite happy using it with Windows XP and Server 2003, but I do get the occasionnal request for a Vista port. I am looking forward to doing it, but there are important desing changes that I must work with. I think I found a way to have a single source solution Gina and Credential Provider, with a clean architecture on any Windows version.</p>
<p><span id="more-108"></span>Credential Providers cannot make an authentication decision. They only collect credentials. The approach I took in &#8220;Aucun&#8221; is that the Gina actually makes the authentication decision. That will not work under the new Credential provider architecture.</p>
<p>When I started looking to port my Gina to a Credential Provider, I first though of saving the initial credentials (when the first user logs on), then check any other user&#8217;s credential in my own Credential Provider, and if all is good, replay the initial credentials.</p>
<p>That bothered on many grounds :</p>
<ul>
<li>There will be a unlock event logged to the initial user, although that user never unlocked the workstation</li>
<li>I don&#8217;t like saving passwords, even to encrypted memory</li>
<li>That architecture didn&#8217;t look like something that would last</li>
</ul>
<p>Looking deeper into the Credential Provider interface, I saw that there is one decision a Credential Provider <span style="text-decoration: underline;">can</span> make. It can select what Authentication Package will honor the logon request (or unlock request, in my case). That takes place in my (your) <a href="http://msdn.microsoft.com/en-us/library/bb776026(VS.85).aspx">ICredentialProviderCredential::GetSerialisation</a>, by setting the ulAuthenticationPackage field of the <a href="http://msdn.microsoft.com/en-us/library/bb773242(VS.85).aspx">CREDENTIAL_PROVIDER_CREDENTIAL_SERIALIZATION</a> structure.</p>
<p>So I believe the right way of doing this is to have two components :</p>
<ol>
<li>An authentication package that implements the unlock policy (any user can unlock, depending on group membership).</li>
<li>A credential provider that collects credentials (and while you&#8217;re at it, the session you want to unlock) and instruct winlogon to forward them the &#8220;unlock&#8221; authentication package.</li>
</ol>
<p>That architecture fixes all three points above. And as a bonus, I can greatly simplify my existing Gina by merely collecting the credentials and forward them to the same authentication package. No need to hook dialog procedures and sending magic, reversed engineered constants to winlogon. In short, instead of making the Credential Provider look like a Gina, I make the Gina behave like a Credential Provider.</p>
<p>Authentication packages are the same under Vista and XP, that&#8217;s a good thing. But to <a href="http://blogs.msdn.com/alejacma/archive/2007/11/13/how-to-debug-lsass-exe-process.aspx">debug them</a>, you need the scary kernel remote debugging tools. You also need to reboot every time you mess up. But I have a working authentication package from CVS NT code source, and another called <a href="http://www.cse.unsw.edu.au/~matthewc/">YPAuth</a> (YP means yellow pages, the <a href="http://en.wikipedia.org/wiki/Network_Information_Service">old name of NIS</a>). None of them support the unlock scenario, though&#8230;</p>
<p>Stay tuned !</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/24/porting-a-custom-gina-to-a-credential-provider/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Segmentation example in a CAPTCHA</title>
		<link>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/</link>
		<comments>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:34:36 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[Other technical]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=99</guid>
		<description><![CDATA[From time to time, I come across an application whose designers need &#8211; or think they need &#8211; a CAPTCHA. I stay convinced that CAPTCHA are to be avoided. This post just goes to show the effect of segmentation on optical character recognition (OCR). If you read about artificial intelligence and character recognition, you will [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time, I come across an application whose designers need &#8211; or think they need &#8211; a CAPTCHA. I stay convinced that CAPTCHA are to be avoided. This post just goes to show the effect of segmentation on optical character recognition (OCR).<br id="dqwm" /> <br id="dqwm0" /> If you read about artificial intelligence and character recognition, you will hear that there are references to segmentation. In short, segmentation is separating the letters from each other, before trying to guess what letters are there.<br id="sw8i" /> <br id="sw8i0" /> Segmentation is the &#8220;hard&#8221; part in solving a text based CAPTCHA, background noise and colors are the easy part. As a rule of thumb, if the letters of your CAPTCHA do not touch each other, your CAPTCHA is weak.<br id="h.ck" /></p>
<p>Here is an example. With a stock build of <a id="wsc:" title="GNU Ocrad homepage" href="http://www.gnu.org/software/ocrad/ocrad.html">ocrad</a>, I have tried to get the text from the same image, with one or two lines over the text.<br id="wlf85" /></p>
<div id="wlf86">
<table id="j3z3" class="zeroBorder" border="0" cellspacing="0" cellpadding="3" width="100%" bgcolor="#ffffff">
<tbody id="wlf87">
<tr id="wlf88">
<td id="wlf89" width="33%"><img class="aligncenter size-full wp-image-100" title="banane" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane.gif" alt="banane" width="175" height="66" /></td>
<td id="wlf811" width="33%"><img class="aligncenter size-full wp-image-102" title="banane-11" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane-11.gif" alt="banane-11" width="175" height="66" /><br id="wlf813" /></td>
<td id="wlf814" width="33%"><img class="aligncenter size-full wp-image-104" title="banane-21" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/banane-21.gif" alt="banane-21" width="175" height="66" /><br id="wlf816" /></td>
</tr>
<tr id="wlf817">
<td id="wlf818" width="33%">$ ocrad -v banane.pbm<br id="zjxe" /> processing file &#8216;banane.pbm&#8217;<br id="wq54" /> file type is P4<br id="wlf819" /> file size is 175w x 66h<br id="wlf820" /> number of text blocks = 1<br id="wlf821" /> <strong>BANANE</strong><br id="wlf824" /></td>
<td id="wlf825" width="33%">$ ocrad -v banane-1.pbm<br id="zjxe0" /> processing file &#8216;banane-1.pbm&#8217;<br id="wq540" /> file type is P4<br id="wlf826" /> file size is 175w x 66h<br id="wlf827" /> number of text blocks = 1<br id="wlf828" /> <strong>_ANE</strong><br id="wlf831" /></td>
<td id="wlf832" width="33%">$ ocrad -v banane-2.pbm<br id="zjxe1" /> processing file `banane-2.pbm&#8217;<br id="wq541" /> file type is P4<br id="wlf833" /> file size is 175w x 66h<br id="wlf834" /> number of text blocks = 1<br id="wlf835" /> <br id="wlf838" /></td>
</tr>
</tbody>
</table>
</div>
<p>The text goes from 100% to 0% percent recognition just by adding two lines ! The word BANANE, then _ANE and after that &#8230; nothing !</p>
<p>This CAPTCHA is by no means robust, and I stay convinced that all forms of CAPTCHA are to be avoided. This example just goes to show the effect of segmentation on optical character recognition (OCR).<br id="cen70" /> <br id="colh" /> After all, artificial intelligence is a field of expertise you can spend your life learning. Just like cryptography, it should not be done by amateurs. But unlike cryptography, an AI challenge has no key. <a id="x3.7" title="Analysis of the breaking of Microsoft Live's CAPTCHA" href="http://www.websense.com/securitylabs/blog/blog.php?BlogID=171">Microsoft</a> and <a id="wfix" title="An analysis of the breaking of Google's CAPTCHA" href="http://www.websense.com/securitylabs/blog/blog.php?BlogID=174" target="_blank">Google</a>&#8216;s CAPTCHA have been broken. Your CAPTCHA will be broken too, it someones takes a shot at it. It is a matter of time, and there is a shorter way than brute force.<br id="accc" /> <br id="accc0" /> If you think you must put a CAPTCHA, start thinking about plan B right away&#8230; Using an image based CAPTCHA is not good either (post in French).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/09/segmentation-example-in-a-captcha/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ne jouez pas avec un CAPTCHA sans la surveillance d&#8217;un expert</title>
		<link>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/</link>
		<comments>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 20:22:52 +0000</pubDate>
		<dc:creator>Guillaume</dc:creator>
				<category><![CDATA[En français]]></category>
		<category><![CDATA[Other technical]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.paralint.com/blog/?p=91</guid>
		<description><![CDATA[Je suis tombé sur cette implémentation d&#8217;un CAPTCHA. Je déteste les CAPTCHA. C&#8217;est comme de la mauvaise crypto. Fondamentalement, le CAPTCHA ne fonctionne pas. La tâche d&#8217;analyse (le test de Turing) est complexe juste parce que personne ne s&#8217;est encore donné la peine d&#8217;écrire le code pour réussir. C&#8217;est aussi vrai pour la crypto classique, [...]]]></description>
			<content:encoded><![CDATA[<p>Je suis tombé sur cette implémentation d&#8217;un CAPTCHA.</p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_92" class="wp-caption aligncenter" style="width: 403px;">
<dt class="wp-caption-dt"><img class="size-full wp-image-92" title="Lousy captcha" src="http://www.paralint.com/blog/wp-content/uploads/2009/02/captcha.jpg" alt="Must select 3 hamburgers in this lousy captcha " width="393" height="265" /></dt>
</dl>
</div>
<p>Je déteste les CAPTCHA. C&#8217;est comme de la mauvaise crypto.</p>
<p>Fondamentalement, le CAPTCHA ne fonctionne pas. La tâche d&#8217;analyse (le test de Turing) est complexe juste parce que personne ne s&#8217;est encore donné la peine d&#8217;écrire le code pour réussir. C&#8217;est aussi vrai pour la crypto classique, mais ces mathématiques sont soumises à des études formelles et continues. On sait à quoi s&#8217;en tenir : avec de la bonne crypto, on déplace le problème ailleurs (la gestion de clé, souvent). En intelligence artificielle, la segmentation est difficile, mais l&#8217;ordre de grandeur d&#8217;effort est à la portée des botnets actuels.</p>
<p><span id="more-91"></span>Trouver un éléphant ou un burger est faisable. Google ne trouve-t-il pas déjà les visages sur les photos ?  La faiblesse de ce CAPTCHA, en particulier, c&#8217;est l&#8217;apprentissage (en supposant que l&#8217;implémentation est bonne). La mémoire d&#8217;un ordinateur est infinie. Il est possible d&#8217;avoir la base de données complète des images en relativement peu de temps. D&#8217;identifier ce qui s&#8217;y trouve et automatiser le tout. Bien sûr, il ne faut pas que l&#8217;image soit déjà dans l&#8217;index Google&#8230; Autre faiblesse, on sait toujours d&#8217;avance combien il y a de (chat-chien-burger-bébé-éléphant). Ça aide à prendre une décision automatisée.</p>
<p>Les attaques sur les CAPTCHA de Microsoft et Google a montré que l&#8217;analyse de CAPTCHA n&#8217;a pas un taux de succès de 100 %. Un petit pourcentage, multiplié par un bon botnet, ça fait beaucoup de captcha résolus!</p>
<p>On n&#8217;a qu&#8217;à ajouter de nouvelles images, non? Oui, mais combien coûtera toute cette mécanique, en développement mais surtout en entretien? Quel est le coût réel d&#8217;une utilisation abusive du service? Combien coutera l&#8217;analyse préalable des images, le classement en mots clés, etc.? On m&#8217;a demandé de compter 3 bébés, mais une image en contenait deux, faut-il filtrer ces images-là aussi?</p>
<p>Mais surtout, l&#8217;aspect économique de la sécurité est complètement évacué. Ce CAPTCHA est sur une page qui demande un numéro de carte de crédit, mais pas sur la page qui permet d&#8217;utiliser le service une seule fois, gratuitement.  Et c&#8217;est sans compter qu&#8217;une <a href="http://decapcher.com">ferme de Turing</a> coute 8 $ pour 4000 CAPTCHA résolus. Combien coûte un client légitime dégoûté par toutes ces précautions?</p>
<p>Ce CAPTCHA est l&#8217;œuvre d&#8217;amateurs. Et j&#8217;ai même pas regardé l&#8217;implémentation des cookies, session, etc.  En bref, implémenter correctement ce CAPTCHA par image coûte beaucoup trop cher.</p>
<p>Si j&#8217;étais forcé d&#8217;utiliser un CAPTCHA, j&#8217;utiliserais un simple encodage javascript des champs du formulaire, variable dans le temps, peut-être avec un <a href="http://hashcash.org">hashcash</a> en javascript aussi, et vraiment accolé au pied du mur, j&#8217;essaierais <a href="http://recaptcha.net">recaptcha</a>. L&#8217;idée est de transformer tes utilisateurs en ta propre ferme de Turing. Pas fou!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paralint.com/blog/2009/02/06/ne-jouez-pas-avec-un-captcha-sans-la-surveillance-dun-expert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
