<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
<channel>
<title>CodeStore.net comments on "Challenge --- How Secure Is My CAPTCHA Logic?"</title>
<description>Replies to blog "Challenge --- How Secure Is My CAPTCHA Logic?" on codestore.net.</description>
<link>http://www.codestore.net/</link>
<lastBuildDate>Fri, 20 Jun 2008 07:52:00 +0100</lastBuildDate>
<atom:link href="http://www.codestore.net/store.nsf/blog.xml?Open=20080618" rel="self" type="application/rss+xml" />

<item>
	<title>Reply from Peter LaComb</title>
	<pubDate>Fri, 20 Jun 2008 07:52:00 +0100</pubDate>
	<author>Peter LaComb</author>
	<description><![CDATA[ 
		<p>Jake,</p>
		<p>Deleting after each request (and your other fix) certainly take care of that vector.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=4AE7D18E8ABED8C08525746E0041336B"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_4AE7D18E</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Fri, 20 Jun 2008 04:10:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>I just went to check what I said above was true and found a huge great hole in my logic. The code said</p>
		<p>captcha=view.getDocumentByKey(captchaID);</p>
		<p>If not captcha is nothing then</p>
		<p>'testing logic</p>
		<p>else 'Something wrong. Assume it's ok and continue?</p>
		<p>document.replaceItemValue("CaptchaPassed", "1")</p>
		<p>end if</p>
		<p>Spot the flaw? It's unlikely but if a hacker figured out unfound captcha documents led to a success they all they'd have to do is change the hidden CaptchID field in the form to "foo" and it would pass. Doh!</p>
		<p>I'll change the logic to set a flag for admin approval now.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=70393AC2244C638C8525746E002CE76E"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_70393AC2</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Fri, 20 Jun 2008 04:06:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>Hi Peter. Are you saying that the user could answer one Captcha -- remembering its CaptchaID -- and then change the code used in each subsequent ?OpenForm to the one they know the answer to? I guess that would be a hole they could hack. In my case the document is deleted each time it's guessed - either rightly or wrongly. The only ones that don't get deleted are the ones where uses request a ?OpenForm and never submit it. They are cleared up by a nightly process when they're more than a day old.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=97BD0DC64A4CF1808525746E002C7FAA"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_97BD0DC6</link>
</item><item>
	<title>Reply from Peter LaComb</title>
	<pubDate>Thu, 19 Jun 2008 17:29:00 +0100</pubDate>
	<author>Peter LaComb</author>
	<description><![CDATA[ 
		<p>I guess my question is from another angle - how quickly are the documents that store the images deleted?</p>
		<p>What is to prevent the user from answering the captcha once manually, and then modifying each requested page for the duration of the lifetime of said document? </p>
		<p>I don't know that that would work, since you've left out some details of the process.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=8A17868DFAA2E77D8525746D00760A94"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_8A17868D</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Thu, 19 Jun 2008 12:13:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>I see where you're coming from Andrew but I think we'll have to agree to differ.</p>
		<p>Rather than "Secure Enough" I'd say this was "Completely Secure".</p>
		<p>Dictionary.com says secure means "to guarantee the privacy or secrecy of" which I think this does a pretty good job of. Especially as the answer is hashed now ;o)</p>
		<p>Jake</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=F0A1B3491BEC2E1A8525746D005926C2"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_F0A1B349</link>
</item><item>
	<title>Reply from Kerr</title>
	<pubDate>Thu, 19 Jun 2008 11:00:00 +0100</pubDate>
	<author>Kerr</author>
	<description><![CDATA[ 
		<p>@Andrew, this isn't security by obscurity.  If a domino expert with full knowledge of the system design cannot gain access to the hidden information, then there is no security by obscurity.</p>
		<p>In general with notes client work though, I'd agree.  Any user that can access the document can see all values on it, and there is nothing you can do about it other than encrypt the field.</p>
		<p>In a pure web environment though, you can store values on docs that the user should never see, as long as you are careful not to let that information get back to the browser.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=8376DC8CCB0FAD968525746D00527B46"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_8376DC8C</link>
</item><item>
	<title>Reply from Andrew Pollack</title>
	<pubDate>Thu, 19 Jun 2008 10:32:00 +0100</pubDate>
	<author>Andrew Pollack</author>
	<description><![CDATA[ 
		<p>@Jake  -- "A certain level of secureness" isn't the same thing as "secure".  The question was, how secure is this implementation.  I pointed out that it fails to meet best practices for security documents in Domino and also that there are still ways around this kind of measure even if you make it very very secure in implementation.</p>
		<p>"Secure Enough" is a decision to be made by the business/process owner.  This probably meets "Secure Enough" but doesn't meet "Secure" in my opinion.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=B7F584D5C6372D878525746D004FE14B"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_B7F584D5</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Thu, 19 Jun 2008 03:48:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>Thanks to Andy's input I've now made a little more secure by hashing the answer in the "hidden" document and then using VerifyPassword to check the user's input against it.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=F5EE591DA4D0AA558525746D002AE83B"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_F5EE591D</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Wed, 18 Jun 2008 15:13:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>"Obscurity is never security"</p>
		<p>Never? </p>
		<p>If a document is that well hidden that there's no *possible* way in the world you can ever see it then I'd say it *is* secure. Is it not? Maybe not secure in the true sense of ACL and Readers fields but surely sometimes you can achieve a certain level of secureness without them? </p>
		<p>I can't use readers fields/ACLs anyway as (is the case with most CAPTCHA-enabled forms) the user is Anonymous.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=6CC4D7D35420D1F58525746C006998F9"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_6CC4D7D3</link>
</item><item>
	<title>Reply from Andrew Pollack</title>
	<pubDate>Wed, 18 Jun 2008 12:01:00 +0100</pubDate>
	<author>Andrew Pollack</author>
	<description><![CDATA[ 
		<p>There are two issues I want to bring up. </p>
		<p>#1 - Hidden documents aren't secure.  You've done well in the hiding of it, but that's not the same.  If you want to prevent access, put reader names on it or store it in a db with an ACL.  On the submit, have the agent which runs be signed by an ID which DOES have access to look up the answer, but DOES NOT have access to the object with the file itself.  There's a lot of details I left out, but from your post you seem up to that.  Obscurity is never security.</p>
		<p>#2 - Captcha isn't perfect at all.  My favorite captcha hack is when they set up another site which requires captcha input -- a popular one, like maybe a free porn site.  When they show users THEIR captcha screen, they use script to do the page load on YOURS to get the captcha image which they then retransmit to the user of their site.  The user answers their captcha question, and that answer is then submitted as the answer to your own site.  This way, they get real people answering your site's captcha requests without you knowing it.</p>
		<p>That said, you have to be an important target for this to be worthwhile.  Opening GMAIL accounts for spam sending, for example, would be a "good" use of this technique.  Posting blog comments probably would not.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=5FC0C7DDA96D476A8525746C005811B6"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_5FC0C7DD</link>
</item><item>
	<title>Reply from Rob</title>
	<pubDate>Wed, 18 Jun 2008 11:30:00 +0100</pubDate>
	<author>Rob</author>
	<description><![CDATA[ 
		<p>@flaz, I looked at the discussion at your link which discusses converting a PNG image to JPG and saving it to the server hard drive before using it.</p>
		<p>One entry said, "What I do is generate an image in the agent. Then save it to the local file system." </p>
		<p>The other said, "... just get the image stream from Google and save it to a uniquely named file ...".</p>
		<p>So what did I miss? How does this help Jake in not writing the file to the disk first?</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=7E79A7E39407FF908525746C0055289B"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_7E79A7E3</link>
</item><item>
	<title>Reply from flaz</title>
	<pubDate>Wed, 18 Jun 2008 10:11:00 +0100</pubDate>
	<author>flaz</author>
	<description><![CDATA[ 
		<p>Jake, there's no need to save the file in the disk. For a lot of requests it's extremely inefficient. Look at this: {<a rel="nofollow" href="http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/d13c66ba0583fde2ca25740e007ff7ca?OpenDocument">Link</a>}</p>
		<p>Have a nice day ;)</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=2148DF8ED0CD82718525746C004DE9D5"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_2148DF8E</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Wed, 18 Jun 2008 08:56:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>Having read through the PDF it all seems out of date now. It was written in 2001 and it seems as though everything it describes is no longer applicable?</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=1C0A30AC2B21F7AA8525746C00470F37"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_1C0A30AC</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Wed, 18 Jun 2008 08:45:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>Thanks for the link Andy. I didn't know that PDF existed and will be reading shortly.</p>
		<p>I know a few of the different ways you can get at documents in database but I'm assuming in my case none of it matters as there's only one Form with which to display any document found and that's not only hidden but also blank.</p>
		<p>I wrote a Java servlet a few years back that highlighted one way {<a rel="nofollow" href="http://www.codestore.net/store.nsf/unid/BLOG-20051108?OpenDocument">Link</a>} which is now closed (I think/hope). </p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=CBE4F1C9730113288525746C00461B50"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_CBE4F1C9</link>
</item><item>
	<title>Reply from andy</title>
	<pubDate>Wed, 18 Jun 2008 08:24:00 +0100</pubDate>
	<author>andy</author>
	<description><![CDATA[ 
		<p>Not sure if this is an issue or not...</p>
		<p>&lt;b&gt;By-passing ACLs set on views&lt;/b&gt;</p>
		<p>The fact that you can request a document in one view through another view opens up a security hole. If ACLs are set on a view to give say only admins access, then any documents in that view may be access directly through another view - thus bypassing the access control. This works because the permissions allow access to the database, the fake view and the document in question. At each stage where permission checking takes place the authorization process succeeds. If the request was made through the real view then authorization would fail. Remember by requesting a NoteID you're simply asking for the contents from a position in the database file.</p>
		<p>Extract taken from ...</p>
		<p>www.ngssoftware.com/papers/hpldws.pdf</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=55CF9C9FB567BBAB8525746C0044201F"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_55CF9C9F</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Wed, 18 Jun 2008 08:22:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>Interesting idea Andy. If I were to start again I'd probably use that technique. As it is I'm not sure it's worth undoing what's there as there's not much to gain in doing so. Unless somebody is yet to point out a massive flaw in the approach I've taken...</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=99F27D12BE845F328525746C0043F44A"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_99F27D12</link>
</item><item>
	<title>Reply from andy</title>
	<pubDate>Wed, 18 Jun 2008 07:55:00 +0100</pubDate>
	<author>andy</author>
	<description><![CDATA[ 
		<p>OK, this may seem overly simplistic but how about just hashing the file name 123456.jpg which would give you something like... GsiMiuKMOprxdIYXUEe.jpg then when the user types 123456 as the captcha solution you simply hash that value and compare the results to see if they match in the back end. </p>
		<p>The only way for someone to "Solve" it is if they know the alogrithm used to hash it, and if your using domino's own function then it should already be secure. You may not even need to store it as it could be used again. </p>
		<p>Just an idea...</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=28B1F2848EF2E87C8525746C00418229"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_28B1F284</link>
</item><item>
	<title>Reply from Jake Howlett</title>
	<pubDate>Wed, 18 Jun 2008 07:53:00 +0100</pubDate>
	<author>Jake Howlett</author>
	<description><![CDATA[ 
		<p>So there's no internal hidden view they could do a ?ReadViewEntries on or anything like that then?</p>
		<p>I had a go at the MIME yesterday and managed to save an image to a document, but only a document that was committed to the disk before being opened as ?OpenDocument. What I couldn't manage is to add a MIMEEntity to a rich text field on a Form using the WQO agent and having it display to the user. Is that possible?</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=DEF27E504B952C5B8525746C00414D9F"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_DEF27E50</link>
</item><item>
	<title>Reply from Kerr</title>
	<pubDate>Wed, 18 Jun 2008 07:07:00 +0100</pubDate>
	<author>Kerr</author>
	<description><![CDATA[ 
		<p>I think you've covered all the bases Jake.  As long as the user has no way to see the answer you are fine.  Ensuring the answer is hidden is just standard Domino security, which you seem to have down pat.</p>
		<p>I take it for this scenario, this is the only "session" you need.  If multiple forms need submited, then multiple captchas  must be passed?</p>
		<p>Also as a follow up to yesterdays post, I've succesfully added a file to a document via MIME without saving it to disk.  I was getting the file as base64 encoded via a webservice, but the principle should be the same.</p>

		<p><a href="http://www.codestore.net/store.nsf/reply?OpenForm&ParentUNID=82DBD177F47624A78525746C003D2184"><img border="0" src="http://www.codestore.net/store.nsf/images/rss_reply.gif" alt="Click here to post a response" /></a></p>
	]]></description>
	<link>http://www.codestore.net/store.nsf/unid/BLOG-20080618?OpenDocument#DOC_82DBD177</link>
</item>

</channel>
</rss> 
