<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;CEMEQ348eyp7ImA9WhVUGEg.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923</id><updated>2012-05-24T19:40:02.073+10:00</updated><category term="Windows Mobile" /><category term="Visual Studio" /><category term="Twitter" /><category term="Gootkit" /><category term="MVC" /><category term="Performance" /><category term="Personal Development" /><category term="China" /><category term="StillAlive" /><category term="Standards" /><category term="SQL Injection" /><category term="SQL Server" /><category term="Design Utopia" /><category term="StatSVN" /><category term="Career Development" /><category term="Security" /><category term="Apple" /><category term="Scam" /><category term="Azure" /><category term="1Password" /><category term="NDepend" /><category term="5 Minute Wonder" /><category term="SQL Compare" /><category term="OWASP" /><category term="Backup" /><category term="SQL Prompt" /><category term="SQL Data Generator" /><category term="Travel" /><category term="LinkedIn" /><category term="FxCop" /><category term="Conference" /><category term="Netsparker" /><category term="Passwords" /><category term="SQL Test" /><category term="SSL" /><category term="Product Review" /><category term="SQL Source Control" /><category term="Cloud" /><category term="K2" /><category term="Mobile" /><category term="ASafaWeb" /><category term="Continuous Integration" /><category term="Subversion" /><category term="Red Gate" /><category term="Online Identity" /><category term="SharePoint" /><category term="UX" /><category term="Corporate" /><category term="MVP" /><category term="WCSA" /><category term="Source Control Management" /><category term="Code Quality" /><category term="MSBuild" /><category term="Blogger" /><category term="IIS" /><category term="AppHarbor" /><category term="SQL Search" /><category term="Bing" /><category term="ReSharper" /><category term="iPhone" /><category term="TeamCity" /><category term="Database" /><category term="DotNetNuke" /><category term="Enterprise Software Platform" /><category term="Mozy" /><category term="Web Deploy" /><category term="SQL Data Compare" /><category term="People Management" /><category term="Internet Explorer" /><category term="Software Quality" /><category term="XSS" /><category term="elmah" /><category term="Entity Framework" /><category term=".NET" /><category term="Speaking" /><category term="Media" /><category term="Silverlight" /><title type="text">Troy Hunt's Blog</title><subtitle type="html">Observations, musings and conjecture about the world of software and technology</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.troyhunt.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.troyhunt.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default?start-index=11&amp;max-results=10&amp;redirect=false&amp;v=2" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>129</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>10</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/TroyHunt" /><feedburner:info uri="troyhunt" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>-33.824008</geo:lat><geo:long>151.251244</geo:long><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by/3.0/" /><feedburner:emailServiceId>TroyHunt</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry gd:etag="W/&quot;CUMCQH04eyp7ImA9WhVUF0w.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-2090131566500196324</id><published>2012-05-22T08:26:00.001+10:00</published><updated>2012-05-23T05:04:21.333+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-23T05:04:21.333+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Passwords" /><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>Everything you ever wanted to know about building a secure password reset feature</title><content type="html">&lt;p&gt;Recently I’ve had a couple of opportunities to think again about how a secure password reset function should operate, firstly whilst building this functionality into &lt;a href="https://asafaweb.com"&gt;ASafaWeb&lt;/a&gt; and secondly when giving some direction for someone else doing a similar thing. In that second instance, I wanted to point them to a canonical resource on the ins and outs of securely implementing a reset function. Problem is though, there isn’t one, at least not covering everything I believe is important. So here it is.&lt;/p&gt;  &lt;p&gt;You see, the world of forgotten passwords is actually a little murky. There are plenty of different perfectly legitimate angles and a bunch of pretty bad ones as well. Chances are you’ve experienced each many times as an end user so let me try and draw on some of these examples to see who’s doing it well, who’s not and what you need to focus on to get it right in your app.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;h4&gt;Password storage: hashing, encrypting and (gasp!) plain text&lt;/h4&gt;  &lt;p&gt;We can’t talk about what to do with forgotten passwords until we talk about how they’re stored in the first place. We’ve got three primary ways in which passwords will usually be persisted in a database:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Plain text. You have a password column and it sits there in the clear. &lt;/li&gt;    &lt;li&gt;Encrypted. Usually using symmetric encryption (the one key to both encrypt and decrypt), the encrypted password also sits there in a single column. &lt;/li&gt;    &lt;li&gt;Hashed. A one-way process (you can hash but not un-hash), the password is &lt;em&gt;hopefully&lt;/em&gt; accompanied by a salt, each of which sit in their own columns. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Let’s just get that first one out of the way quickly; &lt;strong&gt;&lt;em&gt;never store passwords in plain text!&lt;/em&gt;&lt;/strong&gt; Ever. One little &lt;a href="http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-1.html#"&gt;injection&lt;/a&gt; vulnerability, one sloppy backup or any one of a dozen other simple little slipups and it’s game over, all your passwords – sorry – &lt;strong&gt;&lt;em&gt;all your customer’s passwords&lt;/em&gt;&lt;/strong&gt; are in the public domain. Which, of course, means a better than average chance that &lt;a href="http://www.troyhunt.com/2011/06/brief-sony-password-analysis.html"&gt;all their passwords for all their other accounts on totally independent systems are in the public domain&lt;/a&gt;. And it’s your fault.&lt;/p&gt;  &lt;p&gt;Encryption is better, but still flawed. The problem with encryption is decryption; it’s possible to take those crazy looking ciphers and convert them back to plain text and once that happens, you’re back with readable passwords. How does this happen? A little flaw sneaks into the code which decrypts the password and makes it publicly accessible – that’s one way. The machine the encrypted data sits on gets owned – that’s another way. Another way again is that the database backup is obtained and someone also gets their hands on the encryption key, which is frequently pretty poorly managed.&lt;/p&gt;  &lt;p&gt;Which leads us with hashing. The idea of hashing is that it only goes one way; the only way you can ever match a password from a user with its hashed partner is to hash the input and compare it. In order to prevent attacks from tools such as rainbow tables, we add randomness to the process by using a salt (check out &lt;a href="http://www.troyhunt.com/2011/06/owasp-top-10-for-net-developers-part-7.html#uds-search-results"&gt;my post on cryptographic storage&lt;/a&gt; for the full picture). The bottom line is that when done properly, we can have a high degree of confidence that hashed passwords should never again become plain text (I’ll save the respective merits of various hashing algorithms for a later post).&lt;/p&gt;  &lt;p&gt;A quick argument about hashing versus encrypting; the only reason you should ever need to encrypt and not hash is when you want to see the plain text password and &lt;strong&gt;&lt;em&gt;you should never want to see this&lt;/em&gt;&lt;/strong&gt;, at least not in a typical website scenario. If you do, you’re probably doing something else wrong!&lt;/p&gt;  &lt;h4&gt;Always reset, &lt;em&gt;never&lt;/em&gt; remind&lt;/h4&gt;  &lt;p&gt;Ever been asked to build a password &lt;em&gt;reminder&lt;/em&gt; function? Take a step back and work through that request in reverse; why is a “reminder” needed? Because the user has forgotten their password. What are we really trying to do? Help them log back in again.&lt;/p&gt;  &lt;p&gt;I get it – the word “reminder” is (often) used colloquially – but what we’re really setting out to do here is to &lt;em&gt;&lt;strong&gt;securely help the user get back online&lt;/strong&gt;&lt;/em&gt;. Because we want to be secure, there are two reasons why a reminder (i.e. actually sending them their password) won’t work:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Email is an insecure channel. In the same way as we wouldn’t send anything sensitive over HTTP (we’d use HTTPS), the transport layer for email is not secure. Actually, it’s much worse than just sending info over an insecure transport protocol as your mail often persists in storage, is accessible by system admins, is readily forwarded and redistributed, is accessed by malware and so on and so forth. &lt;strong&gt;&lt;em&gt;Unencrypted mail is an extremely insecure channel.&lt;/em&gt;&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;&lt;em&gt;You shouldn’t have access to the password anyway.&lt;/em&gt;&lt;/strong&gt; Go back to that previous section about storage – all you should have is the password hash (with a nice strong salt), which means there’s no way you can pull the password back out and email it around anyway. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Let me demonstrate the problem courtesy of &lt;a href="http://www.usoutdoor.com"&gt;usoutdoor.com&lt;/a&gt;: Here’s a typical login page:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Requesting a password reminder from usoutdoor.com" src="http://lh6.ggpht.com/-YjDnPWYigwU/T7rAZjCJTFI/AAAAAAAADiI/EzlVmp1uDvo/SNAGHTML3181e493.png?imgmax=800" width="620" height="481" /&gt;&lt;/p&gt;  &lt;p&gt;Clearly the first problem is that the logon page hasn’t been loaded over HTTPS, but then they’ve also gone and offered to “Send Password”. Now maybe that’s an example of the earlier mentioned colloquial use of the term, let’s dig a big further and see what happens:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Password sent by usoutdoor.com" src="http://lh4.ggpht.com/-MiXTVqNf_Aw/T7rAa7WKSgI/AAAAAAAADiM/uW-VOZVAKWE/SNAGHTML318c0423.png?imgmax=800" width="620" height="259" /&gt;&lt;/p&gt;  &lt;p&gt;Not looking much better, unfortunately and the email confirms the problem:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Password sent in plain text by usoutdoor.com" src="http://lh4.ggpht.com/-tA8lYIl6je4/T7rAbzBq9TI/AAAAAAAADiU/KxAENou4oM4/SNAGHTML22b5d853.png?imgmax=800" width="620" height="258" /&gt;&lt;/p&gt;  &lt;p&gt;So this tells us a couple of important things about usoutdoor.com:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;They’re not hashing the password. At best they’re encrypting it but they’re quite possibly just storing it in the clear; we have no evidence to the contrary. &lt;/li&gt;    &lt;li&gt;They’re sending a persistent password – one we can go back and keep using over and over – via an insecure channel. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now that we’re clear on that, the trick becomes how we go about ensuring the reset process happens securely and the first step to doing that is to establish that the requestor is actually authorised to perform the reset. In other words, we need a bit of identity verification but before we do that, let’s look at what happens when identity is confirmed without first verifying the requestor is actually the owner of the account.&lt;/p&gt;  &lt;h4&gt;Username enumeration and the impact on anonymity&lt;/h4&gt;  &lt;p&gt;Here’s a problem best illustrated graphically. The problem is this:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Alotporn.com confirming existence of an account" src="http://lh6.ggpht.com/-ufmoZp0ZG6o/T7rAdmq553I/AAAAAAAADig/pYThnGhv2e4/image91.png?imgmax=800" width="620" height="480" /&gt;&lt;/p&gt;  &lt;p&gt;You see that? Focus now – we’re looking at the message which says “There is no user registered with this email address”. The problem, of course, is when a site like this confirms there &lt;em&gt;is&lt;/em&gt; a user registered with that email address. Bingo – you’ve just uncovered your husband’s / boss’s / neighbour’s porn fetish!&lt;/p&gt;  &lt;p&gt;Of course porn is a bit of a canonical example of where privacy is important, but the risk of matching an individual to a particular website goes beyond a potentially embarrassing disclosure such as this. One risk that arises is one of social engineering; once an attacker can match a person to a service, they have a piece of information that they can begin leveraging. For example, they may contact the individual whilst posing as a representative of the website and ask for additional information in a &lt;a href="http://www.fbi.gov/news/stories/2009/april/spearphishing_040109"&gt;spearphishing&lt;/a&gt; attack.&lt;/p&gt;  &lt;p&gt;This practice also opens up the risk of “username enumeration” where an entire collection of usernames or email addresses can be validated for existence on the website simply by batching requests and looking at the responses. Got a list of everyone’s email address from the office and a few spare minutes to do some scripting? You can see the problem!&lt;/p&gt;  &lt;p&gt;So what’s the alternative? Well it’s actually quite easy and &lt;a href="https://www.entropay.com"&gt;Entropay&lt;/a&gt; executes it very well:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Entropay emailing instructions to the provided address" src="http://lh5.ggpht.com/-iQE-CMwUKLo/T7rAe_xTboI/AAAAAAAADik/XPMokvc5TJU/SNAGHTML2fc7ceb3.png?imgmax=800" width="620" height="395" /&gt;&lt;/p&gt;  &lt;p&gt;What Entropay have done here is disclosed absolutely nothing about the existence of the email address in their system &lt;strong&gt;&lt;em&gt;to someone who doesn’t own that address&lt;/em&gt;&lt;/strong&gt;. If you &lt;em&gt;do&lt;/em&gt; own that address and it doesn’t exist in their system, you get a nice little email like this:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Entropay email explaining the account doesn&amp;#39;t exist" src="http://lh4.ggpht.com/-DYZxz0qSbOs/T7rAgH5NchI/AAAAAAAADis/ZdOPBSQqRLc/SNAGHTML3203cc13.png?imgmax=800" width="620" height="487" /&gt;&lt;/p&gt;  &lt;p&gt;Of course there may be legitimate use cases where someone either &lt;em&gt;thinks &lt;/em&gt;they registered at a website – but didn’t – or they did but with a different email address. The response above deals with both those scenarios very nicely. Obviously if the address was valid you’d get an email which would facilitate a password reset.&lt;/p&gt;  &lt;p&gt;The thing about the approach taken by Entropay is that identity verification happens via &lt;em&gt;email&lt;/em&gt; before any sort of online verification. One approach some sites take is to prompt the user with a secret question (more on this shortly) &lt;em&gt;before&lt;/em&gt; the reset can begin but of course the problem with this is that you have to answer the question along with providing some form of identification (either email or username) which then makes it almost impossible to respond intuitively without disclosing the existence of the account to an anonymous user.&lt;/p&gt;  &lt;p&gt;There is a &lt;em&gt;slight &lt;/em&gt;usability tax to pay using this approach and it’s that there is no immediate feedback when an invalid account is attempted to be reset. Of course this is the whole reason why we’re sending an email in the first place but from a legitimate end user perspective, if they’ve entered an invalid address then the first they’re going to know about it is when the email arrives. This may cause some frustration on their behalf, but it’s a small trade-off for an infrequent process.&lt;/p&gt;  &lt;p&gt;Just one more slightly tangential note on this while I’m here – log on facilities which disclose the validity of the username or email address have exactly the same problem. Always defer to the user with a “You username and password combination is invalid” message as opposed to explicitly confirming the existence of an identity (i.e. your username was correct but your password was incorrect).&lt;/p&gt;  &lt;h4&gt;Sending a reset password versus sending a reset URL&lt;/h4&gt;  &lt;p&gt;The next concept we have to deal with relates to how the password is reset and there are two common approaches:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Generate a new password on the server and email it &lt;/li&gt;    &lt;li&gt;Email a unique URL which will facilitate a reset process &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Despite &lt;a href="http://www.asp.net/web-forms/tutorials/security/admin/recovering-and-changing-passwords-cs"&gt;plenty of guidance to the contrary&lt;/a&gt;, the first point is really not where we want to be. The problem with doing this is that it means a &lt;strong&gt;&lt;em&gt;persistent password&lt;/em&gt;&lt;/strong&gt; – one you can go back with and use any time – has now been sent over an insecure channel and resides in your inbox. Chances are your inbox syncs to your mobile device(s) and possibly to your mail client plus it may reside online in your web-based mail service for who knows how long. The point is that &lt;strong&gt;&lt;em&gt;your mailbox should not be considered a long term secure storage facility&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;  &lt;p&gt;But there’s one more big problem with the first approach in that it makes the malicious lockout of an account &lt;em&gt;dead simple&lt;/em&gt;. If I know the email address of someone who owns an account at a website then I can lock them out of it whenever I please simply by resetting their password; it’s denial of service attack served up on a silver platter! This is why a reset is something that should only happen after successfully verifying the right of the requestor to do so.&lt;/p&gt;  &lt;p&gt;When we talk about a reset URL, we’re talking about a website address which is &lt;strong&gt;&lt;em&gt;unique to this specific instance of the reset process&lt;/em&gt;&lt;/strong&gt;. Obviously it must be random and not something guessable nor should it contain any external references to the account for which it’s facilitating the reset. For example, a reset URL should not simply be a path such as “Reset/?username=JohnSmith”.&lt;/p&gt;  &lt;p&gt;What we want to do is create a unique token which can be sent in an email as part of the reset URL then matched back to a record on the server alongside the user’s account thus confirming the email account owner is indeed the one attempting to reset the password. For example, the token may be “3ce7854015cd38c862cb9e14a1ae552b” and is stored in a table alongside the ID of the user performing the reset and the time at which the token was generated (more on that in a moment). When the email is sent out, it contains a URL such as “Reset/?id=3ce7854015cd38c862cb9e14a1ae552b” and when the user loads this, the page checks for the existence of the token and consequently confirms the identity of the user and allows the password to be changed.&lt;/p&gt;  &lt;p&gt;Now of course because the process above is going to (hopefully) give the user the ability to create a new password, we need to ensure that the URL is loaded over HTTPS. No, &lt;a href="http://www.troyhunt.com/2011/01/ssl-is-not-about-encryption.html"&gt;posting to HTTPS is not enough&lt;/a&gt;, that URL with the token must implement transport layer security so that the new password form cannot be &lt;a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack"&gt;MITM&lt;/a&gt;’d and the password the user creates is sent back over a secure connection.&lt;/p&gt;  &lt;p&gt;The other thing we want to do with a reset URL is to time limit the token so that the reset process must be completed within a certain duration, say within an hour. What this does is ensures that the window for which the reset can occur is kept to a minimum so should anyone obtain the reset URL they can only action it within a very small window. Of course an attacker can always go and begin the reset process again but they’ll then need to obtain another unique reset URL.&lt;/p&gt;  &lt;p&gt;Finally, we want to ensure that this is a one-time process. Once the reset process is complete, the token should be deleted so that the reset URL is no longer functional. As with the previous point, this is to ensure an attacker has a very limited window in which they can abuse the reset URL. Plus of course the token is no longer required if the reset process has completed successfully.&lt;/p&gt;  &lt;p&gt;Some of these steps may seem a little excessive, but they don’t detract at all from the usability of the feature and they &lt;em&gt;do&lt;/em&gt; add to the security, albeit in circumstances we’d hope would be uncommon. In 99% of cases, the user is going to action the reset within a very short period and they’re not going to reset the password again in the immediate future.&lt;/p&gt;  &lt;h4&gt;The role of CAPTCHA&lt;/h4&gt;  &lt;p&gt;Ah CAPTCHA, the security measure we all love to hate! In fact CAPTCHA isn’t so much a security measure as it is an identification measure – are you a human or are you a robot (or an automated script, as it may be). The intention is to avoid the automated submission of forms which of course &lt;em&gt;could&lt;/em&gt; be used as an attempt to breach security. In a password reset context, a CAPTCHA means the reset feature can’t be brute-forced either to spam an individual or to attempt to identify the existence of accounts (which of course won’t be possible if you’ve followed the guidance in the identity verification section earlier on).&lt;/p&gt;  &lt;p&gt;Of course CAPTCHA itself is not perfect; there are numerous precedents of “breaking” it programmatically and achieving reasonable success rates in the range of 60-70%. Then you have the approach I demonstrated in my post about &lt;a href="http://www.troyhunt.com/2012/01/breaking-captcha-with-automated-humans.html"&gt;Breaking CAPTCHA with automated humans&lt;/a&gt; where you could pay humans a fraction of a cent to solve each CAPTCHA and get a 94% success rate. So it has faults, but it does (slightly) raise the barrier to entry.&lt;/p&gt;  &lt;p&gt;Let’s take a look at PayPal’s approach:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="PayPal implementing CAPTCHA before password reset" src="http://lh4.ggpht.com/-qM_n6h4Ef0E/T7rAhU9wgrI/AAAAAAAADi0/3IPp5Mis4uY/SNAGHTML32291b43.png?imgmax=800" width="620" height="614" /&gt;&lt;/p&gt;  &lt;p&gt;In this case, the reset process simply can’t begin until the CAPTCHA is solved so &lt;em&gt;in theory&lt;/em&gt;, you can’t automate the process. In theory.&lt;/p&gt;  &lt;p&gt;For most web applications though, this is going to be overkill and will &lt;em&gt;definitely&lt;/em&gt; pose a usability overhead – people simply don’t like CAPTCHAs! A CAPTCHA is also the sort of thing you can retrofit later on if it’s required. If the service begins to get abused (this is where logging is important – more on that soon), dropping in a CAPTCHA is a piece of cake.&lt;/p&gt;  &lt;h4&gt;Secret questions and answers&lt;/h4&gt;  &lt;p&gt;With what we’ve looked at so far, we’ve been able to reset the password simply by having control of the email account. I say “simply”, but of course illegally gaining access to someone’s email account &lt;em&gt;should &lt;/em&gt;be a hard thing. But &lt;a href="http://en.wikipedia.org/wiki/Sarah_Palin_email_hack"&gt;it isn’t always&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Actually, that link above is about Sarah Palin having her Yahoo! account hacked and it serves a couple of purposes; firstly, it illustrates how easily (some) email accounts can be breached and secondly, it shows how poor secret questions can be abused – but we’ll come back to that one.&lt;/p&gt;  &lt;p&gt;The problem with password resets which are 100% dependent on email is that the account integrity of the site you’re trying to reset the password on then becomes 100% dependent on the email account integrity. Whoever has access to your email &lt;strong&gt;&lt;em&gt;now has access to any account that can be reset purely by receiving an email&lt;/em&gt;&lt;/strong&gt;. For these accounts, your email is truly the skeleton key to your online life.&lt;/p&gt;  &lt;p&gt;One way of mitigating this risk is to implement a secret question and answer pattern. You’ve no doubt seen this before; choose a question for which only you &lt;em&gt;should&lt;/em&gt; know the answer then you may be prompted for this before you’re able to perform a password reset. It gives that bit of additional assurance that the person attempting to perform the reset is indeed the owner of the account.&lt;/p&gt;  &lt;p&gt;Getting back to Sarah Palin, what went wrong here is that the answers to her secret question(s) were easily discoverable. Particularly once you have a highly public profile, information such as mother’s maiden name, education history or where someone might have lived in the past really isn’t that secret. In fact much of this can easily be discovered for almost anyone. And so it was with Sarah:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The hacker, David Kernell, had obtained access to Palin's account by looking up biographical details such as her high school and birthdate and using Yahoo!'s account recovery for forgotten passwords.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;This is primarily a design flaw on Yahoo!’s part; by providing or allowing such basic questions they fundamentally undermined the value of the secret question and indeed undermined the security of their system. Of course password resets of an email account are always going to be trickier because you may well not be able to validate ownership by sending the account holder an email (short of having a secondary address on file), but fortunately there aren’t a lot of use-cases these days for building such a system.&lt;/p&gt;  &lt;p&gt;Getting back to secret questions, one option is to allow the user to self-construct their own questions. The problem with this though is that you end up with either painfully obvious questions:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;What colour is the sky?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Questions which can put people in an uncomfortable position when a &lt;em&gt;human&lt;/em&gt; uses the secret question for verification (such as in a call centre):&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Who did I sleep with at the Christmas party?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Or frankly stupid questions:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;How do you spell “password”?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;When it comes to secret questions, people need to be saved from themselves! In other words, the site itself should define the secret question, or rather define a &lt;em&gt;series &lt;/em&gt;of secret questions from which the user can choose. And not just choose &lt;em&gt;one&lt;/em&gt; either; ideally, the user should define two or more secret questions &lt;strong&gt;&lt;em&gt;at the time of account registration&lt;/em&gt;&lt;/strong&gt; which can then be used as a second channel of identity verification. Having multiple questions adds a higher degree of confidence to the verification process plus gives you opportunity to add randomness (not always show the same question) plus provides a bit of redundancy should someone legitimate forget an answer.&lt;/p&gt;  &lt;p&gt;So what makes a good secret question? There are a few different factors:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;It should be &lt;strong&gt;concise&lt;/strong&gt; – the question is to the point and unambiguous &lt;/li&gt;    &lt;li&gt;The answer is &lt;strong&gt;specific&lt;/strong&gt; – you don’t want a question which could be answered in different ways by the same person &lt;/li&gt;    &lt;li&gt;The possible answers must be &lt;strong&gt;diverse&lt;/strong&gt; – a question about someone’s favourite colour would result in a small subset of possible answers &lt;/li&gt;    &lt;li&gt;Answer &lt;strong&gt;discovery &lt;/strong&gt;should be hard – if you can readily find the answer for &lt;em&gt;anyone&lt;/em&gt; (think high-profile people) then it’s no good &lt;/li&gt;    &lt;li&gt;The answer must be &lt;strong&gt;constant&lt;/strong&gt; over time – asking for someone’s favourite movie may result in a different answer a year from now &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;As it happens, there’s a website dedicated to good security questions which, unsurprisingly, is at &lt;a href="http://goodsecurityquestions.com/"&gt;GoodSecurityQuestions.com&lt;/a&gt;. Some of these seem quite good, others fail some of the tests above, particularly the “discovery” test.&lt;/p&gt;  &lt;p&gt;Let me walk you through how PayPal implements their secret questions and in particular, the extent they go verify identities. Earlier on we saw the page to begin the process (the one with the CAPTCHA), here’s what happens once you drop in an email address and solve the CAPTCHA:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="PayPal sending an email to begin the reset process" src="http://lh3.ggpht.com/-ci6Jcb8OhlQ/T7rAi62Rh-I/AAAAAAAADjA/u2Z9NfJkAw8/SNAGHTML230b5073.png?imgmax=800" width="620" height="380" /&gt;&lt;/p&gt;  &lt;p&gt;Which results in an email like this:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The PayPal email to begin the reset process" src="http://lh5.ggpht.com/-edyJUqDm1s4/T7rAkM1uecI/AAAAAAAADjE/-9IDPTyaKb0/SNAGHTML2311ff93.png?imgmax=800" width="620" height="528" /&gt;&lt;/p&gt;  &lt;p&gt;So far this is all very normal, but here’s what’s behind that reset URL:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Choosing to validate identity by a secret question on PayPal" src="http://lh6.ggpht.com/-6gJWuG4qGUA/T7rAlIpDfrI/AAAAAAAADjM/DT-g1X9vKbc/SNAGHTML327843c3.png?imgmax=800" width="620" height="472" /&gt;&lt;/p&gt;  &lt;p&gt;Right, so now the secret questions come into play. Actually, PayPal also allows password reset by verifying a credit card number so there’s an additional channel there which many sites won’t have access to. I simply cannot change my password without answering &lt;em&gt;both &lt;/em&gt;secret questions (or knowing the card number). Even if someone takes over my email account, they cannot reset the PayPal account unless they know some intimate information about me. What sort of information? Here are the secret question options PayPal gives you:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Possible secret questions on PayPal" src="http://lh3.ggpht.com/-PD2ezYPcP-I/T7rAm5ANKKI/AAAAAAAADjY/fMXU5K4crFk/SNAGHTML32f06573.png?imgmax=800" width="620" height="526" /&gt;&lt;/p&gt;  &lt;p&gt;The question about the school and the hospital might be a bit dubious on the “discoverability” test but the others aren’t too bad. But to add to the security, PayPal requires further verification of identity to &lt;em&gt;change&lt;/em&gt; secret question answers:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Confirming identity with a credit card on PayPal" src="http://lh6.ggpht.com/-hdNmvScJtxU/T7rAoO_fm4I/AAAAAAAADjc/uepB6FLixgk/SNAGHTML32cd7d83.png?imgmax=800" width="620" height="446" /&gt;&lt;/p&gt;  &lt;p&gt;PayPal is a pretty utopian example of a secure password reset: they implement CAPTCHA to mitigate against brute force, require two secret questions and then require another form of identify verification altogether just to change the answers – and that’s after you’re already logged in. Of course we’d &lt;em&gt;expect&lt;/em&gt; this from PayPal; they’re a financial institution and they handle lots of money. This doesn’t mean every password reset process should follow these steps – that’s overkill in most cases – but it’s a good reference point for when security is serious business.&lt;/p&gt;  &lt;p&gt;One nice thing about the secret question approach is that if you haven’t implemented it from day one, it can be a later addition if the risk profile as the asset being protected demand it. A good case in point is Apple who just recently rolled out this mechanism. When I went to update an app on iPad the other day, I was prompted with the following:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Apple asking for additional security info" src="http://lh5.ggpht.com/-dnk9yLY69UE/T7rApcqhnvI/AAAAAAAADjk/DtwyVhs8tPI/Photo-19-04-12-10-53-478.png?imgmax=800" width="250" height="187" /&gt;&lt;/p&gt;  &lt;p&gt;This then presented me with a screen to define several secret question and answer pairs and a rescue email:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Multple secret question and answer pairs on the iPad" src="http://lh6.ggpht.com/-3Jnkyenq3v0/T7rAqjGVxeI/AAAAAAAADjs/uyg02vDy6uE/Photo-19-04-12-10-54-3211.png?imgmax=800" width="365" height="417" /&gt;&lt;/p&gt;  &lt;p&gt;As with PayPal, the questions are pre-determined and some of them are actually pretty good:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Some of Apple&amp;#39;s secret question options" src="http://lh4.ggpht.com/-gRoOYSzHo7o/T7rArrgX0lI/AAAAAAAADj0/1wtaJFI_jx0/Photo-19-04-12-10-54-387.png?imgmax=800" width="365" height="221" /&gt;&lt;/p&gt;  &lt;p&gt;Each of the three question and answer pairs presents a different set of possible questions so there are quite a number of different ways an account can be configured.&lt;/p&gt;  &lt;p&gt;The other thing to consider with the answer component of the secret question is storage. Sitting it in the DB is plain text poses similar risks to doing the same with the password, namely that a database disclosure will immediately reveal the value and not only put the app at risk but quite possibly other totally unrelated apps which depend on the same secret questions (it’s &lt;a href="http://www.troyhunt.com/2011/01/why-your-apps-security-design-could.html"&gt;the Acai berry conundrum&lt;/a&gt; all over again). Secure hashing (a strong algorithm and cryptographically random salt) is an option, however unlike most password scenarios, there may be a legitimate reason to make the answer visible in plain text. A typical scenario is when a human operator is verifying an identity over the telephone. Now of course hashing is still feasible (the operator can simply enter the answer the customer provides), but at worst, the secret answer should have some level of cryptographic storage, even if it’s just symmetric encryption. Bottom line: &lt;strong&gt;&lt;em&gt;treat secret answers as secret!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Just one more thing on secret questions and answers – they’re more vulnerable to social engineering. Attempting to directly elicit an account’s password out of someone is one thing, striking up a conversation with them about their education history (a common secret question) is quite another. In fact you can quite legitimately have a discussion with someone about many aspects of their life which could constitute the secret question and not arouse suspicion. Of course the very intention of a secret question is that it relates to someone’s life experiences so that it is memorable and therein lies the problem – &lt;strong&gt;&lt;em&gt;people like to talk about their life experiences!&lt;/em&gt;&lt;/strong&gt; There’s not a lot you can do about that other than to ensure that the available secret questions are &lt;em&gt;less&lt;/em&gt; likely to be the kind that could be socially engineered out of someone.&lt;/p&gt;  &lt;h4&gt;Two factor authentication&lt;/h4&gt;  &lt;p&gt;Everything you’ve read up until now has involved verifying an identity based on &lt;strong&gt;&lt;em&gt;things the requestor knows&lt;/em&gt;&lt;/strong&gt;. They know their email address, they know how to access their email (i.e. they know their email address password) and they know the answers to some secret questions. “Knowledge” – or something you know – is considered to be one factor of authentication, the other two common factors are &lt;strong&gt;&lt;em&gt;something you have&lt;/em&gt;&lt;/strong&gt;, such as a physical device, and &lt;strong&gt;&lt;em&gt;something you are&lt;/em&gt;&lt;/strong&gt; such as your finger prints or retina.&lt;/p&gt;  &lt;p&gt;In most scenarios it’s a bit infeasible to perform biologic validation, particularly when we’re talking about web application security, so it’s usually the second attribute – something you have – which is used in two factor authentication (2FA). One common approach to this second factor is to use a physical token such as an &lt;a href="http://australia.emc.com/security/rsa-securid.htm"&gt;RSA SecurID&lt;/a&gt;:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="An RSA SecurID" src="http://lh3.ggpht.com/-tX9bCtCw9kE/T7rAsg6yZaI/AAAAAAAADj8/E421OugcbFA/SID7007.gif?imgmax=800" width="264" height="114" /&gt;&lt;/p&gt;  &lt;p&gt;Common uses for a physical token include authenticating to corporate VPNs and financial services. The premise involves authenticating to a service using both a password and the code on the token (which rotates frequently) combined with a PIN. In theory, an attacker must know the password, have the token and also know the token PIN in order to identify themself. In a password reset scenario the password is obviously not known, but possession of the token can be used to verify the legitimacy of the account claim. Of course like any security implementation, &lt;a href="http://www.wired.com/threatlevel/2011/08/how-rsa-got-hacked/"&gt;it’s not fool proof&lt;/a&gt;, but certainly it raises the bar to entry.&lt;/p&gt;  &lt;p&gt;One of the main problems with this approach is the cost and logistics of implementation; we’re talking distributing physical devices to every customer and educating them about a new process. Then of course they actually need to have the device on them when they need it which isn’t always the case with a physical token. Another option is to implement the second factor of authentication using SMS which in a 2FA scenario can be used as validation that the person instrumenting the reset process actually has the mobile phone of the account holder. Here’s what Google does:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Enabling 2FA on Google" src="http://lh6.ggpht.com/-o3LXM0-8BmQ/T7rAtwR4TrI/AAAAAAAADkE/Zwd4JEWvyfk/SNAGHTML1189cef3.png?imgmax=800" width="620" height="547" /&gt;&lt;/p&gt;  &lt;p&gt;Now you also need to have &lt;a href="http://googleblog.blogspot.com.au/2011/06/ensuring-your-information-is-safe.html"&gt;2-step verification enabled&lt;/a&gt;, but what this means is that the next time you need to reset your password, your mobile phone can become your second factor of authentication. Let me demonstrate how to initiate this this via my iPhone, for reasons which will soon become apparent:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Starting a password reset on Google" src="http://lh4.ggpht.com/-6ChMDyDgPlg/T7rAu1ceejI/AAAAAAAADkM/5BUW8kHu9YY/Photo-20-05-12-11-28-348.png?imgmax=800" width="620" height="317" /&gt;&lt;/p&gt;  &lt;p&gt;After identifying the email address of the account, Google recognises that 2FA has been enabled and we’re able to reset the account via verification that can be SMS’d to the account holders mobile phone:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Reseting a Google account when 2FA is enabled" src="http://lh5.ggpht.com/-2iATNORrpVQ/T7rAvyGnL2I/AAAAAAAADkU/KLY31zi894s/image20.png?imgmax=800" width="620" height="314" /&gt;&lt;/p&gt;  &lt;p&gt;We now need to elect to begin the reset process:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Actioning a 2FA password reset on Google" src="http://lh4.ggpht.com/-GlLp3gq9uU4/T7rAw49CGJI/AAAAAAAADkc/w-qcoji3Y78/image24.png?imgmax=800" width="620" height="192" /&gt;&lt;/p&gt;  &lt;p&gt;This sends an email off to the registered address:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Confirmation of a 2FA reset on Google" src="http://lh5.ggpht.com/-DvMkbiXkSzQ/T7rAx-u7dpI/AAAAAAAADkk/rTp6tMiRYJE/SNAGHTML13bc4ab4.png?imgmax=800" width="620" height="251" /&gt;&lt;/p&gt;  &lt;p&gt;The email then contains a reset URL:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Email from Google to begin a 2FA password reset" src="http://lh6.ggpht.com/-w5bT0ukQIXY/T7rAy4MsDZI/AAAAAAAADks/kGbkHeaPyMI/image255.png?imgmax=800" width="620" height="366" /&gt;&lt;/p&gt;  &lt;p&gt;When the reset URL is accessed, the SMS is sent and the website prompts for it to be entered:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Google prompt for the code from a 2FA reset" src="http://lh5.ggpht.com/-7skJYqqN0bI/T7rA0Wf9OKI/AAAAAAAADk0/wna5o59Y5xM/image32.png?imgmax=800" width="620" height="331" /&gt;&lt;/p&gt;  &lt;p&gt;Here’s that SMS:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="A reset code SMS&amp;#39;d by Google" src="http://lh4.ggpht.com/-7ap6rF2t16U/T7rA1X_Ar5I/AAAAAAAADk8/kKOPhuCUl4Q/image16.png?imgmax=800" width="620" height="239" /&gt;&lt;/p&gt;  &lt;p&gt;After it’s entered into the browser, we’re back into classic password reset territory:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Successful 2FA identity verification on Google" src="http://lh6.ggpht.com/-sTDEuaY9224/T7rA2T5-hQI/AAAAAAAADlI/RMcPbJsgMsM/image12.png?imgmax=800" width="620" height="331" /&gt;&lt;/p&gt;  &lt;p&gt;This might seem a little verbose – and it is (I think that 3rd iPhone screen could go) – but it does validate that the person conducting the reset has access to both the email address and the account holder’s mobile phone. This could well be 9 times more secure than an email only channel for password resets, but there’s a problem…&lt;/p&gt;  &lt;p&gt;The problem has to do with smart phones. The device below can verify only one factor of authentication – it can receive an SMS but not an email:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="A Nokia phone with no email capability" src="http://lh4.ggpht.com/-GLpUozXxK_o/T7rA3-Cit0I/AAAAAAAADlQ/fdMrMFX7UXI/9727818.gif?imgmax=800" width="126" height="252" /&gt;&lt;/p&gt;  &lt;p&gt;However this device can receive an SMS &lt;em&gt;and&lt;/em&gt; receive a reset email:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="An iPhone 4 with email and SMS capability" src="http://lh6.ggpht.com/-MnlVoRTnYRw/T7rA4p7JUbI/AAAAAAAADlU/jyRBW1ohG0Y/iphone-4-425x4808.jpg?imgmax=800" width="156" height="300" /&gt;&lt;/p&gt;  &lt;p&gt;The problem is that when we view email as the first factor of authentication then we view either SMS (or even an app generating tokens) as the second, these days that’s all bundled up into the one device. Of course what this means is that if someone gets their hands on your smartphone then all that convenience suddenly means you’re back to one channel; that second factor of “something you have” means you also have the first factor. And all of that’s behind a single 4 digit PIN – if the phone has even has a PIN in the first place &lt;em&gt;and&lt;/em&gt; has been locked.&lt;/p&gt;  &lt;p&gt;Yes, 2FA as Google has implemented it certainly provides additional security, but it’s not fool proof and it’s certainly not dependent on two entirely autonomous channels.&lt;/p&gt;  &lt;h4&gt;Resetting via username versus resetting via email address&lt;/h4&gt;  &lt;p&gt;Should you allow a reset only via email address? Or should you be able to reset via username too? The problem with resetting via username is that there’s no way to notify the user if the username was invalid that &lt;em&gt;doesn’t&lt;/em&gt; disclose the fact that someone else may have an account with that name. In the previous section, a reset via email ensured the legitimate owner of that email could always receive feedback without disclosing its existence in the system publicly. You can’t do that with just a username.&lt;/p&gt;  &lt;p&gt;So the short answer is: email only. If you’re trying to do it with username then you’re going to have cases where the user is left wondering what’s going on &lt;em&gt;or &lt;/em&gt;you’re disclosing the existence of accounts. Yes, it’s only a username and not an email address and yes, anybody can choose any (available) username they’d like but there’s still a good chance you’re going to implicitly disclose account holders due to the propensity of username reuse.&lt;/p&gt;  &lt;p&gt;So what happens if someone forgets their username? Assuming the username isn’t already the email address (which is often the case), then the process is similar to how a password reset begins – enter the email address then send a message to that address without disclosing its existence. The only difference is that this time around, the message simply contains the username rather than a password reset URL. Either that or the email explains that there is no account on file for that address.&lt;/p&gt;  &lt;h4&gt;Identity verification and email addresses accuracy&lt;/h4&gt;  &lt;p&gt;A key aspect of password resets – arguably &lt;em&gt;the&lt;/em&gt; key aspect – is verifying the identity of the person attempting to perform the reset. Is this indeed the legitimate owner of the account? Or someone attempting to either break into it or inconvenience the owner?&lt;/p&gt;  &lt;p&gt;Email is clearly the most convenient, most ubiquitous channel for verifying an identity. It’s not fool proof and there are many cases where simply being able to receive emails at the account holder’s address is not sufficient if a high degree of identity confidence is required (hence the use of 2FA), but it’s almost always the starting point of a reset process.&lt;/p&gt;  &lt;p&gt;One thing that’s critical if email is going to play a role is confidence that the email address is actually correct to begin with. If someone has a character wrong then clearly resets aren’t going to get through. An email verification process at the point of registration is a sure way of ensuring the address is correct. We’ve all seen this in practice; you register, an email is sent to you with a unique URL you need to click through to which therefore verifies you are indeed the holder of that email account. Not being able to log on until this process is complete ensures there is motivation to validate the email address.&lt;/p&gt;  &lt;p&gt;As with many aspects of security, this model imposes a usability overhead in exchange for giving us a greater degree of security in terms of confidence in the user’s identity. This might be fine for a site where the user places a high value on being able to successfully register and is happy to add one more step to the process (paid services, banking, etc.) but it’s the sort of thing they may well just walk away from if they perceive the account as being a “throwaway” such as simply a means of commenting on a post.&lt;/p&gt;  &lt;h4&gt;Identifying who initiated the reset process&lt;/h4&gt;  &lt;p&gt;Clearly there is scope for abusing the password reset feature and evildoers can do so in a number of different ways. One very easy trick we can use to help verify the source of the request – one which &lt;em&gt;usually&lt;/em&gt; works – is to attach the IP address of the requestor to the reset email. What this does is equips the recipient with &lt;em&gt;some &lt;/em&gt;information to identify the source of the request.&lt;/p&gt;  &lt;p&gt;Here’s an example from the reset feature I’m presently building into ASafaWeb:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="An ASafaWeb password reset email with info about the requestor&amp;#39;s IP" src="http://lh6.ggpht.com/-mAGNf1KUKto/T7rA5teBIqI/AAAAAAAADlg/oZ0A9LZrOjM/SNAGHTMLfe785f6.png?imgmax=800" width="620" height="311" /&gt;&lt;/p&gt;  &lt;p&gt;That “find out more” link takes you off to &lt;a href="http://www.ip-adress.com"&gt;ip-address.com&lt;/a&gt; which will give you things like the location and organisation of the requestor:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="IP address info about the password reset requestor" src="http://lh5.ggpht.com/-mRMuJ8RwJPk/T7rA7OESciI/AAAAAAAADlk/GXAG2BPnDAc/SNAGHTMLfb62013.png?imgmax=800" width="413" height="253" /&gt;&lt;/p&gt;  &lt;p&gt;Now of course anyone wanting to hide their identity has numerous ways of obfuscating their real IP address, but this is a neat little way to put some form of identity to the requestor and in &lt;em&gt;most&lt;/em&gt; cases, it will give you a good idea of who was behind the reset request.&lt;/p&gt;  &lt;h4&gt;Notifying a change via email&lt;/h4&gt;  &lt;p&gt;One theme which has pervaded across this post is communication; tell the account holder as much as possible about what is going on at each step in the process without disclosing anything which could be used for nefarious purposes. It’s the same thing once the password has actually been changed – &lt;strong&gt;&lt;em&gt;let the owner know!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A change of password can come from one of two different sources:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Changing the password while already logged on because the owner wants something different &lt;/li&gt;    &lt;li&gt;Resetting the password while logged off because the owner has forgotten it &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Whilst this is a post primarily about resets, a notification in the first example above mitigates the risk of someone else changing the password without the legitimate owner’s knowledge. How could this happen? A very common scenario is that someone else has obtained the legitimate owner’s password (reused one breached from another location, key logged, easily guessable, etc.) and has decided to change it and lock them out. Without an email notification, the real owner has no idea of the change.&lt;/p&gt;  &lt;p&gt;Now of course in the reset scenario the owner must have already initiated the process (or defeated the various identity verification measures outlined above) so the change &lt;em&gt;shouldn’t&lt;/em&gt; come as a surprise to them, but email notification is positive feedback and additional verification. Besides, it makes for a consistent experience in both of the scenarios above.&lt;/p&gt;  &lt;p&gt;Oh, and in case it’s not already obvious, &lt;strong&gt;&lt;em&gt;don’t email them the new password!&lt;/em&gt;&lt;/strong&gt; Some of you may laugh, but &lt;a href="http://www.dotnetnuke.com"&gt;it happens&lt;/a&gt;:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="DotNetNuke emailing a new password in plain text" src="http://lh6.ggpht.com/-XU1WAulCskQ/T7rA8BnPSDI/AAAAAAAADls/b4iUdO70IEA/SNAGHTML121397c3.png?imgmax=800" width="620" height="401" /&gt;&lt;/p&gt;  &lt;h4&gt;Log, log and then log some more&lt;/h4&gt;  &lt;p&gt;The thing about a password reset feature is that it’s ripe for abuse, either by an attacker wanting to gain access to an account of someone just wanting to cause mischief and inconvenience for the account holder or system owner. Many of the practices discussed above will help mitigate abuse, but they won’t stop it and they certainly won’t stop people from attempting to misuse the feature.&lt;/p&gt;  &lt;p&gt;One practice that can be absolutely invaluable for detecting malicious behaviour is logging and I mean &lt;strong&gt;&lt;em&gt;really extensive logging&lt;/em&gt;&lt;/strong&gt;. Log failed log on attempts, log password resets, log password changes (i.e. while the user is already logged on) and basically log anything you can that will help you identify what’s going in should you really need it in the future. Even log individual &lt;em&gt;parts &lt;/em&gt;of the process, for example a good reset feature will involve initiating the reset via the website (log the request and log attempts to reset with an invalid username or email), log the visit to the website with the reset URL (including attempts to use an invalid token) then log the success or failure of the secret question’s answer.&lt;/p&gt;  &lt;p&gt;Now when I say logging, you don’t just want a record of the fact the page was loaded, you want to collect as much info as you can &lt;strong&gt;&lt;em&gt;so long as it’s not sensitive&lt;/em&gt;&lt;/strong&gt;. People, &lt;strong&gt;&lt;em&gt;please don’t log the password!&lt;/em&gt;&lt;/strong&gt; What you do want to log is the identity of the authenticated user (they’ll be authenticated if they’re &lt;em&gt;changing&lt;/em&gt; an existing password or if they’re attempting to reset &lt;em&gt;someone else’s&lt;/em&gt; while logged in), any attempted usernames or email addresses plus any reset tokens they attempted to use. But you also want to log things like IP address and if possible, even request headers. This allows you to reconstruct not just &lt;em&gt;what &lt;/em&gt;the person (or attacker) was attempting to do, but &lt;em&gt;who&lt;/em&gt; they were.&lt;/p&gt;  &lt;h4&gt;Delegating responsibility to other providers&lt;/h4&gt;  &lt;p&gt;If this all just seems like a lot of hard work, you’re not alone in your thinking. The reality is that building a secure account management facility isn’t simple. It’s not that it’s technically hard, it’s just that there are a lot of nuts and bolts involved. It’s not just resets, there’s the whole registration process, secure password storage, handling multiple invalid login attempts and so on and so forth. Whilst &lt;a href="http://www.troyhunt.com/2011/10/5-minute-wonders-aspnet-membership.html"&gt;I advocate using pre-built functionality such as the ASP.NET membership provider&lt;/a&gt;, there’s still a lot of work to be done.&lt;/p&gt;  &lt;p&gt;These days there are numerous third party providers who are happy to take the pain of writing all this yourself and abstract it all away into a managed service. The options include OpenID, OAuth and even Facebook, among others. Some people &lt;a href="http://www.codinghorror.com/blog/2008/05/openid-does-the-world-really-need-yet-another-username-and-password.html"&gt;swear by this model&lt;/a&gt; (indeed OpenID has proven to be very successful on Stack Overflow), but then others &lt;a href="http://wekeroad.com/2010/11/17/open-id-is-a-party-that-happened/"&gt;literally find it a nightmare&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Undoubtedly, a service like OpenID takes a number of problems away from the developer but also undoubtedly, it introduces all new ones. Does it have a role to play? Yes, but clearly we’re not seeing authentication providers adopted en mass. Banks, airlines even shopping – I can’t think of a single one which doesn’t impalement their own authentication mechanism and there are clearly some very good reasons for that.&lt;/p&gt;  &lt;h4&gt;Malicious resets&lt;/h4&gt;  &lt;p&gt;One thing about each of the examples above is that the old password is only rendered useless &lt;strong&gt;&lt;em&gt;after the account owner’s identity has been verified&lt;/em&gt;&lt;/strong&gt;. This is very important as if the account could be reset &lt;em&gt;before&lt;/em&gt; verifying identity and then the door is opened for all sorts of malicious activity.&lt;/p&gt;  &lt;p&gt;Here’s an example: someone is bidding at an auction site and towards the end of the bidding process they lock out competing bidders by initiating the reset process thus removing their competition. Clearly there can be major adverse results if a poorly designed reset feature can be abused. Mind you, account lockouts by invalid login attempts is a similar story, but that’s one for another post.&lt;/p&gt;  &lt;p&gt;As I mentioned earlier, allowing anonymous users the ability to reset anyone’s account simply by knowing their email address is a denial of service attack just waiting to happen. It may not be a &lt;a href="http://en.wikipedia.org/wiki/Denial-of-service_attack"&gt;DOS&lt;/a&gt; in the way we often think of it, but there’s no faster way to lock someone out of their account than though a poorly designed password reset feature.&lt;/p&gt;  &lt;h4&gt;The weakest link&lt;/h4&gt;  &lt;p&gt;All of what you’ve read above is fantastic in terms of securing a single account, but one thing you need to remain conscious of is the ecosystem around the account you’re securing. Let me give you an example:&lt;/p&gt;  &lt;p&gt;ASafaWeb is hosted on the very excellent service provided by AppHarbor. The reset process for their hosting account goes like this:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The AppHarbor sign in page" src="http://lh6.ggpht.com/-weoRiMCmOV0/T7rA9-6ofEI/AAAAAAAADl4/m60a8ytcMH4/image2.png?imgmax=800" width="528" height="249" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Begining a password reset on AppHarbor" src="http://lh6.ggpht.com/-Vcj0tkpsIOY/T7rA_i31fCI/AAAAAAAADmA/a9y-XbFI7-w/image5.png?imgmax=800" width="532" height="219" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="AppHarbor confirmation of a new password having been sent" src="http://lh6.ggpht.com/-evis_0MQSlM/T7rBAdkaYZI/AAAAAAAADmI/j6itIUPQujA/image23.png?imgmax=800" width="620" height="89" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="AppHarbor email with a new password" src="http://lh4.ggpht.com/-lBk8BLqXBIo/T7rBBRnknFI/AAAAAAAADmM/BoOc23npNYQ/image17.png?imgmax=800" width="620" height="312" /&gt;&lt;/p&gt;  &lt;p&gt;After reading all the earlier info in this post it’s easy to see there a few areas which, in a perfect world, we’d approach a bit differently. The point I want to make here though is that if I publish a site such as ASafaWeb onto the AppHarbor service then implement some great secret questions and answers, throw in a second factor of authentication and do everything else by the book, none of this will change the fact that the weakest link in the process can trump all of this. After all, if someone can successfully authenticate to AppHarbor using my credentials then they can go and reset every single ASafaWeb account to whatever password they like anyway!&lt;/p&gt;  &lt;p&gt;The point is that the strength of the security implementation needs to be looked at holistically; you need to threat model each and every entry point in the system, even if it’s just a cursory process such as what I did above with AppHarbor. This is enough to give me a good indication of how much effort I should be investing in the ASafaWeb password reset process.&lt;/p&gt;  &lt;h4&gt;Tying it all together&lt;/h4&gt;  &lt;p&gt;This post contains a lot of information to absorb so let me distil it down to a simple visual representation:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Password reset workflow" src="http://lh5.ggpht.com/-ke9GVduXaaY/T7rBCWHFkYI/AAAAAAAADmY/xvEOczv44Zg/Password-Reset5.png?imgmax=800" width="589" height="665" /&gt;&lt;/p&gt;  &lt;p align="left"&gt;Keep in mind also that you want to be logging the activity at as many of these points as possible. And that’s it – easy!&lt;/p&gt;  &lt;h4&gt;Summary&lt;/h4&gt;  &lt;p&gt;If this seems like a comprehensive post, consider that there’s plenty of additional material I &lt;em&gt;could&lt;/em&gt; have included but elected not to for the sake of brevity; the role of a rescue email address, what happens if you lose access to the email on the account (i.e. you change jobs) and so on and so forth. As I said earlier, it’s not that resets are difficult, it’s just there are a lot of angles to it.&lt;/p&gt;  &lt;p&gt;Even though resets aren’t difficult, they’re often implemented poorly. We saw a couple of examples above where the implementation &lt;em&gt;could&lt;/em&gt; lead to problems and there are many more precedents where resets gone wrong &lt;em&gt;did&lt;/em&gt; cause problems. Just the other day it seems that &lt;a href="http://arstechnica.com/uncategorized/2012/05/bitcoins-worth-87000-plundered/"&gt;a reset was abused to steal $87k worth of Bitcoins&lt;/a&gt;. That’s a serious adverse result!&lt;/p&gt;  &lt;p&gt;So take care with your resets, &lt;a href="http://en.wikipedia.org/wiki/Threat_model"&gt;threat model&lt;/a&gt; the various touch points and keep your black hat on while building the feature because if you don’t, there’s a good chance that someone else will!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-2090131566500196324?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/eyiTUH6WjqE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/2090131566500196324/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/05/everything-you-ever-wanted-to-know.html#comment-form" title="24 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/2090131566500196324?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/2090131566500196324?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/eyiTUH6WjqE/everything-you-ever-wanted-to-know.html" title="Everything you ever wanted to know about building a secure password reset feature" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/-YjDnPWYigwU/T7rAZjCJTFI/AAAAAAAADiI/EzlVmp1uDvo/s72-c/SNAGHTML3181e493.png?imgmax=800" height="72" width="72" /><thr:total>24</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/05/everything-you-ever-wanted-to-know.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkEMRHk_fip7ImA9WhVUEk0.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-8062532743725898972</id><published>2012-05-17T07:44:00.001+10:00</published><updated>2012-05-17T07:44:45.746+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-17T07:44:45.746+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="AppHarbor" /><category scheme="http://www.blogger.com/atom/ns#" term="Cloud" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><title>Talking cloud: Not all .NET roads lead to Microsoft</title><content type="html">&lt;p&gt;Strangely enough, there are time when I talk about things that aren’t directly related to security and yesterday’s guest appearance on the Uhuru podcast was one of these. In fact “the cloud” is something I’m deeply interested in and have spent a lot of time thinking about and working with lately, one significant of example of which has been the use of &lt;a href="http://appharbor.com"&gt;AppHarbor&lt;/a&gt; for hosting &lt;a href="https://asafaweb.com/"&gt;ASafaWeb&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Yesterday I had a short chat to &lt;a href="https://twitter.com/#!/msurkan"&gt;Michael Surkan&lt;/a&gt; from Uhuru Software on how I was adapting to the new world cloud order and particularly what I like about the AppHarbor offering. I’d had some involvement with the Azure in the very early days and made the decision to choose AppHarbor about a year back so hopefully those timeframes put some of my comments in context (but I’m sure people more knowledgeable about Azure than me will call me on the inevitable mistakes in what I said!). This is now up on the Uhuru website:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Listen:&lt;/strong&gt; &lt;strong&gt;&lt;a href="http://www.uhurusoftware.com/blog/blog/2012/may/not-all-net-roads-lead-to-microsoft.aspx"&gt;Not all .NET roads lead to Microsoft&lt;/a&gt;&amp;#160;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;We had a good chat offline afterwards and one thing that really stuck out is the number of players entering the cloud market and the different angles they’re approaching IaaS / PaaS / SaaS from. It’s great news for those of us on the development side as we can choose from a much broader range of app hosting models than we ever had access to before. Offerings such as Azure are a very different paradigm to the likes of AppHarbor which is very different again to what you get from the Amazon offerings. Good times to be a developer!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-8062532743725898972?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/pRqUh_eJ6Bc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/8062532743725898972/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/05/talking-cloud-not-all-net-roads-lead-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8062532743725898972?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8062532743725898972?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/pRqUh_eJ6Bc/talking-cloud-not-all-net-roads-lead-to.html" title="Talking cloud: Not all .NET roads lead to Microsoft" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/05/talking-cloud-not-all-net-roads-lead-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkQHQXs-fyp7ImA9WhVVFUw.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-8003339602233660359</id><published>2012-05-09T07:58:00.001+10:00</published><updated>2012-05-09T07:58:50.557+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-09T07:58:50.557+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term=".NET" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><title>Speaking about ASP.NET security on the OWASP podcast</title><content type="html">&lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="OWASP logo" align="right" src="http://lh4.ggpht.com/-dtHKWFeuyOU/T6mXFvCg6JI/AAAAAAAADho/J-3ouSkj54Q/owasp_logo%25255B3%25255D.jpg?imgmax=800" width="135" height="135" /&gt;I’ve been writing and speaking about OWASP for long enough now that it was probably about time I contributed to the podcast so when &lt;a href="http://twitter.com/manicode"&gt;Jim Manico&lt;/a&gt; invited me to talk, it was a no-brainer! I had a good chat with Jim about a range of aspects related to ASP.NET; good stuff in the framework, not such good stuff in the framework, where I’m seeing people go wrong with .NET security and then a bit about some of the things I’m doing in terms of writing the &lt;a href="http://www.troyhunt.com/2011/12/free-ebook-owasp-top-10-for-net.html"&gt;OWASP Top 10 for .NET devs&lt;/a&gt; and &lt;a href="https://asafaweb.com/"&gt;ASafaWeb&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;You can &lt;a href="https://www.owasp.org/download/jmanico/owasp_podcast_91.mp3"&gt;listen to it now via MP3&lt;/a&gt; or do yourself a favour and &lt;a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=300769012"&gt;subscribe to the podcast on iTunes&lt;/a&gt; or &lt;a href="https://www.owasp.org/download/jmanico/podcast.xml"&gt;via RSS&lt;/a&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-8003339602233660359?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/uRpBuTGDY9w" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/8003339602233660359/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/05/speaking-about-aspnet-security-on-owasp.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8003339602233660359?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8003339602233660359?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/uRpBuTGDY9w/speaking-about-aspnet-security-on-owasp.html" title="Speaking about ASP.NET security on the OWASP podcast" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-dtHKWFeuyOU/T6mXFvCg6JI/AAAAAAAADho/J-3ouSkj54Q/s72-c/owasp_logo%25255B3%25255D.jpg?imgmax=800" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/05/speaking-about-aspnet-security-on-owasp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYMRH0yfip7ImA9WhVVFE8.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-914584671011146332</id><published>2012-05-08T06:23:00.001+10:00</published><updated>2012-05-08T06:23:05.396+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-08T06:23:05.396+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="Scam" /><title>Interview with the man behind Comantra, the “cold call virus scammers”</title><content type="html">&lt;p&gt;If you live in a western country and have a landline telephone with a listed phone number, chances are you’ve been “cold called” by someone on the other side of the world with an introduction that goes something like this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Hello, I am from the Microsoft technical support division and I am calling you because we have detected some problems with your computer. This is very important – I need you to go and turn your computer on right away…”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;It doesn’t matter if you have a computer, in fact it doesn’t matter if you’ve &lt;em&gt;never even touched a computer&lt;/em&gt; because these calls are totally random. There is no implicit support that will proactively monitor your computer from a central location, these calls are nothing more than a scam intended to prey on the fear of unsuspecting people who can be convinced there are genuine problems with their PC so that they can be parted from their hard earned cash for “support” they don’t need.&lt;/p&gt;  &lt;p&gt;I had been on the receiving end of this scam myself a number of times so &lt;a href="http://www.troyhunt.com/2012/04/type-www-ok-w-w-w-d-o-t-antagonising.html"&gt;I began recording several of the events&lt;/a&gt; and posting them to YouTube and this blog. Tens of thousands of views and hundreds of comments later, its clear this scam is rampant and many people are indeed being stung by it.&lt;/p&gt;  &lt;p&gt;So I decided to contact the man behind the company which most frequently features in these scam calls: Comantra. That man is &lt;a href="http://www.linkedin.com/in/rajeshsprofile"&gt;Rajesh Bajaj&lt;/a&gt;:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Rajesh Bajaj" src="http://lh3.ggpht.com/-AMpPuDP9Ccs/T6gvCTgRMJI/AAAAAAAADhE/2Z45sPqHWKA/39feacb7.jpg?imgmax=800" width="313" height="292" /&gt;&lt;/p&gt;  &lt;p&gt;I came across Rajesh after doing some basic research on Comantra and &lt;a href="https://www.google.com.au/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=rajesh+bajaj+comantra"&gt;a quick Google&lt;/a&gt; confirms he is indeed the man to talk to. As it turns out, &lt;a href="http://comantras.blogspot.com.au/2011/10/comantra.html"&gt;Rajesh has his own counterview of how Comantra operates&lt;/a&gt; and was willing to answer some email questions which I promised to reproduce in their entirety.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;h4&gt;The interview&lt;/h4&gt;  &lt;p&gt;&lt;strong&gt;1. What is your role at Comantra?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;I am the director&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;2. Comantra describes themselves as a “technical support service”. How does Comantra usually acquire new customers?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Please check the below link it    &lt;br /&gt;&lt;a href="https://www.comantra.net/site/news/105"&gt;https://www.comantra.net/site/news/105&lt;/a&gt;     &lt;br /&gt;&lt;a href="http://comantra.wordpress.com/2012/03/12/long-awaited-new-mantra-from-comantra-is-all-set-to-strengthen-brand-repositioning/"&gt;http://comantra.wordpress.com/2012/03/12/long-awaited-new-mantra-from-comantra-is-all-set-to-strengthen-brand-repositioning/&lt;/a&gt;     &lt;br /&gt;we are not not accepting any fresh registration.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. There have been reports of Comantra “cold calling” perspective customers in countries such as Australia and the UK. Has Comantra ever made unsolicited phone calls to perspective customers?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Yes, telemarketing and telesales also was part of our sales team however sales team was suppose to stick to a quality script like &lt;strong&gt;its as pc health check call&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;4. There are claims that operators purporting to be from Comantra have phoned individuals and advised them that their PC is infected with viruses. Is there any truth to this or is it a case of Comantra being a “victim of organised reputation assault” as you’ve suggested on your blog?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Yes you are correct we have been victim of organised reputation assault. We were following a very strong and a quality script like &lt;strong&gt;its as pc health check call&lt;/strong&gt; however we have received number complaints about it even though we have stop the registration we still get mail that they received the call from comantra. Our research team has also found that there are some companies who are making cold calls without even having a website and with the customer demand, different companies website are presented whom they don’t even relate to. They also charge them with western union.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;5. One of the services Comantra offers is the detection and removal of malware and spyware. How is malicious software usually identified by Comantra and can you do this remotely for individuals who are not yet customers?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Malware or spyware removal is a job of a tool the only expertise required is that we have choose the correct tool for the stipulated problem.&lt;/p&gt;  &lt;p&gt;Yes do entertain non registered customers as well we show them our technical team skill and also if they like the service and happy with result they pay us accordingly like for a incident or a annual subscription.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;6. Have Comantra staff ever been trained to refer to warnings in the Windows Event Viewer as harmful files which indicate infection on the PC?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;no&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;7. Has Comantra ever sold Windows warrantees and if so, what does this comprise of?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;No, we only cover software part which is windows, the platform on which the major computer runs could be said as AMC in which we do not cover hardware part.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;8. Are you aware of any other organisations making cold calls and claiming to have remotely identified viruses on individuals’ PCs?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;No comments&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;9. In September last year, it was reported that Microsoft ejected Comantra from its Gold Partner program. Could you tell us a little more about this situation?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This was really disappointing for us it took a lot for us to get this we even discussed this matter with Microsoft to reinstate back our status but was we met the failure in it.&lt;/p&gt;  &lt;p&gt;The fair reason was a negative reputation for our company which would have encouraged the Microsoft in taking this decision&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;10. Is there anything else you’d like to add about Comantra in relation to the claims of it being involved in a scamming program?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;With complete negative result about our company we were forced to stop the registration and we have closed our sales team and are only operating with our technical department to serve our registered customers. However we we are building a very strong and tested marketing strategy to get the new customer. we have a plan to start a fresh registration again in the near future which will not include telesales only inbound calls will be entertained.&lt;/p&gt;  &lt;h4&gt;Closing comments&lt;/h4&gt;  &lt;p&gt;Let me list out a few observable facts. Firstly, Comantra’s website is located at &lt;a href="https://comantra.net"&gt;comantra.net&lt;/a&gt; and a &lt;a href="http://who.godaddy.com/whoisverify.aspx?domain=comantra.net&amp;amp;prog_id=godaddy"&gt;WHOIS on the domain name&lt;/a&gt; confirms Rajesh’s involvement:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="WHOIS for comantra.net" src="http://lh3.ggpht.com/-zCgq2qnqI0c/T6gvDqdMduI/AAAAAAAADhM/g3hQ4lJznlU/SNAGHTMLced26673.png?imgmax=800" width="424" height="517" /&gt;&lt;/p&gt;  &lt;p&gt;The website lists the Australian phone number 0872001644:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="Contact Australian phone number on the Comantra website" src="http://lh4.ggpht.com/-MkjSQcrbR3M/T6gvG3WM-mI/AAAAAAAADhU/j6Qa6mJouUs/SNAGHTML4e64015%25255B3%25255D.png?imgmax=800" width="620" height="240" /&gt;&lt;/p&gt;  &lt;p&gt;As I got more involved in tracking this scam, a number of people contacted me and provided me with &lt;em&gt;this number&lt;/em&gt; and Comantra’s name, both of which had been left with them by callers claiming to have remotely detected malicious activity on their PC. A &lt;a href="https://www.google.com.au/search?sourceid=chrome&amp;amp;ie=UTF-8&amp;amp;q=0872001644"&gt;Google search of this number&lt;/a&gt; returns numerous results about being cold called by Comantra and the Event Viewer being used as a means of convincing people of the presence of viruses. There is also a UK number – 01916451644 – and a US number – 8882266073 – both of which yield similar search results.&lt;/p&gt;  &lt;p&gt;This is also the phone number &lt;em&gt;I called&lt;/em&gt; in my video about &lt;a href="http://www.troyhunt.com/2012/02/scamming-scammers-catching-virus-call.html"&gt;Scamming the scammers&lt;/a&gt;. During this (admittedly lengthy) video, there are numerous points where the identity of the organisation is confirmed as being Comantra, including when I’m taken to their site to register then make payment:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Registration on the Comantra website during a previous call" src="http://lh5.ggpht.com/-_qFo0dVFZlQ/T6gvJVOTdLI/AAAAAAAADhc/5sA-O45oPAs/image5.png?imgmax=800" width="620" height="324" /&gt;&lt;/p&gt;  &lt;p&gt;The Windows 7 image I used in the video was a clean install with all the latest service packs, patches and running Microsoft Security Essentials. It was 100% free of malicious files or anything else which would cause adverse behaviour by the machine.&lt;/p&gt;  &lt;p&gt;During the video and after being directed to the Event Viewer, I was told “This is the errors and the warnings that are in the computer, these are the very harmful files in the computer” followed by “That is the reason your computer is having a lot of problems”. When I asked about the errors I was told “These are the corrupted files” then “This are not functioning properly in the computer” and “The software part of your computer is getting corrupted day by day”.&lt;/p&gt;  &lt;p&gt;When discussing the Windows warranty, I was told “You've got two types of warranty on the computer, one is the software and another is the hardware” then “The software one is for 4 years and the hardware one is for 5 years” and “As the software warranty expired from the computer that's why your computer is experiencing problems”. When I asked if I could pay the warranty directly to Microsoft, I was told “No, as we are the service providers of Windows operating system” and “We take care all the users of Windows operating system all over the world”.&lt;/p&gt;  &lt;p&gt;The discussions above were indisputably held with Comantra staff.&lt;/p&gt;  &lt;p&gt;I made a commitment to Rajesh to report on the interview he gave in an entirely objective fashion so I’m going to sign off the post like this: You be the judge – use the comments below to express your opinion and draw your own conclusions. Is Comantra indeed running a scam or is it possible, as Rajesh claims, that they’re a rising star fallen victim to organised reputation assault?&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-914584671011146332?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/UziVtuwK32o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/914584671011146332/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/05/interview-with-man-behind-comantra-cold.html#comment-form" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/914584671011146332?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/914584671011146332?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/UziVtuwK32o/interview-with-man-behind-comantra-cold.html" title="Interview with the man behind Comantra, the “cold call virus scammers”" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-AMpPuDP9Ccs/T6gvCTgRMJI/AAAAAAAADhE/2Z45sPqHWKA/s72-c/39feacb7.jpg?imgmax=800" height="72" width="72" /><thr:total>10</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/05/interview-with-man-behind-comantra-cold.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8MRX48fip7ImA9WhVVEkQ.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-4225742170387124885</id><published>2012-04-25T07:58:00.001+10:00</published><updated>2012-05-06T20:08:04.076+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-05-06T20:08:04.076+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="Scam" /><title>“Type www.” – “Ok, w-w-w-d-o-t”; antagonising call centre scammers</title><content type="html">&lt;p&gt;This ain’t my first rodeo, this ain’t the first I’ve seen this dog and pony show. I first wrote about virus call centre scammers back in October along with my recording titled &lt;a href="http://www.troyhunt.com/2011/10/anatomy-of-virus-call-centre-scam.html"&gt;Anatomy of a virus call centre scam&lt;/a&gt;. I followed up a couple of months ago with &lt;a href="http://www.troyhunt.com/2012/02/scamming-scammers-catching-virus-call.html"&gt;Scamming the scammers – catching the virus call-centre scammers red-handed&lt;/a&gt; which screen recorded the entire process right up to where they attempted to commoditise the scam, or in other words, get cash out of me.&lt;/p&gt;  &lt;p&gt;Imagine my pleasure when they called me back last night! I use the term “they” very colloquially; it’s always the same scam run against the same run-sheet but there seem to be a number of companies behind this special brand of evil. This time it was a group called “E-Protection” and it doesn’t take long to establish that &lt;a href="http://forums.whirlpool.net.au/archive/1718324"&gt;these guys have a bit of a record&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This time I decided to see how effectively they could support the Windows 8 Consumer Preview virtual machine I had running. The sheer incompetence of particularly the first operator I spoke to is quite astounding, not just technically but the fact that very little of what I was saying was actually absorbed. By the time I got to the second guy at about the 29 minute mark I thought it might be time to inflict some of the pain they’ve been dishing out to their victims back onto them. Enjoy :)&lt;/p&gt;  &lt;p align="center"&gt;&lt;iframe height="420" src="http://www.youtube.com/embed/nhqxOFH2rmI" frameborder="0" width="620" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p&gt;But there is a serious side to this; go back and look at the comments (particularly in that second video I linked to) and you’ll see a number of people being defrauded. There’s very little the authorities in countries like Australia can do about it as these guys are based offshore (I did try – and got nowhere). Unfortunately the other players in the scam also have little interest in doing anything to prevent it. I contacted LogMeIn via Twitter right after the event and all they had to say was &lt;a href="https://twitter.com/#!/LogMeIn/status/194844195574386691"&gt;this&lt;/a&gt;:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="SNAGHTMLa2c762d" border="0" alt="SNAGHTMLa2c762d" src="http://lh4.ggpht.com/-zYQzHdVxk6w/T5ch71nBamI/AAAAAAAADgk/U9TTAaD9baY/SNAGHTMLa2c762d%25255B3%25255D.png?imgmax=800" width="532" height="104" /&gt;&lt;/p&gt;  &lt;p&gt;I’m sorry, but that’s just not good enough. At the very least, they could place a clear warning on the page the scammers are directing you to. These guys need to start showing a bit of social responsibility.&lt;/p&gt;  &lt;p&gt;As you can see, particularly from the first operator in the latest video, the scammers simply don’t give a damn; not listening, just running through the script and when it’s clear you can’t provide them any value, they’ll just hang up (this also happened to me last week, just a bit too early to extract a meaningful episode).&lt;/p&gt;  &lt;p&gt;As I said at the end of this video, please educate your less-technical family and friends on this one, there are a heap of similar videos out there from other people – it’s rampant and it obviously works because it’s been running long enough.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-4225742170387124885?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/7gWUnbXoEaU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/4225742170387124885/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/type-www-ok-w-w-w-d-o-t-antagonising.html#comment-form" title="21 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/4225742170387124885?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/4225742170387124885?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/7gWUnbXoEaU/type-www-ok-w-w-w-d-o-t-antagonising.html" title="“Type www.” – “Ok, w-w-w-d-o-t”; antagonising call centre scammers" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://img.youtube.com/vi/nhqxOFH2rmI/default.jpg" height="72" width="72" /><thr:total>21</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/type-www-ok-w-w-w-d-o-t-antagonising.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QFRng4cCp7ImA9WhVWEkw.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-6422080280181467232</id><published>2012-04-24T08:15:00.001+10:00</published><updated>2012-04-24T08:15:17.638+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-24T08:15:17.638+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><category scheme="http://www.blogger.com/atom/ns#" term="Speaking" /><title>Technology and Friends: Troy Hunt on ASP.NET Security</title><content type="html">&lt;p&gt;It already seems like a lifetime ago, but it was only last month that I was over in Seattle at the 2012 MVP Summit. While I was there, I had a short chat on video with &lt;a href="https://twitter.com/#!/DavidGiard"&gt;Dave Giard&lt;/a&gt; for his Technology and Friends blog. We predominantly spoke about ASP.NET security and in particular, cryptographic storage of credentials and transport layer security so it’s a little more focussed than many of my talks.&lt;/p&gt;  &lt;p&gt;The original post is over on Dave’s blog under &lt;a href="http://technologyandfriends.com/SubText/archive/2012/04/23/tf207.aspx"&gt;Episode 207: Troy Hunt on ASP.NET Security&lt;/a&gt; and on the &lt;a href="http://www.viddler.com/v/b0d2baf9"&gt;video on Viddler&lt;/a&gt;. Big thumbs up for Dave’s choice of soundtrack, I think I’m going to have to use that myself in future presentations!&lt;/p&gt;  &lt;p align="center"&gt; &lt;!--[if IE]&gt;&lt;object width="437" height="370" id="viddlerOuter-b0d2baf9" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"&gt;&lt;param name="movie" value="//www.viddler.com/player/b0d2baf9/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowNetworking" value="all"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="flashVars" value="f=1&amp;openURL=59935423&amp;autoplay=f&amp;loop=0&amp;nologo=0&amp;hd=0"&gt;&lt;object id="viddlerInner-b0d2baf9"&gt;&lt;video id="viddlerVideo-b0d2baf9" src="//www.viddler.com/file/b0d2baf9/html5mobile?openURL=59935423" type="video/mp4" width="437" height="328" poster="//www.viddler.com/thumbnail/b0d2baf9/" controls="controls" x-webkit-airplay="allow"&gt;&lt;/video&gt;&lt;/object&gt;&lt;/object&gt;&lt;![endif]--&gt; &lt;!--[if !IE]&gt; &lt;!--&gt; &lt;object width="437" height="370" id="viddlerOuter-b0d2baf9" data="//www.viddler.com/player/b0d2baf9/" type="application/x-shockwave-flash"&gt;
 &lt;param name="movie" value="//www.viddler.com/player/b0d2baf9/" /&gt;
 &lt;param name="allowScriptAccess" value="always" /&gt;
 &lt;param name="allowNetworking" value="all" /&gt;
 &lt;param name="allowFullScreen" value="true" /&gt;
 &lt;param name="flashVars" value="f=1&amp;amp;openURL=59935423&amp;amp;autoplay=f&amp;amp;loop=0&amp;amp;nologo=0&amp;amp;hd=0" /&gt;&lt;object id="viddlerInner-b0d2baf9"&gt; &lt;video width="437" height="328" id="viddlerVideo-b0d2baf9" src="//www.viddler.com/file/b0d2baf9/html5mobile?openURL=59935423" controls="controls" poster="//www.viddler.com/thumbnail/b0d2baf9/" x-webkit-airplay="allow" type="video/mp4" /&gt; &lt;/object&gt;&lt;/object&gt; &lt;!--&lt;![endif]--&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-6422080280181467232?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/EJPZSilyNFI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/6422080280181467232/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/technology-and-friends-troy-hunt-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/6422080280181467232?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/6422080280181467232?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/EJPZSilyNFI/technology-and-friends-troy-hunt-on.html" title="Technology and Friends: Troy Hunt on ASP.NET Security" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><thr:total>0</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/technology-and-friends-troy-hunt-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4AR348fCp7ImA9WhVXGEo.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-80374496651367468</id><published>2012-04-20T07:33:00.001+10:00</published><updated>2012-04-20T09:09:06.074+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-20T09:09:06.074+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Apple" /><title>10 graphic examples of the abomination that is iTunes on Windows</title><content type="html">&lt;p&gt;This is a rant; an unapologetic, no holds barred rant on why something that I hold in such high esteem – my iOS devices – could have come from the evildoers who created this spawn of Satan: iTunes. I love my Apple TV, my iPad, my iPhone, my wife loves her iPhone, heck, even our two year old loves his hand-me-down iPhone. They all rock – big time. They’re the best damn devices I’ve ever owned, without exception.&lt;/p&gt;  &lt;p&gt;But the otherwise joyous experience of ownership is continually crippled by the searing pain that is iTunes. Not every other day, not once or twice a day but many times every single bloody day. It’s a rare occasion I tweet about “bloody iTunes” and &lt;em&gt;don’t&lt;/em&gt; receive a chorus of support from other disenchanted, otherwise happy Apple customers. It’s not just me folks, oh no. &lt;/p&gt;  &lt;p&gt;Rather than suffer in silence or be comforted by the occasional mere “me too” tweet, a few months back I started capturing the litany of problems that iTunes threw my way, dropping a collection of the more painful examples into the blog post below. Oh – and just before the comments about “it works fine on my machine because I have a bejillion MB of RAM and a flux capacitor CPU”, all my experiences to follow are across many machines with lots of GBs of RAM and cores in CPUs and no moving parts in disks. It ain’t me folks!&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;h4&gt;1. It just…….haaaaaangs&lt;/h4&gt;  &lt;p&gt;Frequently I open up iTunes of a morning (often inadvertently because I’m simply looking for a power source for the iPhone) and am greeted by something like this:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Hanging" src="http://lh5.ggpht.com/-rKO_wtAegEg/T5CERrxeotI/AAAAAAAADes/DbbNS-buAc0/image2.png?imgmax=800" width="620" height="233" /&gt;&lt;/p&gt;  &lt;p&gt;That big black outline is iTunes call for help – it’s frozen and totally unresponsive. Eventually it snaps out of its micro-coma. When it feels like it. After a little nap.&lt;/p&gt;  &lt;h4&gt;2. It thinks hex mean something useful&lt;/h4&gt;  &lt;p&gt;It must, because I get them all the time. No, not every other day, &lt;strong&gt;&lt;em&gt;every single day&lt;/em&gt;&lt;/strong&gt;. Many times. If the iPhone is within earshot (or wifi-shot, as it may be), iTunes is going to have a little internal identity crisis and regurgitate a totally meaningless error:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Throwing a hex error" src="http://lh6.ggpht.com/-kXpPUPW1Dl4/T5CEVm2vrxI/AAAAAAAADe0/h4njgShWIxA/image5.png?imgmax=800" width="620" height="266" /&gt;&lt;/p&gt;  &lt;p&gt;Why? I mean why throw hex at me? Just gracefully explain you don’t know what’s wrong and move along.&lt;/p&gt;  &lt;h4&gt;3. Actually, it’s not just hex errors&lt;/h4&gt;  &lt;p&gt;Don’t worry, iTunes is not hexist and only uses base 16 to do its dirty work, negative integers make fine error codes as well:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Throwing a negative integer error" src="http://lh3.ggpht.com/-GGJolofmxzI/T5CEYm-ouvI/AAAAAAAADe8/Vml9rpyeERY/image31.png?imgmax=800" width="620" height="266" /&gt;&lt;/p&gt;  &lt;p&gt;Is this better or worse than a +50 error? And do error codes really need to sound like hit-points in some crazy Apple derivative of D&amp;amp;D?!&lt;/p&gt;  &lt;h4&gt;4. Because it sees double because it sees double&lt;/h4&gt;  &lt;p&gt;I have one iPhone. My wife has one iPhone. So why the hell do I see two instances of each collection of purchased items?!&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Doubled up purchases" src="http://lh5.ggpht.com/-coHAKAZ-4IU/T5CEcEskuBI/AAAAAAAADfE/z-VwqgSw9m0/image8.png?imgmax=800" width="366" height="189" /&gt;&lt;/p&gt;  &lt;p&gt;I’m sure there’s probably some explanation about having had multiple devices over time but of course they’ve all cleanly upgraded to the next one and all been under the same Apple IDs, yet here we are.&lt;/p&gt;  &lt;h4&gt;5. Hello? iPod Nano? Where are you?&lt;/h4&gt;  &lt;p&gt;When I plug in this little guy:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="iPod Nano" src="http://lh5.ggpht.com/-OZ1hHtef2mU/T5CEdWQ_5KI/AAAAAAAADfI/Y5Xz5bCiry8/ipod_nano_3rd_generation3.jpg?imgmax=800" width="248" height="235" /&gt;&lt;/p&gt;  &lt;p&gt;I expect iTunes to do something. Show me it’s connected. Make a beep. Give me some love. Anything, just acknowledge its existence! But here’s what usually happens:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Missing iPod Nano" src="http://lh5.ggpht.com/-puTiANp6VeU/T5CEe4YJ5NI/AAAAAAAADfQ/Yk7toYIIa0A/image3.png?imgmax=800" width="409" height="248" /&gt;&lt;/p&gt;  &lt;p&gt;Yep, no devices. So I unplug it then try again. And again. Rinse, lather, repeat and so on. Eventually it &lt;em&gt;might&lt;/em&gt; show up:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="iPod Nano (finally) appears" src="http://lh5.ggpht.com/-wGlVC04fddY/T5CEf2HFe2I/AAAAAAAADfY/hIPeV7GnMyQ/image61.png?imgmax=800" width="409" height="295" /&gt;&lt;/p&gt;  &lt;p&gt;Why is this so hard? Windows knows it was plugged in – it gave me an affirmative beep and allowed me to browse the contents; why does iTunes just give it the silent treatment?&lt;/p&gt;  &lt;h4&gt;6. Reboot? But I don’t want to reboot!&lt;/h4&gt;  &lt;p&gt;iTunes is a media player; why must every single update force me to shut down everything I’m doing and reboot the entire machine?!&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Time for a restart" src="http://lh6.ggpht.com/-Q0wLZsIc4uc/T5CEhaqw9LI/AAAAAAAADfk/dVBR70fMvsM/SNAGHTML22a3bf13.png?imgmax=800" width="490" height="181" /&gt;&lt;/p&gt;  &lt;p&gt;I mean, this isn’t exactly a service pack or anything that needs to get down into the guts of the OS, why on earth does an app that plays some music and syncs my phone want to reboot the whole damn machine?! Stop doing this!&lt;/p&gt;  &lt;h4&gt;7. Uh, no, I didn’t change anything&lt;/h4&gt;  &lt;p&gt;When I change a setting, I expect I might get a message asking me to affirm the aforementioned change. When I &lt;em&gt;don’t&lt;/em&gt; change a setting, I don’t expect to see this?&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Change - what change?!" src="http://lh4.ggpht.com/-8hH1g4BvklM/T5CEisGhJwI/AAAAAAAADfo/GKFSJzcGPtQ/image311.png?imgmax=800" width="620" height="266" /&gt;&lt;/p&gt;  &lt;p&gt;So why must it continue to taunt me?! Over and over and over again, iTunes continues to hammer me with this pointless, incorrect message. Just stop it, dammit!&lt;/p&gt;  &lt;h4&gt;8. Networks – we need more networks!&lt;/h4&gt;  &lt;p&gt;Now I know this isn’t iTunes per se, but given it only started happening after the iOS 5 upgrade it’s probably pretty fair to say it’s something screwy on the Apple side. Every single time I plug the iPhone in, I’m now challenged to “Select a location for the network”:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Not another bloody network location..." src="http://lh6.ggpht.com/-snTiKd78Cfo/T5CEkglH1MI/AAAAAAAADfw/dVb9BFjDqVs/SNAGHTMLf927e21.png?imgmax=800" width="610" height="515" /&gt;&lt;/p&gt;  &lt;p&gt;Clearly this is related to the phone enabling a personal hotspot – which it had always done in the past – but why must I continually define the network location again and again and again? And it’s not just me folks, oh no.&lt;/p&gt;  &lt;h4&gt;9. Any day ending in “y” is a good day for a crash&lt;/h4&gt;  &lt;p&gt;Total cardiac arrest is another favourite of iTunes:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Crashed - again" src="http://lh6.ggpht.com/-Jyqvq9y3-f0/T5CEl_me7oI/AAAAAAAADf8/9rVpte52SDY/image3111.png?imgmax=800" width="620" height="110" /&gt;&lt;/p&gt;  &lt;p&gt;Sometimes it performs an Easter miracle and rises from the dead, other times it remains well and truly comatose and simply will not resurrect. Which would actually be fine, if it stayed dead and wasn’t required again.&lt;/p&gt;  &lt;h4&gt;10. Because it’s now constantly there&lt;/h4&gt;  &lt;p&gt;iTunes has sucked for a very long time now. It has a rich history of user experience faux pas that clearly time has not allowed Apple to heal. But at least it was always a conscious decision to enter into the realm of iTunes pain, I mean you had to explicitly fire it up and as such, you had time to brace yourself for the inevitable onslaught of pain.&lt;/p&gt;  &lt;p&gt;Not anymore. Wireless sync in iOS 5 &lt;em&gt;sounds&lt;/em&gt; like a great idea and I’ll admit I was lured in by the promise of being able to chuck cables away. But there’s an ugly downside to this: iTunes now constantly comes to life from an otherwise dormant state. Clearly there’s a background process that identifies there’s an iOS device in range and decides to bring iTunes back to life at some arbitrary point in time.&lt;/p&gt;  &lt;p&gt;In fact the whole iTunes conundrum made me reminisce about this little illustration from &lt;a href="http://defectivebydesign.org"&gt;defectivebydesign.org&lt;/a&gt;:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="" border="0" alt="iTunes - Defective By Design" src="http://lh3.ggpht.com/-sc5sMEhJYv0/T5CEoeblbtI/AAAAAAAADgE/9B1gWnoBMdk/tied-cyan1%25255B2%25255D.gif?imgmax=800" width="300" height="400" /&gt;&lt;/p&gt;  &lt;p align="left"&gt;Six years on from this design and whilst &lt;em&gt;some&lt;/em&gt; progress has been made on the DRM front, we’re now not only tied into iTunes by the iPod but by the iPhone, iPad and now even the bloody Apple TV if you want to play your existing media.&lt;/p&gt;  &lt;h4&gt;Summary&lt;/h4&gt;  &lt;p&gt;Clearly whilst genuinely frustrated with the whole iTunes experience, there’s a degree of tongue in cheek going on above. But let me step away from my own subjective experiences for a moment and share the following quote from Slashdot’s &lt;a href="http://apple.slashdot.org/story/12/04/17/1440242/itunes-windows-problem?utm_source=slashdot&amp;amp;utm_medium=twitter"&gt;iTunes’ Windows Problem&lt;/a&gt; post just a couple of days ago:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;But today, the toxic waste of success cripples iTunes: increasingly non-sensical complexity, inconsistencies, layers of patches over layers of patches ending up in a structure so labyrinthine no individual can internalize it any longer. 'It's a giant kitchen sink piled high with loosely related features, and it's highly un-Apple-like' says Allen Pike. 'Users know it, critics know it, and you can bet the iTunes team knows it. But for the love of god, why?'&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;“It’s un-Apple-like”. That, for me, is the entire iTunes experience in a nutshell. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-80374496651367468?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/m1HbxxZ-TSQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/80374496651367468/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/10-graphic-examples-of-abomination-that.html#comment-form" title="34 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/80374496651367468?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/80374496651367468?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/m1HbxxZ-TSQ/10-graphic-examples-of-abomination-that.html" title="10 graphic examples of the abomination that is iTunes on Windows" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-rKO_wtAegEg/T5CERrxeotI/AAAAAAAADes/DbbNS-buAc0/s72-c/image2.png?imgmax=800" height="72" width="72" /><thr:total>34</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/10-graphic-examples-of-abomination-that.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0ICRX0_eCp7ImA9WhVXF0U.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-8627317035407578422</id><published>2012-04-19T08:50:00.001+10:00</published><updated>2012-04-19T08:52:44.340+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-19T08:52:44.340+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>10 illustrated examples of Visual Studio 11</title><content type="html">&lt;p&gt;Fresh from the 2012 MVP summit with lots of enthusiasm and grand ideas, I thought it would be worthwhile repeating my &lt;a href="http://www.troyhunt.com/2009/10/25-illustrated-examples-of-visual.html"&gt;25 illustrated examples of Visual Studio 2010 and .NET 4 post&lt;/a&gt; with the technologies of today (or should that be tomorrow?) albeit a few weeks later than I had planned. There are some very, very exciting new things in the pipeline which I’d like to share while they’re fresh in my mind and analogous with that post from two and a half years back, I’d like to actually &lt;em&gt;show you&lt;/em&gt; what’s happening.&lt;/p&gt;  &lt;p&gt;There’s so much great new stuff in Visual Studio 11 that it deserves its own post! If I can create the time, I’ll also try and get around to covering ASP.NET specifically. Keeping in mind I’m a very web-centric guy, let me show you some of the features which have gotten me a bit excited about what’s coming in the very near future.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;h4&gt;1. Its grey (and other UX changes)&lt;/h4&gt;  &lt;p&gt;Let’s just get this out there right now; the new Visual Studio UX is polarising. Actually, polarising would suggest there are two different views of it. The reality is there is a strong chorus of “Ugh” at the moment. You see it’s all about &lt;a href="http://en.wikipedia.org/wiki/Metro_(design_language)"&gt;Metro&lt;/a&gt; these days and that means VS 11 now looks like this when running on Windows 8:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The &amp;quot;grey&amp;quot; VS 11 UI" src="http://lh4.ggpht.com/-CBXxZZ1JUMQ/T49Em_n1bTI/AAAAAAAADbM/4ShEKdwkKeM/image3.png?imgmax=800" width="620" height="443" /&gt;&lt;/p&gt;  &lt;p&gt;Just in case you need a little reminder of how things used to look, here’s VS 2010 on Win 7:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The &amp;quot;colourful&amp;quot; VS 2010" src="http://lh4.ggpht.com/-bcfke5mCawo/T49EqytdNfI/AAAAAAAADbU/sp7gbHo12uI/SNAGHTMLe6b85704.png?imgmax=800" width="620" height="443" /&gt;&lt;/p&gt;  &lt;p&gt;There are three things I want to call out in VS 11 as they’re the three which are repeatedly brought up:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The greyness. &lt;/li&gt;    &lt;li&gt;The capitals on panel titles. &lt;/li&gt;    &lt;li&gt;The colons on the panels. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You can get a better idea of those last two items here:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="A VS 11 panel with caps and colon seperators" src="http://lh3.ggpht.com/-q08bazhRjSY/T49EsnTZ1pI/AAAAAAAADbc/OgboU_rCCTE/SNAGHTMLe6dc76f3.png?imgmax=800" width="281" height="154" /&gt;&lt;/p&gt;  &lt;p&gt;The theory is that all those nasty colours get a bit distracting when what you really want to be doing is focussing on code, not file icons or buttons on menus. Many people countered that with “Yeah, but I minimise all my panels anyway”.&lt;/p&gt;  &lt;p&gt;So what do we make of all this? Well, the feedback I’ve seen and heard honestly hasn’t been positive. Sure, it’s Metro and Metro is the new black but it almost seems to be Metro in name more than anything else – certainly it doesn’t jump out and remind me of the Metro I know from Windows Mobile 7 or Windows 8.&lt;/p&gt;  &lt;p&gt;One very apt comment I heard in one of the sessions was that Metro is great for, say, a mobile app but an IDE is a very different paradigm. Does that mean Metro won’t work in VS? I don’t know, but certainly it’s a very different context.&lt;/p&gt;  &lt;p&gt;Love it or hate it, the thing is that this is a first beta and things will almost inevitably change to some degree. I suspect the release version won’t be &lt;em&gt;too&lt;/em&gt; far off the preview version, but clearly some refinement will still happen. This is evident in a few places where colour is still evident:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Some remaining colour in VS 11" src="http://lh3.ggpht.com/-OoZEDJL_QxY/T49Eti_FjLI/AAAAAAAADbk/qKadQuQBRQ4/SNAGHTMLe6f532a3.png?imgmax=800" width="376" height="165" /&gt;&lt;/p&gt;  &lt;p&gt;And:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Some more remaining colour in VS 11" src="http://lh6.ggpht.com/-qNPJ3X4JdyM/T49EvI_ex5I/AAAAAAAADbo/o2H5Q5PwWv4/SNAGHTMLe79f7743.png?imgmax=800" width="376" height="135" /&gt;&lt;/p&gt;  &lt;p&gt;As a closing thought on UX, the only other thing I’d say is “use it”. Give it a go and see if it really does impact the development experience and if that experience is negative, then come back and complain about it :)&lt;/p&gt;  &lt;h4&gt;2. Quick search&lt;/h4&gt;  &lt;p&gt;This one is actually very cool and &lt;em&gt;should&lt;/em&gt; offer a major productivity advantage. Up in the top right corner of the IDE we now have a little “Quick Launch” text box which you can shortcut to with CTRL-Q. I look at this as the Visual Studio equivalent of the Windows key in Windows 7; hit it, type whatever you want then it will find it for you. For example:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The VS 11 quick search" src="http://lh6.ggpht.com/-QAgG62O1rzE/T49EwROJnkI/AAAAAAAADbw/oSR3jSPyY_g/SNAGHTML1d9e98543.png?imgmax=800" width="537" height="311" /&gt;&lt;/p&gt;  &lt;p&gt;In this case, VS has found everything from menu items to configuration options to open documents. There are also &lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2011/09/27/visual-studio-11-developer-preview-quick-launch.aspx"&gt;other categorisations it searches for&lt;/a&gt; and I think this is going to be one of those super useful features that you soon wonder how you lived without, just like that aforementioned Windows 7 feature is for me now.&lt;/p&gt;  &lt;h4&gt;3. Backward solution compatibility&lt;/h4&gt;  &lt;p&gt;When I started rolling out Visual Studio 2010 in my workplace, one of the greatest hurdles to adoption was the solution file format. Once you opened a .sln created with an earlier version of the IDE you had no choice but to upgrade the solution version. Doing this then meant no going back (without some nasty hacks) so in short, either everyone who might possibly work on the solution upgraded to the new IDE or nobody did. And then if you worked across multiple project versions you needed to run multiple versions of the IDE. Nasty.&lt;/p&gt;  &lt;p&gt;Here’s how Jason Zander explains it in &lt;a href="http://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx"&gt;his introduction of VS 11&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The compatibility improvements in Visual Studio 11 will make it easier to work with your existing Visual Studio assets, without doing any “upgrades” of project files. In the majority of cases, you can use Visual Studio 11 and also continue collaborating on projects with your teammates using Visual Studio 2010 SP1.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;To demonstrate this new friendly behaviour, I created a VS 2010 web application then opened it up in VS 11. Here’s the difference between the two solution files:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Difference between VS 2010 and VS 11 solution file formats" src="http://lh3.ggpht.com/-zHBAG8l5EX0/T49Exa-ypCI/AAAAAAAADb4/wfjkLBJXRKs/SNAGHTML4443a573.png?imgmax=800" width="620" height="405" /&gt;&lt;/p&gt;  &lt;p&gt;This will cause some minor differentiation in the logos:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The VS 11 and VS 2010 solution file logos side by side" src="http://lh4.ggpht.com/-bIo3MVxCvTc/T49EzfMz8yI/AAAAAAAADcE/1qlvEyNRWUE/image11.png?imgmax=800" width="215" height="109" /&gt;&lt;/p&gt;  &lt;p&gt;But the important bit is that after opening the solution in VS 11 you can still jump back into VS 2010 and things work just fine:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="A solution edited in VS 11 opened up in VS 2010" src="http://lh6.ggpht.com/-J_rbfe1_8-I/T49E2i8U-eI/AAAAAAAADcM/PAPmNJauEjw/image14.png?imgmax=800" width="310" height="314" /&gt;&lt;/p&gt;  &lt;p&gt;Look at all that colour! The only caveat in all of this is that you still need to be on VS 2010 – this isn’t going to help projects stuck on earlier versions of the IDE.&lt;/p&gt;  &lt;p&gt;For me personally, this is going to make rolling our VS 11 &lt;em&gt;significantly&lt;/em&gt; easier as it can be done more on a needs basis rather than just because you want to open a solution someone with the newer IDE worked on.&lt;/p&gt;  &lt;h4&gt;4. Smarter Solution Explorer&lt;/h4&gt;  &lt;p&gt;There’s a bunch of new stuff the Solution Explorer can do that we either didn’t have before or was nested over in other windows such as the Class View. What’s neat about this revision is that the Solution Explorer becomes a real hub for all sorts of activities:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The VS 11 solution explorer" src="http://lh3.ggpht.com/-epVEf4AjMaE/T49E4G53yjI/AAAAAAAADcU/upkUcFp4lk0/image6.png?imgmax=800" width="450" height="498" /&gt;&lt;/p&gt;  &lt;p&gt;The search feature also makes an appearance so finding those pesky files nested down under five folders becomes a pretty easy task (note it also searches for class members – not just file names):&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Matching a search term in the solution explorer" src="http://lh3.ggpht.com/-a6Hq9e7v-9A/T49E5IKvqyI/AAAAAAAADcY/0j8iM17y5Vg/image9.png?imgmax=800" width="450" height="255" /&gt;&lt;/p&gt;  &lt;h4&gt;5. Find and replace goes lightweight&lt;/h4&gt;  &lt;p&gt;First a quick reminder of what the good old CTRL-F would do for us in VS 2010:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Find and replace in VS 2010" src="http://lh3.ggpht.com/-GiWDKeMcf0Y/T49E6H0nG0I/AAAAAAAADcg/Dp9EiWwLZ8Q/SNAGHTML81b611d%25255B3%25255D.png?imgmax=800" width="290" height="350" /&gt;&lt;/p&gt;  &lt;p&gt;A great big dedicated panel with lots of options. Compare that now to how VS 11 approaches things:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Find in VS 11" src="http://lh3.ggpht.com/-s5eYCJsUzkY/T49E7JVv4lI/AAAAAAAADco/qDW4WoUfsbQ/SNAGHTMLa70a1d0%25255B9%25255D.png?imgmax=800" width="326" height="132" /&gt;&lt;/p&gt;  &lt;p&gt;Ok, that’s a rather streamlined approach! In case you’re wondering where all that missing stuff has gone, it’s still there:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Options on the VS 11 search" src="http://lh5.ggpht.com/-MWAoknDYUGw/T49E8MGNPXI/AAAAAAAADcw/oqbMRmuPnwA/SNAGHTMLa76d7ce%25255B4%25255D%25255B2%25255D.png?imgmax=800" width="323" height="205" /&gt;&lt;/p&gt;  &lt;p&gt;You’ll notice that the control is also resizable so if you’ve got a fetish for long searches you can keep it all visible in the text box. And if you really long for the find and replace of old, you can CTRL-SHIFT-F back into it:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The classic find and replace dialogue in VS 11" src="http://lh3.ggpht.com/-KfSdw-RjXxs/T49E9PjnBDI/AAAAAAAADc4/9YXhxPXw-dQ/image%25255B3%25255D.png?imgmax=800" width="266" height="305" /&gt;&lt;/p&gt;  &lt;p align="left"&gt;Does all this feel just a little bit familiar? It did to me, because my VS 2010 already behaved in this fashion courtesy of the &lt;a href="http://visualstudiogallery.msdn.microsoft.com/d0d33361-18e2-46c0-8ff2-4adea1e34fef"&gt;Productivity Power Tools&lt;/a&gt; so it’s interesting to see that Microsoft has just gone ahead and rolled this into the IDE as a first class citizen.&lt;/p&gt;  &lt;p align="left"&gt;One more thing; if you’re like me and have trouble wrapping your head around regexes, there’s more help at hand than we had before:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Regex search help in VS 11" src="http://lh5.ggpht.com/-PUgh8hXKcHY/T49E_VmMd2I/AAAAAAAADdE/ahR_Y1T-mRY/image%25255B7%25255D.png?imgmax=800" width="620" height="562" /&gt;&lt;/p&gt;  &lt;h4&gt;6. Windows 8 ready&lt;/h4&gt;  &lt;p&gt;There should be no surprises here given the timing, but VS 11 now comes with a bunch of Metro project templates ready for Windows 8:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Windows 8 Metro solution templates" src="http://lh5.ggpht.com/-BGaWkR6rgwY/T49FBFKRpDI/AAAAAAAADdM/4igUA5blZz4/image8.png?imgmax=800" width="620" height="351" /&gt;&lt;/p&gt;  &lt;p&gt;One important thing to note though is that you’re going to have big problems building a Metro app if you’re not running Windows 8. Developers on Windows 7 or – gasp! – earlier versions of the OS are going to need to get with the times first.&lt;/p&gt;  &lt;h4&gt;7. CSS editing gets much cooler&lt;/h4&gt;  &lt;p&gt;There are a number of enhancements in the CSS editing space but here are a few of my favourites. Firstly, there’s a built in colour-picker which pops up in any context where it might make life a little easier for you:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="The CSS colour picker" src="http://lh4.ggpht.com/-MUibDzdcZ_0/T49FDJ5M3qI/AAAAAAAADdU/42WvaNokP0Y/SNAGHTML4bf4b1c3.png?imgmax=800" width="484" height="309" /&gt;&lt;/p&gt;  &lt;p align="center"&gt;The other neat little feature is the ability to pre-fill browser specific schema prefixes on certain CSS attributes. For example, begin making a “border-radius” entry, hit “tab-tab” and watch the magic:&lt;/p&gt;  &lt;p align="center"&gt;&lt;a href="http://lh6.ggpht.com/-NKuY7vrMBPY/T49FEfXl3GI/AAAAAAAADdc/qEbWtYC43DI/s1600-h/GIF42.gif"&gt;&lt;img style="display: inline" title="" alt="Pre-filling browser specific schema prefixes" src="http://lh6.ggpht.com/-Sc1rR9i8F1A/T49FFXcRvMI/AAAAAAAADdk/Nb4PfdD2N-M/GIF4_thumb.gif?imgmax=800" width="238" height="157" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Here’s another new one: what’s wrong with the following CSS?&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Hierarchically indented CSS" src="http://lh6.ggpht.com/-lBVfxo4zuHQ/T49FG-MnEWI/AAAAAAAADds/jQAtjqphhqM/SNAGHTML4d572893.png?imgmax=800" width="463" height="382" /&gt;&lt;/p&gt;  &lt;p&gt;Answer: nothing. The indentation you’re seeing is hierarchical; the tag with the ID “login” may have an anchor tag which may then have a “username” class. It looks a little odd at first but I suspect it will become advantageous in terms of helping you properly structure your CSS in a logical fashion.&lt;/p&gt;  &lt;p&gt;These are little enhancements, but they contribute to the overall increased productivity theme we see in each release of the IDE.&lt;/p&gt;  &lt;h4&gt;8. Image previews&lt;/h4&gt;  &lt;p&gt;From the “small but handy” file, say hello to image previews:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Image preview 1" src="http://lh5.ggpht.com/-DZfi9EB7lWs/T49FIO6hknI/AAAAAAAADdw/oKxo4AZ0vvE/SNAGHTML291fcc23.png?imgmax=800" width="156" height="140" /&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Image preview 2" src="http://lh4.ggpht.com/-ZdjrXNUbkhg/T49FJPyYA8I/AAAAAAAADd4/Af0CBb40Q18/SNAGHTML2912b703.png?imgmax=800" width="156" height="138" /&gt;&lt;/p&gt;  &lt;p&gt;There’s not much to say here beyond what you observe above; hover the mouse over an image and a little thumbnail pops up. Saves you accidentally selecting the wrong file at times and avoids having to actually open the entire file one by one. Quickly flicking through images is now dead easy.&lt;/p&gt;  &lt;h4&gt;9. Choosing a browser to run the app in is &lt;em&gt;finally&lt;/em&gt; easy&lt;/h4&gt;  &lt;p&gt;I don’t know what it was about earlier versions of the IDE, but no matter how many times I set my default browser to IE (right click file –&amp;gt; browse with), it would always revert back to my OS default (Chrome) when I pulled the project up at another date. The fact that Hanselman had enough material on this for &lt;a href="http://www.hanselman.com/blog/HowToChangeTheDefaultBrowserInVisualStudioProgrammaticallyWithPowerShellAndPossiblyPokeYourselfInTheEye.aspx"&gt;a lengthy blog post&lt;/a&gt; is evidence that this hasn’t exactly been a smooth experience in the past.&lt;/p&gt;  &lt;p&gt;VS 11: problem solved. Right up there next to the run button is the ability to choose the browser you want to fire up:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Running the solution with a selected browser" src="http://lh3.ggpht.com/-NRKsUPxq_NI/T49FKuslQjI/AAAAAAAADeE/XqCT3Jvamfs/SNAGHTML2a0fe1a6.png?imgmax=800" width="243" height="172" /&gt;&lt;/p&gt;  &lt;p&gt;This is a &lt;em&gt;significantly&lt;/em&gt; better implementation as not only do you always have the browser F5 is going to give you right in front of you, but it’s dead easy to change it. That old “Browse with…” option was painful because it was usually only after the solution built and fired up the wrong browser that you realised there was a problem. And then try getting the “Browse with…” dialogue up on an MVC app; can’t do it on the controller, can’t do it on the view so you end up creating a temporary HTML file just to access the dialogue! Maybe there’s a better way I’m not aware of, but fortunately it doesn’t matter anymore anyway.&lt;/p&gt;  &lt;h4&gt;10. Page Inspector (it rocks!)&lt;/h4&gt;  &lt;p&gt;One very, very cool new feature is the page inspector. Once you move away from the one file per rendered page paradigm and get into things like master pages, user controls, layout pages and partial views, things start getting very messy when you want to work out where rendered content in the browser is actually coming from.&lt;/p&gt;  &lt;p&gt;Enter the &lt;a href="http://blogs.msdn.com/b/webdevtools/archive/2011/09/22/page-inspector-for-visual-studio-11-developer-preview.aspx"&gt;Page Inspector&lt;/a&gt;. Let’s just take a look at it then I’ll run through the highlights. Firstly, you can run it up directly from what is usually your run button:&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Running the solution with the Page Inspector" src="http://lh4.ggpht.com/-oKYYklIi02w/T49FLhMWqXI/AAAAAAAADeI/0L8j6DfsU5o/SNAGHTML2a22d923.png?imgmax=800" width="233" height="176" /&gt;&lt;/p&gt;  &lt;p&gt;Which then gives you the site running within the IDE plus a couple of new windows (click to enlarge):&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-a6nmXWwJu_Y/T49FN28a81I/AAAAAAAADeU/BZLtRm0MFGg/s1600-h/image25.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Page Inspector running in the IDE" src="http://lh6.ggpht.com/-ULNI_7zTALE/T49FPhu4dOI/AAAAAAAADec/-WXrc9mMjOQ/image_thumb.png?imgmax=800" width="620" height="309" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;What’s happening here is that the site is running in the top left panel and I’ve selected part of the heading. We’re then seeing this selection in the bottom left panel like you’re probably familiar with in the IE9 developer tools. Next to it is the CSS that has been applied.&lt;/p&gt;  &lt;p&gt;The real magic though is the panel to the right. Here you can see the actual file containing the selected text, in this case it was “Index.cshtml”. Regardless of the file the text was contained in, Page Inspector will find it and highlight it in the source.&lt;/p&gt;  &lt;p&gt;But wait – there’s more; you can now &lt;em&gt;change&lt;/em&gt; content in that right hand panel and VS 11 will allow you to refresh the Page Inspector view and see those changes immediately reflected in the page:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Notification of a change to a file in Page Inspector" src="http://lh4.ggpht.com/-IMBZwKbLikQ/T49FRcLbAQI/AAAAAAAADek/Mg_QInGMazU/image32.png?imgmax=800" width="620" height="71" /&gt;&lt;/p&gt;  &lt;p&gt;Unlike using the IE9 developer tools or a product like Firebug, this is actually a means of actively evolving the code – these are “sticky” changes which are saved to the source file and persist beyond this instance of Page Inspector. If this all sounds a bit hard to visualise, check out the &lt;a href="http://channel9.msdn.com/posts/visual-studio-vnext-introducing-page-inspector/"&gt;Channel 9 video&lt;/a&gt; of Page Inspector in action. Very, very cool.&lt;/p&gt;  &lt;h4&gt;Summary&lt;/h4&gt;  &lt;p&gt;Firstly, a little piece of &lt;a href="http://blogs.msdn.com/b/jasonz/archive/2012/02/29/welcome-to-the-beta-of-visual-studio-11-and-net-framework-4-5.aspx"&gt;good news from Jason Zander&lt;/a&gt; if VS 11 is looking appealing to you:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Visual Studio 11 Beta meets our “Go Live” quality bar for pre-release software. Therefore we are recommending it for use in production, and supporting it as “Go Live” release.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Of course you can still work with your .NET 4.0 and earlier projects with VS 11 so using the new IDE is no way needs to drag your apps into the new version of the framework. Based on my experience of using VS 11 on Windows 8 in a VM it certainly seemed just as stable as 2010 on Windows 7. Having said, I don’t think I’ll be taking any risks with my work machine just yet.&lt;/p&gt;  &lt;p&gt;So overall feelings? Other than the grey, it’s continued incremental improvements across a wide range of areas. Actually I’m not saying the grey &lt;em&gt;isn’t &lt;/em&gt;an improvement, it’s just something I’m yet to fully adapt to. Like the previous couple of versions, all of these little improvements add up to a smoother, more productivity experience rather than one massive bang from a killer feature (although Page Inspector might get close to that for some). Positive steps forward, I reckon.&lt;/p&gt;  &lt;h4&gt;References&lt;/h4&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://www.asp.net/vnext/overview/whitepapers/whats-new"&gt;What's New in ASP.NET 4.5 and Visual Studio 11 Beta&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.hanselman.com/blog/VisualStudio11BetaInContext.aspx"&gt;Visual Studio 11 Beta in Context&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.hanselman.com/blog/FeaturesNOONENOTICEDInVisualStudio11ExpressBetaForWeb.aspx"&gt;Features NO ONE NOTICED in Visual Studio 11 Express Beta for Web&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.riagenic.com/archives/858"&gt;Decoding the use of grey in Visual Studio vNext&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blogs.msdn.com/b/visualstudio/archive/2012/04/11/improving-find-amp-replace-in-visual-studio-11-beta.aspx"&gt;Improving Find &amp;amp; Replace in Visual Studio 11 Beta&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-8627317035407578422?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/unjfPnfKnBw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/8627317035407578422/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/10-illustrated-examples-of-visual.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8627317035407578422?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/8627317035407578422?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/unjfPnfKnBw/10-illustrated-examples-of-visual.html" title="10 illustrated examples of Visual Studio 11" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-CBXxZZ1JUMQ/T49Em_n1bTI/AAAAAAAADbM/4ShEKdwkKeM/s72-c/image3.png?imgmax=800" height="72" width="72" /><thr:total>6</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/10-illustrated-examples-of-visual.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MNRnY6eip7ImA9WhVXFUs.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-4286104220842793288</id><published>2012-04-16T17:31:00.001+10:00</published><updated>2012-04-16T17:31:37.812+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-16T17:31:37.812+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>5 interesting security trends from Verizon’s 2012 data breach report</title><content type="html">&lt;p&gt;A few weeks back there was a great document released by Verizon (yep, the big American telco) titled &lt;a href="http://www.verizonbusiness.com/resources/reports/rp_data-breach-investigations-report-2012_en_xg.pdf"&gt;Verizon 2012 Data Breach Investigations Report&lt;/a&gt;. This weekend at the &lt;a href="https://www.owasp.org/index.php/AppSecAsiaPac2012"&gt;OWASP Appsec Asia Pacifica Conference&lt;/a&gt;, I sat in on a talk from &lt;a href="https://www.owasp.org/images/6/65/Mark_goudie.pdf"&gt;Mark Goudie from Verizon&lt;/a&gt; who helped put the whole report in perspective. Now this is a really interesting report because rather than talking about vulnerabilities (i.e. &lt;em&gt;potential&lt;/em&gt; risks), they’re actually looking at exploits; this is hard facts, people!&lt;/p&gt;  &lt;p&gt;This report is based on 855 incidents in 2011 (don’t be confused by the year in the title!) and because Verizon does this each year, there’s lots of data on how trends are changing. It’s also 80 pages of hard facts which can be rather a lot to digest. But there are some &lt;em&gt;really&lt;/em&gt; interesting nuggets in there for those who take a bit of an interest in security. Let me cherry-pick a few of the good ones.&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;h4&gt;1. Breaches are (almost) no longer coming from inside the organisation&lt;/h4&gt;  &lt;p&gt;It wasn’t that long ago that the common belief (and there were plenty of numbers backing this up), was that a significant portion of breaches stemmed from inside the organisation. Disgruntled employees, opportunistic mutineers, those off to greener pastures grabbing a handful of data on their way out – whatever – but it’s now a very different story:&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="3" width="620"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="270"&gt;&lt;strong&gt;Who is behind data breaches?&lt;/strong&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-left: #a7a9ac 1px solid" valign="top"&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid" valign="middle"&gt;&lt;font size="1"&gt;&lt;font color="#692168" size="4"&gt;&lt;strong&gt;98%&lt;/strong&gt;&lt;/font&gt; stemmed from external agents (+6%)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-left: #a7a9ac 1px solid" valign="top" rowspan="4"&gt;         &lt;p&gt;&lt;font size="1"&gt;No big surprise here; outsiders are still dominating the scene of corporate data theft. Organized criminals were up to their typical misdeeds and were behind the majority of breaches in 2011. Activist groups created their fair share of misery and mayhem last year as well—and they stole more data than any other group. Their entrance onto the stage also served to change the landscape somewhat with regard to the motivations behind breaches. While good old-fashioned greed and avarice were still the prime movers, ideological dissent and schadenfreude took a more prominent role across the caseload. As one might expect with such a rise in external attackers, the proportion of insider incidents declined yet again this year to a comparatively scant 4%.&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid" valign="middle"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;font color="#692168" size="4"&gt;4%&lt;/font&gt;&lt;/strong&gt; implicated internal employees (-13%)&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid" valign="middle"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;font color="#692168" size="4"&gt;&amp;lt;1%&lt;/font&gt;&lt;/strong&gt; committed by business partners (&amp;lt;&amp;gt;)&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="middle"&gt;&lt;font size="1"&gt;&lt;strong&gt;&lt;font color="#692168" size="4"&gt;58%&lt;/font&gt;&lt;/strong&gt; of all data theft tied to activist groups&lt;/font&gt;&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;Going back to that earlier comment about attacks previously often coming from inside, take a look at how the data has changed over time:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Threat agents over time by percent of breaches:&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Threat agents over time by percent of breaches" src="http://lh4.ggpht.com/-vq9c8oeqi0Y/T4vKzkQuktI/AAAAAAAADas/HHLul60FGLc/image2.png?imgmax=800" width="580" height="276" /&gt;&lt;/p&gt;  &lt;p&gt;Or to put it another way, breaches originating internally are now only 12% of what they were a few years ago and breaches from partners are near non-existent. The bad guys are now well and truly outside the organisation – but they’re still getting in.&lt;/p&gt;  &lt;p&gt;Oh – and in case you’re wondering why 98% plus 4% plus under 1% adds up to more than 100%, some breaches span both external and internal players. For example, someone external socially engineers someone internal into divulging their credentials. Makes sense now!&lt;/p&gt;  &lt;h4&gt;2. Hacktivists are becoming seriously bad news&lt;/h4&gt;  &lt;p&gt;This &lt;em&gt;shouldn’t&lt;/em&gt; come as a surprise, but the number above is still alarming; 58% of data theft was tied to individuals purporting to carry out their illegal activities on the basis of some form of activist belief. Frankly, when you look at the demographic of those being caught in the act (frequently teenagers or early 20’s), I suspect that whilst these individuals are readily attaching themselves to hacktivist groups such as Anonymous and LulzSec, it’s more about gaining a bit of notoriety and having some lulz than it is about fighting for a cause.&lt;/p&gt;  &lt;p&gt;From the report:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The most significant change we saw in 2011 was the rise of “hacktivism” against larger organizations worldwide.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Regardless of the motivations of hacktivists, the fact remains that there is a groundswell of individuals out there queuing up to take a shot at just about any website they can get their hands on. They don’t need the financial incentive of true cybercriminals or the political and military goals of nation states, they just need an easy target. Frankly, for website owners, this indiscriminate targeting should be rather worrisome.&lt;/p&gt;  &lt;h4&gt;3. The majority of breaches are related to simple credential theft&lt;/h4&gt;  &lt;p&gt;Here’s an interesting one; how do you think most hacks are being carried out these days? Some funky SQLi? Sneaky 0-day exploits? Not quite:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Threat Action Types by number of breaches&lt;/strong&gt;&lt;/p&gt;  &lt;table border="0" cellspacing="0" cellpadding="3" width="620"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;strong&gt;&lt;font size="1"&gt;Variety&lt;/font&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="1"&gt;Category&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;strong&gt;&lt;font size="1"&gt;Breaches&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Use of stolen login credentials&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#f37707" size="1"&gt;&lt;strong&gt;Hacking&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;30%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Backdoor (allows remote access/control)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#c9331a" size="1"&gt;&lt;strong&gt;Malware&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;18%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Exploitation of backdoor or command and control channel&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#f37707" size="1"&gt;&lt;strong&gt;Hacking&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;17%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Tampering&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#4cacc1" size="1"&gt;&lt;strong&gt;Physical&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;17%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Keylogger/Form-grabber/Spyware (capture data from user activity)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#c9331a" size="1"&gt;&lt;strong&gt;Malware&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;13%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Pretexting (classic social engineering)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#d0c106" size="1"&gt;&lt;strong&gt;Social&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;12%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Brute force and dictionary attacks&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#f37707" size="1"&gt;&lt;strong&gt;Hacking&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;8%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;SQL injection&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#f37707" size="1"&gt;&lt;strong&gt;Hacking&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;8%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Phishing (or any type of *ishing)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid; border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#d0c106" size="1"&gt;&lt;strong&gt;Social&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td style="border-bottom: #a7a9ac 1px solid" valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;8%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td style="border-right: #a7a9ac 1px solid" valign="top" width="409"&gt;&lt;font size="1"&gt;Command and control (listens for and executes commands)&lt;/font&gt;&lt;/td&gt;        &lt;td style="border-right: #a7a9ac 1px solid" valign="top" width="125"&gt;         &lt;p align="center"&gt;&lt;font color="#c9331a" size="1"&gt;&lt;strong&gt;Malware&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="84"&gt;         &lt;p align="center"&gt;&lt;font size="1"&gt;8%&lt;/font&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;The use of stolen credentials is, relatively speaking, off the chart. Nearly a third of breaches involved the theft of credentials (among other vectors – another one of these does-not-add-up-to-100% scenarios), which is quite astounding. I say this because obviously once credentials are obtained, the “hack” itself may be very unsophisticated indeed.&lt;/p&gt;  &lt;p&gt;Of course the bigger question this raises is “How are these credentials being stolen?” The report alludes to keyloggers and spyware being to blame so again, these breaches are often the result of a series of incidents opening various doors leading up to the eventual data breach.&lt;/p&gt;  &lt;h4&gt;4. You’re &lt;em&gt;way&lt;/em&gt; more likely to be socially engineered by talking to someone than via email&lt;/h4&gt;  &lt;p&gt;Social engineering is what happens via email, right? I mean there is a common belief that modern social engineering is something which predominantly has its roots online – or perhaps that was just my belief. The numbers, however, paint a very different story:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Social vectors by percent of breaches within Social&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Social vectors by percent of breaches within Social" src="http://lh5.ggpht.com/-9wAXAkCpbTg/T4vK0slr54I/AAAAAAAADa0/vCzn3t6kQtA/image5.png?imgmax=800" width="612" height="142" /&gt;&lt;/p&gt;  &lt;p&gt;What strikes me as surprising with these numbers is that the phone and in-person vectors both involve actually talking to and verbally engaging with the victim. The veil of anonymity provided via email and social networking sites is not there; the attacker has to respond on the spot with credibility and actually convince their victim to divulge information or perform activities they wouldn’t (or at least &lt;em&gt;shouldn’t&lt;/em&gt;) normally do.&lt;/p&gt;  &lt;p&gt;On the other hand, &lt;a href="http://en.wikipedia.org/wiki/The_Spanish_Inquisition_(Monty_Python)"&gt;nobody expects the Spanish inquisition&lt;/a&gt;; putting a voice – or even a face – to an attacker gives them enormous leg-up over a random phishing email when it comes to actually establishing some credibility. I recently read &lt;a href="http://www.amazon.com/Ghost-Wires-Adventures-Worlds-Wanted/dp/0316037702"&gt;Kevin Mitnick’s Ghost in the Wires&lt;/a&gt; and when you consider how easily he was able to gain trust and leverage his victims’ good nature against their better judgement, the figures above perhaps don’t seem so surprising.&lt;/p&gt;  &lt;h4&gt;5. Breaches take only minutes yet are discovered after months – and then they take a long time to fix&lt;/h4&gt;  &lt;p&gt;How much effort does it actually take to breach a vulnerable target? Apparently you can measure it in minutes:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Timespan of events by percent of breaches&lt;/strong&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Timespan of events by percent of breaches" src="http://lh3.ggpht.com/-mr_joWQS4dE/T4vK15kIesI/AAAAAAAADa4/Die6CBIqmbM/image8.png?imgmax=800" width="605" height="335" /&gt;&lt;/p&gt;  &lt;p&gt;The significant bulk of results falling into the “Minutes” category suggest that most breaches recorded by Verizon are very simple affairs. We’re talking 85% of them taking minutes or even less (I assume “Seconds” would imply some form of automation).&lt;/p&gt;  &lt;p&gt;But the other stunning fact here is how long it takes to actually discover the compromise after the fact; “Months” is very bloody long time! So someone has broken in, stolen your data and by the time you realise it, they’re looooong gone.&lt;/p&gt;  &lt;p&gt;The last row is also concerning because it says that more than half the time it takes &lt;em&gt;at least&lt;/em&gt; some weeks to fully plug the hole and get back to business as usual. Think about the business impact of this – we’re taking a major adverse outcome in many of these cases.&lt;/p&gt;  &lt;p&gt;You know what the most interesting stat is? It’s the one that’s not in the chart above but would be simply titled “Attacks that were &lt;em&gt;never&lt;/em&gt; discovered”. Now of course by its very nature we’re never going to see this charted, but the very fact that it more often than not takes &lt;em&gt;months&lt;/em&gt; to discover a breach, there are undoubtedly a significant number that go undiscovered. Forever. In fact the report does make a mention of this:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We hypothesize that many insider crimes go unreported because the organization is unaware of them, or because they decide for political reasons to handle it internally.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Makes you wonder who has been in your systems without you ever even realising, doesn’t it?&lt;/p&gt;  &lt;h4&gt;Other interesting titbits&lt;/h4&gt;  &lt;p&gt;On PCI compliance:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;We still hear the common mantra “How could I have been breached?—I’m compliant!” We cannot stress enough that while compliance definitely helps drive security, compliance does not equal security.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Does anyone &lt;em&gt;really&lt;/em&gt; think that being PCI compliant alone means you’re “unhackable”?! I suspect the big compliance sticker appeals to those who perhaps don’t have a great appreciation of the finer points of software security and it is those same individuals who are quoted above. Just sayin’.&lt;/p&gt;  &lt;p&gt;On the variety of hacking attacks:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Like every year, a handful of techniques dominate the charts. Generally, the hit parade can be subdivided into the authentication attacks, and technical attacks that bypass or break authentication altogether.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Now this covers everything from exploiting default (yes – default!) or guessable credentials, the use of stolen credentials and brute forcing auth systems. It’s interesting to juxtapose this with the &lt;a href="http://www.troyhunt.com/2010/05/owasp-top-10-for-net-developers-part-1.html"&gt;OWASP Top 10&lt;/a&gt;; no injection, no XSS (the “Top 2”), rather its third on the list – “Broken authentication and session management”.&lt;/p&gt;  &lt;p&gt;On attacks against larger organisations:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;So, what about larger organizations? Surely they’re a lot more difficult to infiltrate, right? Sadly, our data seems to suggest otherwise; it does not appear that cybercriminals have to work much harder to compromise larger organizations than they do for smaller ones.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Frankly, I think that any assumptions about larger organisations being harder attack targets is folly. We know from previous studies that the vast majority of breaches occur at the software layer and my view – which some may dispute – is that developers are developers are developers. Let me explain: these guys (of which I consider myself one), are the ones introducing the vulns and while some organisations invest more in their security education than others, I see no evidence that larger organisations take the security competency of their developers any more seriously than smaller organisations. The figures would seem to support this.&lt;/p&gt;  &lt;p&gt;On social engineering:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;The “carbon layer” of information assets (the user) is notoriously susceptible to social tactics such as deception, manipulation, and intimidation, and savvy threat agents know how to use this to their advantage.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I just like this one because I’ve never heard of the user being referred to as the “carbon layer” before. Nice :)&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-4286104220842793288?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/7N3dYfmUYOE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/4286104220842793288/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/5-interesting-security-trends-from.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/4286104220842793288?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/4286104220842793288?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/7N3dYfmUYOE/5-interesting-security-trends-from.html" title="5 interesting security trends from Verizon’s 2012 data breach report" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-vq9c8oeqi0Y/T4vKzkQuktI/AAAAAAAADas/HHLul60FGLc/s72-c/image2.png?imgmax=800" height="72" width="72" /><thr:total>2</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/5-interesting-security-trends-from.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AHR3c5fyp7ImA9WhVQFk0.&quot;"><id>tag:blogger.com,1999:blog-3977663544337573923.post-5582958293564995699</id><published>2012-04-05T17:08:00.001+10:00</published><updated>2012-04-05T17:08:56.927+10:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-04-05T17:08:56.927+10:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>A graphic demonstration of information leakage through security misconfiguration</title><content type="html">&lt;p&gt;A couple of days back I wrote about how &lt;a href="http://www.troyhunt.com/2012/04/67-of-aspnet-websites-have-serious.html"&gt;67% of ASP.NET websites have serious configuration related security vulnerabilities&lt;/a&gt;. In the post, I drew on figures collected by &lt;a href="https://asafaweb.com"&gt;ASafaWeb&lt;/a&gt; and observed that small misconfigurations in config files could very easily disclose information that could be leveraged to exploit the application.&lt;/p&gt;  &lt;p&gt;Quite a bit of discussion ensued through the comments, via Twitter and &lt;a href="http://www.reddit.com/r/netsec/comments/rq4pk/67_of_aspnet_websites_have_serious_configuration/"&gt;on Reddit&lt;/a&gt;. I found it slightly amusing that some camps felt these weren’t vulnerabilities at all as they couldn’t directly be exploited. Frankly, that’s a semantic argument; there’s a &lt;em&gt;significant&lt;/em&gt; risk in what’s classified as “security misconfiguration”, this is why &lt;a href="http://www.troyhunt.com/2010/12/owasp-top-10-for-net-developers-part-6.html"&gt;OWASP includes it in the Top 10&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Today I inadvertently stumbled across a perfect illustration of security misconfiguration which whilst not related to ASP.NET, was just what I needed to provide some perspective. This example comes courtesy of &lt;a href="http://www.kogan.com"&gt;kogan.com&lt;/a&gt; who just a few hours ago, had a homepage which looked like this:&lt;/p&gt; &lt;a name='more'&gt;&lt;/a&gt;  &lt;p align="center"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="" border="0" alt="Django debug info from kogan.com" src="http://lh5.ggpht.com/-Bz4FYWQSo0c/T31FBiEhenI/AAAAAAAADaQ/GINZrbSMYaA/SNAGHTMLa086a2b%25255B3%25255D.png?imgmax=800" width="312" height="2779" /&gt;&lt;/p&gt;  &lt;p&gt;I’m not going to provide the original sized image because frankly, there’s a lot of info up there I don’t want to be responsible for redistributing (Google cache may well&amp;#160; be taking care of that anyway). What I &lt;em&gt;can&lt;/em&gt; tell you is that it consisted of:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The website framework (Django) and version &lt;/li&gt;    &lt;li&gt;The identity the error was occurring under &lt;/li&gt;    &lt;li&gt;The physical location of the script &lt;/li&gt;    &lt;li&gt;The line of code the script was failing on &lt;/li&gt;    &lt;li&gt;The version of Python being run &lt;/li&gt;    &lt;li&gt;The web server (Apache) and version &lt;/li&gt;    &lt;li&gt;The database being used (MySQL) &lt;/li&gt;    &lt;li&gt;The host address of the database &lt;/li&gt;    &lt;li&gt;The username connecting the database &lt;/li&gt;    &lt;li&gt;The password being used to connect to the database &lt;/li&gt;    &lt;li&gt;The exact query being run on MySQL &lt;/li&gt;    &lt;li&gt;The SMTP server it was using &lt;/li&gt;    &lt;li&gt;The username used on the SMTP server &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Now this is no lightweight, static brochureware site – this is a full blown e-commerce website. This is a site which actually enables the purchase of electronic goods and ultimately asks customers to trust them with their credit card details.&lt;/p&gt;  &lt;p&gt;But this isn’t intended to be a Kogan-bashing exercise, in fact I’m sympathetic because security misconfiguration is &lt;em&gt;dead easy&lt;/em&gt; to get wrong. I’m no Django expert but the consensus seems to be that it was a simple case of still running in debug mode in production, which &lt;a href="https://docs.djangoproject.com/en/dev/ref/settings/"&gt;sounds about right&lt;/a&gt;:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Never deploy a site into production with DEBUG turned on.&lt;/p&gt;    &lt;p&gt;Did you catch that? NEVER deploy a site into production with DEBUG turned on.&lt;/p&gt;    &lt;p&gt;One of the main features of debug mode is the display of detailed error pages. If your app raises an exception when DEBUG is True, Django will display a detailed traceback, including a lot of metadata about your environment, such as all the currently defined Django settings (from settings.py).&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Hey, it happens, and if you deploy enough web apps you’ll eventually do the equivalent of this yourself in your chosen technology.&lt;/p&gt;  &lt;p&gt;Despite what it might look like, I’m actually leading somewhere with this: &lt;strong&gt;&lt;em&gt;you absolutely must check every aspect of your security configuration post-deploy.&lt;/em&gt;&lt;/strong&gt; It’s so easy for a simple setting to be changed during development, make its way into source control and then arrive with a bang in production. Practices like &lt;a href="http://www.troyhunt.com/2010/11/you-deploying-it-wrong-teamcity.html"&gt;config transforms&lt;/a&gt; in ASP.NET are great mitigations but they’re not fool proof.&lt;/p&gt;  &lt;p&gt;Going back to where I started in this post, this is why those security misconfiguration findings in ASafaWeb are so important. This is why you need to treat them seriously and this is why you need those post-deployment checks whether it be &lt;a href="https://asafaweb.com"&gt;via ASafaWeb&lt;/a&gt; for your ASP.NET sites or simple manual checks for any technology stack.&lt;/p&gt;  &lt;p&gt;So what now for Kogan? Well, that slipup wasn’t momentary; they’d been &lt;a href="https://twitter.com/#!/Shaun_R/status/187722620605702145"&gt;warned about this the day before&lt;/a&gt; and judging by &lt;a href="https://twitter.com/#!/Kogan"&gt;their Twitter stream&lt;/a&gt; today, plenty of other people observed the error page in its full blown glory. At the very least, there will need to be password resets all around and frankly I’d be cycling as much other disclosed info as possible while they’re at it. Then of course there’s the issue of what resources were accessed – and possibly manipulated – using the disclosed information so some degree of forensic investigation is going to need to happen too. At best, a whole bunch of time is going to be blown making sure everything check out. At worst, well, use your imagination.&lt;/p&gt;  &lt;p&gt;Check your websites, folks.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3977663544337573923-5582958293564995699?l=www.troyhunt.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TroyHunt/~4/YlcWurewWWc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.troyhunt.com/feeds/5582958293564995699/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.troyhunt.com/2012/04/graphic-demonstration-of-information.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/5582958293564995699?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/3977663544337573923/posts/default/5582958293564995699?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/TroyHunt/~3/YlcWurewWWc/graphic-demonstration-of-information.html" title="A graphic demonstration of information leakage through security misconfiguration" /><author><name>Troy Hunt</name><uri>https://profiles.google.com/111846329802076778489</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="32" height="32" src="//lh3.googleusercontent.com/-r4_CjHr7f7Q/AAAAAAAAAAI/AAAAAAAACgE/f4N7878YrQM/s512-c/photo.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh5.ggpht.com/-Bz4FYWQSo0c/T31FBiEhenI/AAAAAAAADaQ/GINZrbSMYaA/s72-c/SNAGHTMLa086a2b%25255B3%25255D.png?imgmax=800" height="72" width="72" /><thr:total>5</thr:total><feedburner:origLink>http://www.troyhunt.com/2012/04/graphic-demonstration-of-information.html</feedburner:origLink></entry></feed>

