<?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>Benlog &#187; security</title>
	<atom:link href="http://benlog.com/articles/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://benlog.com</link>
	<description>security, privacy, transparency.</description>
	<lastBuildDate>Tue, 07 Sep 2010 20:56:25 +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>defending against your own stupidity</title>
		<link>http://benlog.com/articles/2010/09/07/defending-against-your-own-stupidity/</link>
		<comments>http://benlog.com/articles/2010/09/07/defending-against-your-own-stupidity/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 20:56:25 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1309</guid>
		<description><![CDATA[When thinking about security, it is tempting to determine the worst-case attacker and focus defenses against it. (Of course, by worst-case, I mean within the bounds of a reasonable threat model: the NSA is not a reasonable worst-case attacker for every problem.) A corollary to this reasoning goes something like this: well, I&#8217;ve already implemented [...]]]></description>
			<content:encoded><![CDATA[<p>When thinking about security, it is tempting to determine the worst-case attacker and focus defenses against it. (Of course, by worst-case, I mean within the bounds of a reasonable threat model: the NSA is not a reasonable worst-case attacker for every problem.) A corollary to this reasoning goes something like this: well, I&#8217;ve already implemented shield X, and if an attacker can defeat shield X, then they can probably also defeat shield Y, so I don&#8217;t need to implement shield Y because it&#8217;s useless.</p>
<p>That&#8217;s misguided. There may be some very good reasons to implement shield Y.</p>
<p>Consider the utility of a safety parachute. A determined attacker trying to kill you will obviously sabotage the safety parachute just as easily as he can sabotage the primary one. So, does that mean you might as well jump without a safety parachute? Of course not. You want to take into account not just the worst-case attacker, you want to take into account your own stupidity. A safety parachute means that, if you packed your primary wrong, you can still live. Defense in depth, as it&#8217;s more commonly known in the security community, is usually not about building the 12 layers of security around the &#8220;Die Hard&#8221; vault that a skilled attacker has to vanquish, one by one. Defense in depth is the humble realization that, of all the security measures you implement, a few will fail because of your own stupidity. It&#8217;s good to have a few backups, just in case.</p>
<p>In my <a href="http://benlog.com/articles/2010/09/02/an-unwarranted-bashing-of-twitters-oauth/">previous post regarding Twitter</a>, two people I greatly respect, Miguel de Icaza and Keith Winstein, claimed Twitter&#8217;s requirement that desktop clients identify themselves with a consumer name and secret didn&#8217;t make any sense, because a malicious app could easily bypass that defense. This is true. But what about the apps that have bugs? The ones that start double posting when the date hits 9/02/10 because of some date parser bug combined with a fetish for the 1990s TV show? Or the ones that have a buffer overflow error that a remote attacker can trigger and start partially remote-controlling? How does a developer, or Twitter themselves if that developer isn&#8217;t responding, shut down that faulty pipe? The consumer name suddenly looks like a decent solution to this problem. It doesn&#8217;t work against the worst-case attacker, but it works against failure modes where the desktop app developer isn&#8217;t malicious, only a little stupid.</p>
<p>(I say this with all the love in the world for developers and their stupid bugs, since I include myself proudly in that group: we developers make mistakes, all the time, often stupid ones.)</p>
<p>There are a few other good reasons, along the same lines, for requiring a desktop client to use access tokens rather than passwords. For one, it&#8217;s good protection against developer stupidity to <em>simply not store the user&#8217;s username and password</em> whenever possible. That&#8217;s just one less place from where the user&#8217;s password can be compromised and, when apps identify themselves, it&#8217;s easier to shut down that app independently for any number of reasons: the user lost their laptop, or the app is misbehaving in unintentional ways, &#8230; </p>
<p>Does any of this provide a defense against the worst-case attacker, a rogue desktop app? Of course not. But thinking only about the worst-case attacker misses the obvious issue in distributed software design: stupid mistakes are by far the most likely problem you&#8217;ll encounter, and it&#8217;s a good idea to design a few layers of control to address those issues when they arise.</p>
<p>Defense in depth. Sometimes it means hedging against your own stupidity.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/09/07/defending-against-your-own-stupidity/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>an unwarranted bashing of Twitter&#8217;s oAuth</title>
		<link>http://benlog.com/articles/2010/09/02/an-unwarranted-bashing-of-twitters-oauth/</link>
		<comments>http://benlog.com/articles/2010/09/02/an-unwarranted-bashing-of-twitters-oauth/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 19:31:25 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1290</guid>
		<description><![CDATA[Ryan Paul over at ArsTechnica claims a compromise of Twitter&#8217;s oAuth system, but fails to demonstrate such a compromise. It&#8217;s unfortunate, because some of his comments are indeed worthwhile, and there are a few interesting recommendations that Twitter should follow (hah, no pun intended). But what we have here is not a &#8220;compromise&#8221;, and the [...]]]></description>
			<content:encoded><![CDATA[<p>Ryan Paul over at ArsTechnica claims a <a href="http://arstechnica.com/security/guides/2010/09/twitter-a-case-study-on-how-to-do-oauth-wrong.ars">compromise of Twitter&#8217;s oAuth system</a>, but fails to demonstrate such a compromise. It&#8217;s unfortunate, because some of his comments are indeed worthwhile, and there are a few interesting recommendations that Twitter should follow (hah, no pun intended). But what we have here is not a &#8220;compromise&#8221;, and the citation-and-reasoning-free fear-mongering about oAuth is poor reporting.</p>
<h4>the consumer secret is not important</h4>
<p>The article&#8217;s main argument is that the oAuth consumer secret is embedded in desktop clients and can be extracted. Yes. That sounds really bad doesn&#8217;t it? Except, as the article itself says:</p>
<blockquote><p>
It&#8217;s very important to understand that a compromised consumer secret key doesn&#8217;t jeopardize the security of the users of the application. The key can&#8217;t be used to gain access to the accounts of other users, because accessing an individual account requires an access token that individual instances of the client application obtain automatically on behalf of the user during the authorization process.
</p></blockquote>
<p>Ahah, you say, but the article also says:</p>
<blockquote><p>
the problem is how Twitter is using the key
</p></blockquote>
<p>Oh no! What are they possibly doing with this key that they shouldn&#8217;t be doing? </p>
<blockquote><p>
These keys are particularly significant because Twitter has configured them to enable access to special APIs which aren&#8217;t generally available yet that can be used to exchange login credentials for an access token
</p></blockquote>
<p>So in other words, with a consumer secret, you can exchange a username/password for an oAuth access token. That&#8217;s not ideal, because it means that we&#8217;re back to clients proxying usernames and passwords, but how is that a compromise? If an app successfully captures your username and password, and the app is evil, you&#8217;re screwed already! In fact, it&#8217;s probably a <em>good thing</em> that Twitter then pivots and says &#8220;ok, fine you got the password, but can you please just exchange it for this access token now and not store the password?&#8221; Furthermore, Twitter even says that this approach, which they call <a href="http://dev.twitter.com/pages/auth_overview">xauth</a>, is the &#8220;least desirable way to authenticate,&#8221; and they require apps that want to use this feature to request special approval.</p>
<p>I don&#8217;t see a security compromise here. I see a complicated set of design issues on which Twitter is trying to make practical security decisions. It&#8217;s certainly reasonable to disagree with them, but it&#8217;s unwarranted to claim that oAuth security has been &#8220;compromised&#8221; or that Twitter made this decision &#8220;against all reason.&#8221;</p>
<h4>spamming is a darn good explanation</h4>
<p>The article says:</p>
<blockquote><p>
The issue here is that Twitter wants to use the keys as an abuse control mechanism to centrally disconnect spammers and other unwanted users of the service, but OAuth was simply not designed to be used for that purpose. The idea is that centrally disabling a spammer&#8217;s consumer secret key will lock out all of the spammer&#8217;s user accounts, theoretically simplifying spam control for Twitter. It&#8217;s unlikely that this naive strategy will work in practice, however.</p>
<p>Any spammer with a hex editor can trivially compromise the keys of popular applications and use those keys to evade Twitter&#8217;s abuse controls.
</p></blockquote>
<p>Ummm, no. As the article itself states, a spammer who takes another application&#8217;s keys <em>still doesn&#8217;t have the access tokens</em>, and so it cannot spam.</p>
<p>In fact, spamming is a very good reasons for Twitter&#8217;s use of consumer keys and secrets even in desktop clients: a spammer in this case is going to be an application that <em>has legitimately authorized</em> a bunch of users, and then decides to go crazy and spam their feeds. In that scenario, Twitter can very easily temporarily disable that one consumer key+secret, or throttle it, or kill it altogether, without having to trace down all the access tokens that consumer generated. I like this reason a lot.</p>
<h4>increase the risk of phishing? No</h4>
<p>In the past, I&#8217;ve been critical of OpenID for increasing the risk of phishing. So one might think I would agree with the article when it says:</p>
<blockquote><p>
Individual implementations aside, the general concept behind OAuth&#8217;s redirection-based authorization process materially increases the risk of phishing. The people behind the standard are fully aware of that fact, but they don&#8217;t believe that the issue should necessarily be addressed by the standard itself.
</p></blockquote>
<p>I think that&#8217;s wrong. There&#8217;s a key difference here: what&#8217;s the alternative to oAuth? The alternative is <a href="http://benlog.com/articles/2007/10/12/the-password-anti-pattern-and-the-login-redirection-anti-pattern/">the password anti-pattern</a>, where all those third-party apps capture your username and password. So sure, it  would be good if oAuth providers had more phishing-resistant login mechanisms, say like <a href="http://benlog.com/articles/2007/02/06/beamauth-two-factor-web-authentication-with-a-bookmark/">BeamAuth</a> (shameless plug). But, on the whole, oAuth is still a heck of a lot less phishing-prone than the password anti-pattern it&#8217;s trying to replace.</p>
<h4>open-source and DOS: fair points</h4>
<p>The article does make a fair point about open-source software, JavaScript-based clients, and generally the possibility that some loser might sabotage a legitimate app by copying a consumer token and secret and abusing it. If that happens a lot, then Twitter will certainly have to come up with a new approach. But let&#8217;s at least understand that <em>there is no good approach to this problem</em>. If no attempt is made at tracking which client is which, then one bad spamming apple could ruin it for everyone, since there&#8217;s no way to differentiate the good from the bad. Twitter may have to rethink its automatic consumer-kill policy and become a bit more nuanced, but that&#8217;s just a policy decision. At the protocol level, I don&#8217;t know how they could do much better, given that even closed-source software, as pointed out by the article, can be easily disassembled.</p>
<h4>override the callback URL? That&#8217;s a good point</h4>
<p>The article claims that an attacker can change the callback URL in a Twitter oAuth session, which would indeed enable a very sneaky phishing attack. I didn&#8217;t think that was the case, but it <a href="http://dev.twitter.com/pages/auth">may be</a>. I agree with the article&#8217;s take on this:</p>
<blockquote><p>
Ideally, OAuth implementors should require application developers to supply the callback address when they configure their key and should not allow that setting to be overridden by the client application in a request parameter. Twitter has a field in the key configuration that allows the developers to specify a default, but they still allow client applications to use the dangerous callback override parameter.
</p></blockquote>
<p>I think the article is right on this point. There are many reasons to disallow callback overrides, and there&#8217;s no good reason for it: oAuth web apps need cookie-based session support anyways to complete the oAuth process, there&#8217;s no need to dynamically add state to the callback URL. It would be good to do away with this &#8220;feature.&#8221;</p>
<h4>a few very good small points</h4>
<p>The article makes some very good smaller points that Twitter (and other oAuth providers) should heed:</p>
<ul>
<li> debugging oAuth is hard, and having more explicit error messages is a good idea</li>
<li> logging out is confusing: if you log out of the app, are you logged out of the oAuth identity provider? Flickr does this very well with Yahoo ID integration, so oAuth and Twitter should indeed provide more guidance on this front.</li>
<li> giving users more cues for trusting certain apps is probably a good idea. This can evolve over time, though, and the protocol won&#8217;t need to change.</li>
</ul>
<p>These are all useful points. But they&#8217;re small, and they do not warrant a big scary title.</p>
<h4>all hail oAuth 2.0!</h4>
<p>The most confusing part of the article is the constant harping on oAuth 1.0a as &#8220;immature&#8221; when it has been deployed by dozens of high-profile providers, and the constant praise of oAuth 2.0, which has only <em>just</em> been released and actually weakens security to make developers&#8217; lives easier (I&#8217;ve <a href="http://benlog.com/articles/2009/12/22/its-a-wrap/">written before about the oAuth 2.0 problems</a>). It&#8217;s possible that oAuth 2.0 is much better in ways I haven&#8217;t considered, but where&#8217;s the evidence? The article doesn&#8217;t say.</p>
<h4>unnecessary insults</h4>
<p>The article concludes:</p>
<blockquote><p>
Although I think that OAuth is salvageable and may eventually live up to the hype, my opinion of Twitter is less positive. The service seriously botched its OAuth implementation and demonstrated, yet again, that it lacks the engineering competence that is needed to reliably operate its service. Twitter should review the OAuth standard and take a close look at how Google and Facebook are using OAuth for guidance about the proper approach.
</p></blockquote>
<p>There&#8217;s no evidence of this so-called &#8220;botched&#8221; job. Sure, some smaller points are absolutely worth considering, and I applaud the author for digging deep on some of these. But I find unfortunate the overall tone of the article, the baseless and gross exaggerations, and the condescending writing that ignores reasonable justifications for Twitter&#8217;s decisions.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/09/02/an-unwarranted-bashing-of-twitters-oauth/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Usenix Security, voting and health security</title>
		<link>http://benlog.com/articles/2010/08/09/usenix-security-voting-and-health-security/</link>
		<comments>http://benlog.com/articles/2010/08/09/usenix-security-voting-and-health-security/#comments</comments>
		<pubDate>Mon, 09 Aug 2010 16:24:48 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1281</guid>
		<description><![CDATA[I&#8217;m at Usenix Security 2010 in DC, starting with the EVT/WOTE Workshop on voting where I&#8217;ll be presenting an update on Helios, then the HealthSec workshop where I&#8217;ll be on a panel discussing my paper with Zak Kohane and Ken Mandl on using a Personally Controlled Health Record for health-information exchange [PDF]. The voting crowd [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m at <a href="http://www.usenix.org/events/sec10/">Usenix Security 2010</a> in DC, starting with the <a href="http://www.usenix.org/events/evtwote10/">EVT/WOTE Workshop on voting</a> where I&#8217;ll be presenting an update on <a href="http://heliosvoting.org">Helios</a>, then the <a href="http://www.usenix.org/events/healthsec10/">HealthSec workshop</a> where I&#8217;ll be on a panel discussing my paper with Zak Kohane and Ken Mandl on using a Personally Controlled Health Record for health-information exchange [<a href="http://ben.adida.net/research/pchr-hie-2010-08.pdf">PDF</a>].</p>
<p>The voting crowd is emerging from a 2-day workshop with election officials on remote voting for military and overseas voters. I&#8217;m trying to get a sense of attendees&#8217; impressions from that workshop, but suffice it to say that it seems to have been &#8220;exciting.&#8221; Ron Rivest compared online voting for public-office elections to drunk driving, as in &#8220;there&#8217;s no good way to do it,&#8221; and that apparently didn&#8217;t go over very well with some folks. I agree with the metaphor, however harsh it may seem.</p>
<p>Meanwhile, there is plenty of room for online voting in the numerous elections people hold that are not for public office: corporate boards, clubs, student government, etc. That&#8217;s why I&#8217;m excited that last night, we released Helios v3. Try it out right now by voting in our <a href="https://vote.heliosvoting.org/helios/e/p-vs-np">super geeky sample election</a> and in a <a href="https://vote.heliosvoting.org/helios/e/wyclef-haiti">current-events election (Wyclef for Haiti?)</a>.</p>
<p>More than 25,000 votes have been cast using Helios technology. We&#8217;ve learned some very interesting lessons already, and there are many more to come. I&#8217;m hoping that, as we add more social aspects to Helios, we&#8217;ll see more usage, more data, and a unique chance to improve the technology based on real-world experience.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/08/09/usenix-security-voting-and-health-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>if you&#8217;re outraged by accidental breaches, you&#8217;d better sit down</title>
		<link>http://benlog.com/articles/2010/05/14/if-youre-outraged-by-accidental-breaches-youd-better-sit-down/</link>
		<comments>http://benlog.com/articles/2010/05/14/if-youre-outraged-by-accidental-breaches-youd-better-sit-down/#comments</comments>
		<pubDate>Sat, 15 May 2010 01:41:55 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[policy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1205</guid>
		<description><![CDATA[A few days ago, a security bug was discovered on Facebook, whereby users could see the chat transcripts of their friends talking to other friends. Then, another security hole was discovered where a problem at Yelp revealed email addresses of Facebook users. And today, Google realized that they accidentally collected network traffic from open wi-fi [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, a security bug was discovered on Facebook, whereby users <a href="http://eu.techcrunch.com/2010/05/05/video-major-facebook-security-hole-lets-you-view-your-friends-live-chats/">could see the chat transcripts of their friends talking to other friends</a>. Then, another security hole was discovered where a problem at Yelp <a href="http://techcrunch.com/2010/05/11/yelp-security-hole-puts-facebook-user-data-at-risk-underscores-problems-with-instant-personalization/">revealed email addresses of Facebook users</a>. And today, Google realized that they <a href="http://techcrunch.com/2010/05/14/google-admits-to-accidentally-collecting-personal-data-with-street-view-cars/">accidentally collected network traffic from open wi-fi connections while gathering street-view data</a>.</p>
<p>In every instance, the companies involved didn&#8217;t mean to cause these data breaches. In every instance, they would gladly pay serious cash to prevent these bugs, given the negative publicity they cause. In every instance, most security folks I know are unfazed by these news, which they find quite unsurprising. And in each instance, the companies in question, Facebook and Google, reacted admirably: rapid disclosure, rapid response.</p>
<p>If you&#8217;re shocked, outraged, writing lengthy TechCrunch posts about these developments, you probably don&#8217;t understand computer security very well, and you&#8217;d better sit down with a stiff drink, because these issues are the tip of the iceberg. Accidental breaches happen all the time. Writing secure software is incredibly difficult, especially when,  like Google and Facebook, you&#8217;re pushing the envelope and releasing features as quickly as possible to outpace your competitors.</p>
<p>We do not know how to write secure software. We do not know how to ensure that the software we write follows a given set of policies. Anyone who tries to sell you a perfectly secure system is either lying to you or doesn&#8217;t know what he&#8217;s talking about.</p>
<p>There are measures we can take to minimize risk, but they aren&#8217;t very sexy. Mistakes will be made, so the point is to minimize the bad consequences of those inevitable mistakes. Think of the awfully boring things you&#8217;ve heard security geeks tell you:</p>
<ul>
<li> don&#8217;t store user passwords in the clear. </li>
<li> don&#8217;t make up your own crypto protocols, be conservative. </li>
<li> defend in depth: even if you&#8217;ve got one defense, it&#8217;s always a good idea to have other defenses against the same potential breach.</li>
<li> look upon large data aggregations with deep skepticism: Google, Facebook, government DNA databases, etc.</li>
<li> look upon wide-ranging integration of disparate systems with deep skepticism: OpenID, Facebook Instant Personalization, etc.</li>
<li> be skeptical of software vetting claims, i.e. the Apple app store.</li>
<li> ask that new protocols do much more than be &#8220;no less secure&#8221; than existing protocols (I&#8217;m looking at you oAuth 2.0, no less secure than cookies).</li>
<li> demand that the public be informed of all significant data breaches.</li>
</ul>
<p>So freaking boring, right? But that&#8217;s real security. Minimize the target, minimize the risk, maximize the defenses, and always seek to strengthen security measures, because attacks only get stronger, too. And finally, provide the incentive to companies to constantly improve their defenses, by mandating disclosure.</p>
<p>If you&#8217;re shocked about the Facebook and Google bugs, just remember that those are the bugs we know about. There are a whole bunch more we don&#8217;t know about that Google and Facebook caught before any harm occurred. And there are a whole bunch more that nobody but bad guys know about that are actively causing harm right this minute. So the question is, as a software engineer, did you take those boring precautions to limit the damage? As a user, did you consider what data you&#8217;re storing with whom, how big a target they may be to attackers, and how motivated they are to truly secure your data?</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/05/14/if-youre-outraged-by-accidental-breaches-youd-better-sit-down/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Myth: the app store will protect you and prevent user confusion</title>
		<link>http://benlog.com/articles/2010/04/05/myth-the-app-store-will-protect-you-and-prevent-user-confusion/</link>
		<comments>http://benlog.com/articles/2010/04/05/myth-the-app-store-will-protect-you-and-prevent-user-confusion/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:23:55 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[autonomy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1175</guid>
		<description><![CDATA[An interesting thing happened with the Apple AppStore this weekend: This weekend, as hundreds of thousands of people explored their iPads [...] they found [...] an application called Facebook Ultimate, featuring a sleek version of the familiar ‘f’ logo. The application quickly rose through the ranks to become one of the App Store’s top selling [...]]]></description>
			<content:encoded><![CDATA[<p>An <a href="http://techcrunch.com/2010/04/05/facebooks-ipad-impostor-facebook-ultimate-removed-from-the-app-store/">interesting thing happened with the Apple AppStore this weekend</a>:</p>
<blockquote><p>
This weekend, as hundreds of thousands of people explored their iPads [...] they found [...] an application called Facebook Ultimate, featuring a sleek version of the familiar ‘f’ logo. The application quickly rose through the ranks to become one of the App Store’s top selling iPad applications. Unfortunately, it soon became apparent to these users that the application simply wasn’t very good, and that it wasn’t created by Facebook at all.</p>
<p>[...]</p>
<p>the $2.99 application rose to become the #7 top paid app on the App Store. The app received many poor reviews from upset users, plenty of which warned others that this was not the app they were looking for, but that apparently didn’t stop people from downloading it.
</p></blockquote>
<p>Tell me again how the App Store protects users?</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/04/05/myth-the-app-store-will-protect-you-and-prevent-user-confusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protecting against web history sniffing attacks: an alternative</title>
		<link>http://benlog.com/articles/2010/03/31/protecting-against-web-history-sniffing-attacks-an-alternative/</link>
		<comments>http://benlog.com/articles/2010/03/31/protecting-against-web-history-sniffing-attacks-an-alternative/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 16:18:53 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1140</guid>
		<description><![CDATA[When a web site links to another web site, the link appears in a different color, usually a lighter shade of blue, if you&#8217;ve already visited the site. Unfortunately, this means that a malicious web site can learn what sites you visit by putting up a few links and checking to see how your browser [...]]]></description>
			<content:encoded><![CDATA[<p>When a web site links to another web site, the link appears in a different color, usually a lighter shade of blue, if you&#8217;ve already visited the site. Unfortunately, this means that a malicious web site can learn what sites you visit by putting up a few links and checking to see how your browser is rendering them. Arvind explained <a href="http://33bits.org/2010/02/18/cookies-supercookies-and-ubercookies-stealing-the-identity-of-web-visitors/">the shockingly bad outcome of this small flaw</a> a few weeks ago.</p>
<p>Today, Mozilla is proposing an <a href="http://blog.mozilla.com/security/2010/03/31/plugging-the-css-history-leak/">interesting way to &#8220;plug&#8221; this leak</a>, by attacking the problem from both ends. First the style changes for visited links are now limited: you can&#8217;t change the font-size of a visited link. Second the web page can no longer fully introspect and discover those small style variations that are still allowed. It&#8217;s really fantastic to see Mozilla working on this particularly nefarious issue, which has been one of the elephants-in-the-room of web security for the last few years.</p>
<p>But I&#8217;m not sure this approach is the right one. It is, exactly as Mozilla put it, a &#8220;plug&#8221; for a leak. It doesn&#8217;t really address the essence of the issue, and I suspect clever attackers will find other, smaller leaks to exploit. Meanwhile, setting the precedent that the browser will now <em>fake</em> some of its rendering information to the page&#8217;s own JavaScript is a little bit odd.</p>
<p>The core issue is that a web page is allowed to use private information it should never have access to as a kind of black-box processor on its own rendering. That may have been fine when web pages were static content, but now that web pages are full-fledged programs that can attack these black boxes a thousand times a second without the user noticing, it&#8217;s a problem.</p>
<h4>An Alternative: tweaking the meaning of &#8216;visited&#8217;</h4>
<p>So here&#8217;s <strike>my proposal (which may well have been mentioned by others before me.)</strike> a proposal I thought I&#8217;d come up with, but really is just a subconscious reappearance of work by Collin Jackson, Andrew Bortz, Dan Boneh, and John Mitchell: <a href="http://safehistory.com">safehistory</a>.</p>
<p>A browser should consider a link &#8220;visited&#8221; depending on where that link appears. If I&#8217;ve clicked on <tt>cnn.com/stories/123</tt> from <tt>fooblog.com</tt>, then the next time that link is shown <em>on <tt>fooblog.com</tt></em>, it should appear as visited. But if that same link appears on <tt>barblog.com</tt>, then it should simply be considered a new link.</p>
<p>That way, a web page only has access to information that it technically already could have collected itself, by tracking the outgoing clicks on its site. No more black-box access to private data that it can manipulate thousands of times a second. No more leaks to plug (in this context). Conceptually, this is cleaner and much more in line with the security model we need for the Web.</p>
<p>Also, I have a feeling that this might be a <em>better</em> mental model of how most people think of visited links. A visited link, in this new model, means &#8220;I have already followed this path from A to B,&#8221; rather than &#8220;I have already seen B via some other site C.&#8221; After all, how often do people find the   same link from two different sources at different domains? It happens, of course, but how often is it useful to know that this link was visited via a different path when the anchor text at both sites will almost certainly be different, making the information that you&#8217;ve already visited this site fairly vague (<em>which</em> site was it?)</p>
<h4>But what about link aggregators, like reddit, digg, etc&#8230;</h4>
<p>Some sites just aggregate tons of links to stories around the web, and in those cases you might want to know that you&#8217;ve already seen the story via some other link-aggregator or even on your own. Now, that need may be a lot less important than you think initially: often links from aggregators are customized with outgoing link-tracking, referrer codes, etc.. that actually prevent visited-link-highlighting from activating anyways. But, this may be a legitimate case where advanced users want to know that they&#8217;ve seen these stories before. In those cases, I can imagine a &#8220;super-referrer&#8221; whitelist in the browser, where certain sites are trusted not to abuse their ability to use your history black-box rendering processor. Advanced users would have to add the link aggregators they trust to this whitelist.</p>
<h4>Because it&#8217;s about trust</h4>
<p>At the end of the day, it&#8217;s about trust. We should not trust random web sites with black-box access to programs that depend on our private data. If I&#8217;ve never clicked on a link from site A to site B, then site A should know nothing about site B, and should not be able to run some program that very tightly depends on information about my visit to site B.</p>
<p>A visited link should mean &#8220;you&#8217;ve already walked this path before,&#8221; not &#8220;you&#8217;ve already seen this destination.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/03/31/protecting-against-web-history-sniffing-attacks-an-alternative/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>I was wrong about the iPad</title>
		<link>http://benlog.com/articles/2010/01/31/i-was-wrong-about-the-ipad/</link>
		<comments>http://benlog.com/articles/2010/01/31/i-was-wrong-about-the-ipad/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 21:00:07 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[policy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1077</guid>
		<description><![CDATA[So I made a couple of predictions about the iPad, Apple&#8217;s tablet, and I realize in retrospect that, while I got some of the details right, I got the gist completely wrong. I thought it was going to be a special-purpose device. And most commentators are saying just that. But I was wrong and they [...]]]></description>
			<content:encoded><![CDATA[<p>So I made a couple of predictions about the iPad, Apple&#8217;s tablet, and I realize in retrospect that, while I got some of the details right, I got the gist completely wrong. I thought it was going to be a special-purpose device. And most commentators are saying just that. But I was wrong and they are wrong. The iPad is very much meant to be a new approach to how we use computers in general. Still think it&#8217;s just a big iPhone? Watch these few minutes of video, a summary of how you interact with the iPad to create slides and edit documents in Apple&#8217;s productivity suite:</p>
<div align="center">
<object width="560" height="340"><param name="movie" value="http://www.youtube-nocookie.com/v/SBPnB3noTa8&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/SBPnB3noTa8&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
</div>
<p>This is different. Much more natural to use, a different experience altogether. It&#8217;s going to sell like mad, and developers will be building apps for this in no time.</p>
<p>The real Apple fanboys (I&#8217;m only a poser Apple fanboy) are saying almost what I&#8217;m saying: this is a <a href="http://stevenf.tumblr.com/post/359224392/i-need-to-talk-to-you-about-computers-ive-been">new model of computing</a>, the critics are suffering from <a href="http://speirs.org/blog/2010/1/29/future-shock.html">future shock</a>. Yes, and yes.</p>
<p>That said, the Apple fanboys are taking one critical step too many by accepting the hand-waving argument that this revolutionary computing model justifies the Apple-controlled App Store. Apparently, it&#8217;s like <a href="http://daringfireball.net/2010/01/various_ipad_thoughts">driving an automatic vs. a stick-shift</a>, or better yet it&#8217;s like <a href="http://radar.oreilly.com/2010/01/the-ipad-is-the-iprius-your-co.html">the Prius where you need special skills to maintain it</a>. Spare me the kool-aid, these analogies are incredibly bad. If you really want to use that analogy, at least realize that adding your own app to a computer is more like installing a GPS on the dashboard, not tuning the engine. Would you be okay with a Prius if somehow you didn&#8217;t have the right to install Honda-made seat covers, or tires made by Michelin? Well, if the Prius were good enough, you&#8217;d grind your teeth and deal, but in what world would you argue that it&#8217;s a feature that you can only install seat-covers approved by Toyota?</p>
<p>Yes, the iPad looks amazing, and yes, it will sell lots, and yes, it will redefine the way we interact with computers. But would we lose any of those things if Apple allowed you to add your own applications? No. The Apple death-grip is entirely orthogonal to all of those wonderful things. There could be a scary-red toggle deep down in the preferences, or a magical swipe pattern, or a software download from the Apple site with a big fat warning that says &#8220;be careful, if you enable the &#8216;risky install&#8217; feature, you may be forced to reset your iPad to factory settings.&#8221; Most people would use the iPad untouched, but the ability to open it up to other stores would bring more competition and would prevent the App Store overlords from making clearly anti-competitive decisions like rejecting the Google voice app.</p>
<p>So I was right about one thing: the iPad is going to move us one step closer to Zittrain&#8217;s dystopic <a href="http://futureoftheinternet.org/">Future of the Internet</a>. But because the iPad is much more of a general computing device than I expected, that step is going to be a much larger step, and Zittrain&#8217;s vision is coming true much faster than I thought. And that part is incredibly sad, no matter how badly I want to edit slides using finger-swipe gestures.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/01/31/i-was-wrong-about-the-ipad/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sometimes it&#8217;s not counter-intuitive</title>
		<link>http://benlog.com/articles/2009/12/27/sometimes-its-not-counter-intuitive/</link>
		<comments>http://benlog.com/articles/2009/12/27/sometimes-its-not-counter-intuitive/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 22:36:30 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[crypto]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1070</guid>
		<description><![CDATA[Bruce Schneier writes that it&#8217;s reasonable for unmanned drones to broadcast unencrypted video streams, because the video stream is not that useful to enemies, and given that many people need access to the video feed, the key distribution problem would be very difficult to manage, and some allies could be severely handicapped if they happened [...]]]></description>
			<content:encoded><![CDATA[<p>Bruce Schneier <a href="http://www.schneier.com/blog/archives/2009/12/intercepting_pr.html">writes that it&#8217;s reasonable for unmanned drones to broadcast unencrypted video streams</a>, because</p>
<ol>
<li> the video stream is not that useful to enemies, and</li>
<li> given that many people need access to the video feed, the key distribution problem would be very difficult to manage, and some allies could be severely handicapped if they happened not to have the key.</li>
</ol>
<p>So, Bruce is typically fantastic at finding those interesting areas of security where the answer is counter-intuitive. But huh? How can both of those points be true? If the video stream is valuable to allies, then I&#8217;m guessing it&#8217;s valuable to enemies.</p>
<p>But let&#8217;s say that, somehow, these contradictory points are, in fact, both true.</p>
<p>There isn&#8217;t a key management problem here. The command-and-control signal is already encrypted and authenticated, so the video feed could be encrypted via the same exact route back to the home base (which needs to happen anyways so the NSA pilots can, you know, pilot), at which point it is decrypted and can be syndicated to allies, troops on the ground, commanders, etc&#8230; I just don&#8217;t see the argument for the signal to be directly received by local troops, when the one person who needs the signal the most anyways is already sitting thousands of miles away.</p>
<p>Bruce is right that key management is often a very complicated problem. But I just don&#8217;t see how it&#8217;s relevant in this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2009/12/27/sometimes-its-not-counter-intuitive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a WRAP followup: maybe the goal was client-side certs?</title>
		<link>http://benlog.com/articles/2009/12/23/its-a-wrap-followup-maybe-the-goal-was-client-side-certs/</link>
		<comments>http://benlog.com/articles/2009/12/23/its-a-wrap-followup-maybe-the-goal-was-client-side-certs/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 19:48:23 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1059</guid>
		<description><![CDATA[I&#8217;m having some interesting offline followup discussions with folks about oAuth WRAP and my relatively negative reaction to it. One of the comments seems to be that SSL will recreate exactly the security that HMAC signatures were trying to achieve, and it was really hard for developers to do oAuth right in the first place. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having some interesting offline followup discussions with folks about oAuth WRAP and my <a href="http://benlog.com/articles/2009/12/22/its-a-wrap/">relatively negative reaction to it</a>. One of the comments seems to be that SSL will recreate exactly the security that HMAC signatures were trying to achieve, and it was really hard for developers to do oAuth right in the first place.</p>
<p>I definitely sympathize with &#8220;it&#8217;s hard to get security right,&#8221; and I certainly agree that we should begin to standardize oAuth libraries ASAP. The reference implementations are okay, but they&#8217;re not solid enough for widespread standardization, which means people are cooking up their own, which is bad news. So yes, being able to delegate the security implementation to a well tested library is a good idea.</p>
<p>But I don&#8217;t think server-side SSL replaces the security we got from HMAC-signed requests. The key idea of signed requests is that if I intercept a request, I can&#8217;t steal the credentials. The only way SSL compares is if certificates are definitely checked or if client-side certificates are used for authentication. I don&#8217;t buy the argument that oAuth WRAP client-side libraries will do proper certificate checking. And I think that, while very cool, client-side SSL certs would make life potentially more complicated for developers (and would rule out JavaScript implementations for the foreseeable future.)</p>
<p>I&#8217;m very open to the idea of simplifying oAuth, and maybe there&#8217;s something to oAuth WRAP that I&#8217;m not seeing&#8230;. but the point is, the current oAuth WRAP security claims are, I believe, misguided in practice, and I hope the oAuth WRAP team thinks this through a bit more before all the big name web sites standardize on it, and the next favored technique for hacking your Facebook account is DNS spoofing the oAuth WRAP transaction.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2009/12/23/its-a-wrap-followup-maybe-the-goal-was-client-side-certs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s a WRAP</title>
		<link>http://benlog.com/articles/2009/12/22/its-a-wrap/</link>
		<comments>http://benlog.com/articles/2009/12/22/its-a-wrap/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 18:58:49 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1053</guid>
		<description><![CDATA[I&#8217;m just finding out about oAuth WRAP, a new, simplified version of oAuth which some are calling the &#8220;valet key&#8221; approach to web data sharing: don&#8217;t give your Facebook password to a random web app, instead use oAuth to mint them a valet key that lets the app access only some specific portions of your [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m just finding out about <a href="http://bret.appspot.com/entry/oauth-wrap">oAuth WRAP</a>, a new, simplified version of oAuth which some are calling the &#8220;valet key&#8221; approach to web data sharing: don&#8217;t give your Facebook password to a random web app, instead use oAuth to mint them a valet key that lets the app access only some specific portions of your Facebook profile. I like and use oAuth, so I was a little bit confused as to what WRAP brings to the table. I read up a bit:</p>
<blockquote><p>
The main difference between OAuth and OAuth WRAP is that WRAP does not have elaborate token exchanges or signature schemes. Instead, all server-to-server WRAP calls happen via SSL. The &#8220;access token,&#8221; which grants your client the ability to make API calls on a user&#8217;s behalf, is protected by SSL rather than by a shared secret and signature scheme.
</p></blockquote>
<p>If I understand correctly, the experience is the same for the user, the connectivity requirements between the data host and the third-party consumer remain the same, but now we&#8217;ve gotten rid of those pesky signatures and instead we&#8217;re sending tokens in an HTTP header a bit like a password.</p>
<p>So, like a password, it can be replayed. And intercepted via Man-In-The-Middle. Oy.</p>
<p>But wait, you say, don&#8217;t worry, the token is sent over SSL, so it&#8217;s all good.</p>
<p>Right. What&#8217;s going to happen when someone &#8220;forgets to turn on SSL&#8221;, which is all too common when security is abstracted out &#8220;somewhere down in the stack.&#8221; Or when we stop dealing with those pesky certificate errors and just choose not to validate the cert, which will leave the protocol wide open to network attackers who can now literally play man-in-the-middle just by spoofing DNS on a wifi network, capturing the token, and replaying it to access all sorts of additional resources, effectively stealing the user&#8217;s credentials.</p>
<p>This might actually be <em>worse</em> than passwords, because at least you can work to educate users about SSL (and after their Facebook account gets hacked, they might actually care), but it&#8217;s very hard for users to gauge whether web applications are doing the right thing with respect to SSL certs when the SSL calls are all made by the backend which has trouble surfacing certificate errors.</p>
<p>I understand. Security is hard. Getting those timestamps and nonces right, making sure you&#8217;ve got the right HMAC algorithm&#8230; it&#8217;s non-trivial, and it slows down development. But those things are there for a reason. The timestamp and nonce prevent replay attacks. The signature prevents repurposing the request for something else entirely. That we would introduce a token-as-password web <em>security</em> protocol in 2010 is somewhat mind-boggling.</p>
<p>I see reasons to simplify oAuth. Maybe rethink the combination of consumer and access secrets, which is a bit messy. Maybe rethink the token renewal process and make it part of the core. But removing signatures? I think this is asking for long-term trouble in exchange for a modest amount of short-term simplicity.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2009/12/22/its-a-wrap/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
