<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: CSRF, Crumbs, and Cookies.</title>
	<atom:link href="http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/feed/" rel="self" type="application/rss+xml" />
	<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/</link>
	<description></description>
	<lastBuildDate>Tue, 16 Feb 2010 12:31:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Simon Willison</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29380</link>
		<dc:creator>Simon Willison</dc:creator>
		<pubDate>Fri, 03 Oct 2008 22:22:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29380</guid>
		<description>One thing that&#039;s worth considering is that it&#039;s easier to accidentally leak a CSRF crumb than it is to accidentally leak a session. Crumbs are used in forms, which means that if you accidentally include a crumb in a GET form it could end up in a URL - which might then leak to someone&#039;s referrer logs. If you are automatically adding crumbs to any forms on your site you might accidentally add the crumb to a form with an action pointing somewhere else, which is another way that the crumb could leak.

OK, so neither of the above are hugely likely, but just in case it&#039;s nice to know that the crumb you are leaking is securely derived from your session ID rather than being identical to it.</description>
		<content:encoded><![CDATA[<p>One thing that&#8217;s worth considering is that it&#8217;s easier to accidentally leak a CSRF crumb than it is to accidentally leak a session. Crumbs are used in forms, which means that if you accidentally include a crumb in a GET form it could end up in a URL &#8211; which might then leak to someone&#8217;s referrer logs. If you are automatically adding crumbs to any forms on your site you might accidentally add the crumb to a form with an action pointing somewhere else, which is another way that the crumb could leak.</p>
<p>OK, so neither of the above are hugely likely, but just in case it&#8217;s nice to know that the crumb you are leaking is securely derived from your session ID rather than being identical to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rzwitserloot</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29332</link>
		<dc:creator>rzwitserloot</dc:creator>
		<pubDate>Fri, 03 Oct 2008 01:37:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29332</guid>
		<description>Good one, Mark. random+SHA256(random+sessionID) at the very least has a clear advantage over raw sessionIDs in the page proper.

Tipit requires javascript at the moment so I don&#039;t need to send the session as the server; the javascript just fishes it out of the cookie. But, that&#039;s the exception and not the norm, so, yeah. definitely need to hash something.</description>
		<content:encoded><![CDATA[<p>Good one, Mark. random+SHA256(random+sessionID) at the very least has a clear advantage over raw sessionIDs in the page proper.</p>
<p>Tipit requires javascript at the moment so I don&#8217;t need to send the session as the server; the javascript just fishes it out of the cookie. But, that&#8217;s the exception and not the norm, so, yeah. definitely need to hash something.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cbetta</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29305</link>
		<dc:creator>cbetta</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29305</guid>
		<description>True. Quite a good point there. Still means anyone doing CSRF should always think of setting the cache-control headers properly to prevent CSRF problems.</description>
		<content:encoded><![CDATA[<p>True. Quite a good point there. Still means anyone doing CSRF should always think of setting the cache-control headers properly to prevent CSRF problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ng</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29303</link>
		<dc:creator>Mark Ng</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:52:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29303</guid>
		<description>@cbetta also, of course, you&#039;d be restricted to actions within that form, rather than actions across the whole site.</description>
		<content:encoded><![CDATA[<p>@cbetta also, of course, you&#8217;d be restricted to actions within that form, rather than actions across the whole site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ng</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29302</link>
		<dc:creator>Mark Ng</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:51:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29302</guid>
		<description>@cbetta sure, but stealing a CSRF token in this context means that you have to steal the CSRF token from the proxy, identify the user that CSRF token belongs to (difficult, unless you know the proxy is only being used by a couple of people) and then persuade that user to visit a URL with your CSRF attack script in it.

Much less easy than just stealing someones session ID and not having to know which user it is in advance.</description>
		<content:encoded><![CDATA[<p>@cbetta sure, but stealing a CSRF token in this context means that you have to steal the CSRF token from the proxy, identify the user that CSRF token belongs to (difficult, unless you know the proxy is only being used by a couple of people) and then persuade that user to visit a URL with your CSRF attack script in it.</p>
<p>Much less easy than just stealing someones session ID and not having to know which user it is in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cbetta</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29299</link>
		<dc:creator>cbetta</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29299</guid>
		<description>@markng that same issue arrises for normal CSRF tokens, right? although those are just tokens, not entire session IDs</description>
		<content:encoded><![CDATA[<p>@markng that same issue arrises for normal CSRF tokens, right? although those are just tokens, not entire session IDs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Ng</title>
		<link>http://zwitserloot.com/2008/10/02/csrf-crumbs-and-cookies/comment-page-1/#comment-29298</link>
		<dc:creator>Mark Ng</dc:creator>
		<pubDate>Thu, 02 Oct 2008 17:38:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.zwitserloot.com/?p=155#comment-29298</guid>
		<description>My immediate thought is that you&#039;d have to be careful with cache-control headers if you were going to send the session ID unhashed in the page.

A caching proxy won&#039;t send you someone elses cookies, but it will send you someone elses page if it hasn&#039;t been told it&#039;s private.  This would mean that someone could get your session ID by using the same proxy as you.</description>
		<content:encoded><![CDATA[<p>My immediate thought is that you&#8217;d have to be careful with cache-control headers if you were going to send the session ID unhashed in the page.</p>
<p>A caching proxy won&#8217;t send you someone elses cookies, but it will send you someone elses page if it hasn&#8217;t been told it&#8217;s private.  This would mean that someone could get your session ID by using the same proxy as you.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
