<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.pluralsight.com/community/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Security Briefs</title><subtitle type="html">by Keith Brown</subtitle><id>http://www.pluralsight.com/community/blogs/keith/atom.aspx</id><link rel="alternate" type="text/html" href="http://www.pluralsight.com/community/blogs/keith/default.aspx" /><link rel="self" type="application/atom+xml" href="http://www.pluralsight.com/community/blogs/keith/atom.aspx" /><generator uri="http://communityserver.org" version="4.1.31106.3070">Community Server</generator><updated>2009-01-27T07:01:00Z</updated><entry><title>CardSpace v2 moving into a new role?</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/05/20/cardspace-v2-moving-into-a-new-role.aspx" /><id>/community/blogs/keith/archive/2009/05/20/cardspace-v2-moving-into-a-new-role.aspx</id><published>2009-05-20T17:41:07Z</published><updated>2009-05-20T17:41:07Z</updated><content type="html">&lt;p&gt;In the first version of CardSpace (the one that shipped with Vista), the focus was on building an identity selector that put the user at the center of the transaction. With v2 on the horizon, it feels like the emphasis is changing. No longer do I hear talk about user centricity. Rather now the identity selector seems to be positioned as a user-friendly form of home realm discovery for federated identity scenarios. Indeed CardSpace Geneva doesn’t include support for personal cards at all (although &lt;a href="http://blogs.msdn.com/card/archive/2008/10/29/windows-cardspace-geneva-beta.aspx" target="_blank"&gt;the CardSpace blog indicates that this is coming&lt;/a&gt;). The new selector is smaller and quicker to use, and does not ask the user nearly as many questions.&lt;/p&gt;  &lt;p&gt;Ruchi Bhargava, a dev lead on the Federated Identity team who currently leads the CardSpace team, has some enlightening comments in a &lt;a href="http://channel9.msdn.com/shows/Identity/Ruchi-Bhargava-on-Windows-CardSpace-Geneva/" target="_blank"&gt;recent screencast&lt;/a&gt;. I’ve done my best to transcribe here some interesting tidbits that I found a little more than halfway through the screencast:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“When we built CardSpace v1, our idea of CardSpace v1 was that we are going to have these users who are going to be very worried about security and very interested in identity. What we have realized is that, not really true, most users don&amp;#39;t really care about identity, most users just want to get into an application. Really choosing an identity is just a step in getting to the application.&lt;/p&gt;    &lt;p&gt;In v1 we had a whole drama around the identity selection experience we had the secure desktop, which would take over the screen which would result in sometimes the user losing context in what they were trying to do…&lt;/p&gt;    &lt;p&gt;…the mantra is we are trying to fix three things. We are trying to make our product lighter. We are trying to make our product faster. We are trying to make our product smaller...&lt;/p&gt;    &lt;p&gt;...we&amp;#39;ve realized that we don&amp;#39;t really want to be different from existing ways of using credentials and using identities. We actually want to use the same metaphors so that users understand them and are seeing them multiple times. We&amp;#39;ve tried to use CredUI, and we&amp;#39;ve gotten rid of a lot of the steps that you had to take to choose an identity. The number of clicks that you have to do are much much fewer now. It&amp;#39;s a much faster experience for the user.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;These changes will definitely make CardSpace more attractive to users, although it diverges from the original vision, which was all about getting the user involved in an “introduction &lt;a href="http://eprint.iacr.org/2007/399" target="_blank"&gt;ceremony&lt;/a&gt;” to help a user decide if she wants to trust a relying party with her personal information. Apparently Microsoft has discovered that users are put off by ceremony and would rather just “get on with using the application”. Regardless of how you feel about this shift, it’s helpful to know that it’s happening.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=63113" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Are complex federation scenarios driving us away from user-centric identity?</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/05/19/are-complex-federation-scenarios-driving-us-away-from-user-centric-identity.aspx" /><id>/community/blogs/keith/archive/2009/05/19/are-complex-federation-scenarios-driving-us-away-from-user-centric-identity.aspx</id><published>2009-05-19T15:00:36Z</published><updated>2009-05-19T15:00:36Z</updated><content type="html">&lt;p&gt;As I pointed out in my &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/05/07/is-the-identity-metasystem-user-centric-or-not.aspx" target="_blank"&gt;last post&lt;/a&gt;, in corporate federation scenarios, we don’t need to put the user at the center of the transaction. In these scenarios it’s not her personal information being shared, but rather a corporate identity that’s attached to her because she works for a company, and part of her job includes sharing some of those claims with trusted partner organizations via federation.&lt;/p&gt;  &lt;p&gt;But outside of the corporate space, in the sphere of social apps for example, things become less clearcut. For example, let’s say you wanted to build a social application in the cloud that relies on the .NET Access Control Service (ACS) to provide some basic role-based access control features. And let’s say you support some big identity providers like Windows Live ID (WLID), and maybe others that will more than likely come along in the future. Now you’ve got a reasonably complex federation scenario, where WLID (say) authenticates the user, provides claims about the user to ACS, which transforms those claims into something your app can use. How would you put the user in the center? Doesn’t the user need to authorize which claims WLID divulges to ACS? And then further, which claims ACS divulges to the app?&lt;/p&gt;  &lt;p&gt;It’s interesting that today WLID doesn’t issue claims from the user’s WLID profile. It’d sure be nice to be able to get the user’s given name and surname, for example. The only claim WLID supports seems to be the user’s ID (the email address she uses to sign-in to WLID). I wonder how WLID will ever support more than that in a federation scenario like I describe here? How would WLID know to trust ACS with the user’s profile info, given that ACS may pass this info to any other app? How does the user know that ACS (or any other intermediate issuer) is trustworthy enough to handle her personal information? While the user probably trusts the application to some extent, it seems ludicrous to ask her if she trusts some intermediary like ACS.&lt;/p&gt;  &lt;p&gt;Perhaps this is one of the tensions that helped push CardSpace v2 away from user centricity. But more on that in another post.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=62750" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Is the Identity Metasystem user centric or not?</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/05/07/is-the-identity-metasystem-user-centric-or-not.aspx" /><id>/community/blogs/keith/archive/2009/05/07/is-the-identity-metasystem-user-centric-or-not.aspx</id><published>2009-05-07T16:04:25Z</published><updated>2009-05-07T16:04:25Z</updated><content type="html">&lt;p&gt;My first introduction to this term involved reading &lt;a href="http://www.identityblog.com/" target="_blank"&gt;Kim Cameron’s&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/ms996456.aspx" target="_blank"&gt;article&lt;/a&gt;, where he defined it. That article lists &lt;a href="http://msdn.microsoft.com/en-us/library/ms996456.aspx" target="_blank"&gt;seven laws of identity&lt;/a&gt;, which make it clear that the user should be at the center whenever identity about her is revealed to a relying party. But over the last couple of years I’ve seen this term used in contexts that have nothing to do with putting the user at the center. Specifically I’m thinking of discussions of federated identity, typically used in a corporate setting, where WS-Federation is used to give members of an organization a single-sign on experience to their own resources and often resources in partner organizations (cross-org federation). In many of these cases, the user isn’t given any notice that her identity is being shared with a relying party. There’s usually no identity selector involved at all, and the user isn’t shown what attributes of her identity are being shared.&lt;/p&gt;  &lt;p&gt;Now in a corporate environment, when the user’s attributes are not personal (e.g., her SSN or credit card number isn’t being shared, rather her employee ID, groups that she’s in, etc. are being shared instead), who cares about putting the user at the center? It’s not necessary and would probably just annoy the user by adding an additional step (the user granting permission for these attributes to be shared).&lt;/p&gt;  &lt;p&gt;But why do people still use the term, “Identity Metasystem” in this context? Just because we’re sending SAML tokens around using WS-Trust and WS-Fed (passive) doesn’t mean we satisfy the seven laws.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=62133" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Feed Browser</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/04/08/feed-browser.aspx" /><id>/community/blogs/keith/archive/2009/04/08/feed-browser.aspx</id><published>2009-04-08T20:13:56Z</published><updated>2009-04-08T20:13:56Z</updated><content type="html">&lt;p&gt;Today I’m wrapping up an update to the whitepaper for the &lt;a href="http://msdn.microsoft.com/en-us/library/dd582744.aspx" target="_blank"&gt;.NET Access Control Service (ACS)&lt;/a&gt; which now includes an &lt;a href="http://bitworking.org/projects/atom/rfc5023.html" target="_blank"&gt;AtomPub&lt;/a&gt; management interface. I wanted to explore this a bit, and found that browsers didn’t work well since these atom documents have xml content, not HTML content. So I hacked up a little feed browser that lets you navigate the structure of an AtomPub resource.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_109342CD.png"&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;border-top:0px;border-right:0px;" title="image" border="0" alt="image" src="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_thumb_5F00_1982D50C.png" width="244" height="123" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Feed Browser is a very simple browser – you can type in the URL of an AtomPub resource and it’ll parse the resulting atom feed or entry and display it in two ways: in the left pane it displays a FlowDocument that includes hyperlinks for each &amp;lt;link&amp;gt; element, which allows you to navigate the structure of the resource using only HTTP GET. And in the right pane, it displays the raw XML for the feed or entry. I don’t make any attempt to parse the content of entries, but I found this tool helpful for poking around ACS, and you might find it helpful for looking at other browser-unfriendly AtomPub resources as well.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith.SampleCode/FeedBrowser.zip" target="_blank"&gt;Here are the bits&lt;/a&gt;. I built this project using Visual Studio 2008 SP1.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=59619" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Demos for my DevWeek talks</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/04/01/demos-for-my-devweek-talks.aspx" /><id>/community/blogs/keith/archive/2009/04/01/demos-for-my-devweek-talks.aspx</id><published>2009-04-01T17:51:46Z</published><updated>2009-04-01T17:51:46Z</updated><content type="html">&lt;p&gt;Thanks for those of you who attended my talks last week in London.&lt;/p&gt;  &lt;p&gt;The ASP.NET Attack and Defence talk covered SQL injection, cross-site scripting (XSS), and cross-site request forgery (CSRF). The first two have downloadable demos and labs as part of my &lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Keith/InputValidationModules.html" target="_blank"&gt;input validation module&lt;/a&gt; series. I don’t yet have any downloadable labs/video for CSRF, but I plan on adding that soon to my &lt;a href="http://www.pluralsight.com/main/olt/Module.aspx?a=keith-brown&amp;amp;n=aspdotnet-security&amp;amp;cn=aspdotnet-fundamentals" target="_blank"&gt;ASP.NET Security module&lt;/a&gt; for &lt;a href="http://www.pluralsight.com/main/olt/default.aspx" target="_blank"&gt;Pluralsight On-Demand&lt;/a&gt;. This is a free &lt;a href="http://www.pluralsight.com/main/olt/samples.aspx" target="_blank"&gt;sample module&lt;/a&gt; that we give away to help folks evaluate our &lt;a href="http://www.pluralsight.com/main/olt/default.aspx" target="_blank"&gt;online training product&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The all-day workshop on claims-based access and the Geneva Framework resulted in a ton of sample code as well. I’ve uploaded that &lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith.ConferenceDemos/2009_2D00_03_2D00_geneva_2D00_workshop_2D00_demos.zip" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=59234" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /><category term="ASP.NET" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Welcome Eric Burke</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/03/12/welcome-eric-burke.aspx" /><id>/community/blogs/keith/archive/2009/03/12/welcome-eric-burke.aspx</id><published>2009-03-12T15:13:47Z</published><updated>2009-03-12T15:13:47Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.pluralsight.com/main/instructor.aspx?name=Eric%20Burke" target="_blank"&gt;Eric&lt;/a&gt; is one of our newest instructors, and he’s got a &lt;a href="http://www.pluralsight.com/community/blogs/eburke/" target="_blank"&gt;new blog on our website&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Here’s what he’s got to say about himself:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Eric Burke is a member of the technical staff at Pluralsight, where he focuses on &lt;a href="http://www.pluralsight.com/main/ilt/Course.aspx?id=AP15" target="_blank"&gt;WPF&lt;/a&gt; and &lt;a href="http://www.pluralsight.com/main/ilt/Course.aspx?id=AP19" target="_blank"&gt;Silverlight&lt;/a&gt;. Eric is also a Principal Technical Yahoo! at Yahoo!, Inc., where he is a lead developer on the Yahoo! Messenger team. Since graduating from Purdue in 1994, Eric has been building software applications on Windows platforms. Eric is interested in all aspects of the .NET Framework, but specifically WPF, Silverlight, and other client technologies. He is also particularly interested in figuring out ways to improve performance of end-user .NET client applications. Eric has spoken about WPF numerous times, including at Microsoft and MIX07.&lt;/p&gt;    &lt;p&gt;When not cranking out code or squeezing out the last bits of performance on his WPF apps, Eric can be found hanging out with his wife Jenn and their kids, Alexis and Nathan. He also enjoys coaching football, watching football, thinking about football, talking about football, and pretty much anything else that has to do with football. ;)”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Subscribed!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57633" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /></entry><entry><title>Towards smarter password management (part 2)</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/02/26/towards-smarter-password-management-part-2.aspx" /><id>/community/blogs/keith/archive/2009/02/26/towards-smarter-password-management-part-2.aspx</id><published>2009-02-26T18:04:41Z</published><updated>2009-02-26T18:04:41Z</updated><content type="html">&lt;p&gt;&lt;a href="http://boingboing.net/2008/11/26/passwords-suck.html" target="_blank"&gt;Passwords suck&lt;/a&gt;. But we&amp;#39;re stuck with them for awhile. This &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx" target="_blank"&gt;little series of articles&lt;/a&gt; is my attempt to explore how you can implement a password store and login page that &lt;a href="http://en.wikipedia.org/wiki/Lake_Wobegon_Days" target="_blank"&gt;makes the best of it&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;A typical web app that has a user name/password store typically has two points of entry for an attacker:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;A. The system&amp;#39;s internal password store.&lt;/p&gt;&lt;/blockquote&gt; &lt;blockquote&gt; &lt;p&gt;B. An anonymously-accessible login page.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;In &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx" target="_blank"&gt;part 1&lt;/a&gt;, I shared some thoughts about (A), and this part will focus on (B).&lt;/p&gt; &lt;p&gt;Here are a modest list of goals for a good login page. Do you concur?&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;strong&gt;Goal 1: Prevent online password-guessing attacks.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This is the biggie. Imagine an attacker running automated &lt;a href="http://en.wikipedia.org/wiki/Password_cracking" target="_blank"&gt;dictionary and brute force attacks&lt;/a&gt; against your user store from the comfort and safety of his home in (insert name of impossible-to-prosecute-in foreign country) from the hundreds of machines on his personal &lt;a href="http://en.wikipedia.org/wiki/Botnet" target="_blank"&gt;zombie bot net&lt;/a&gt;. I&amp;#39;ve seen lots of articles that talk about the &lt;em&gt;need&lt;/em&gt; to achieve this goal, and some even offer rudimentary suggestions on how it might be done. I&amp;#39;m hoping to take a broader view of the topic and get to a solution that addresses more than just this one goal. And I plan to follow up with code that you can use in your ASP.NET websites.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Goal 2: Prevent information leaks.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Login pages are inherently risky. For some websites, this may be the only page accessible to anonymous users. And a login page provides a direct entry point to a highly valuable resource: your user account store. So you want to be very careful to design your login page so that it doesn&amp;#39;t leak information. The most obvious example of unintended information leakage is accidentally validating user names for the bad guy.&lt;/p&gt; &lt;p&gt;User names aren&amp;#39;t typically considered secret, but there&amp;#39;s no point making it easy for an attacker to collect a list of valid user names at your website. Knowing a valid user name just gives the attacker a target for a password guessing attack, or fodder for a &lt;a href="http://en.wikipedia.org/wiki/The_Art_of_Deception" target="_blank"&gt;social engineering attack&lt;/a&gt;. A simple example of a login page that doesn&amp;#39;t meet this goal is one that has a different error message depending on whether the user provided a valid user name or not. Say, &lt;em&gt;invalid user name&lt;/em&gt;, as opposed to the more vague &lt;em&gt;invalid user name or password&lt;/em&gt;. This fights against usability, but it&amp;#39;s a pretty reasonable tradeoff for most sites. A more subtle violation is where an attacker can use a side channel such as timing to determine a valid user name. If (as I discussed in &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx" target="_blank"&gt;part 1&lt;/a&gt;) you are using an iterative hash to validate a password, but you only perform this lengthy computation if the user supplies a valid user name, then the attacker may be able to tell the difference between a good and bad user name by keeping stats on how long it takes for your login page to return a response.&lt;/p&gt; &lt;p&gt;Similarly it would be bad if the page leaked information about the privilege level of a user, because when the website is the target of attack, high privilege user accounts are the juiciest targets.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Goal 3: Prevent client-side capture.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Many browsers offer to remember passwords for the user. I could write an entire article on the plusses and minuses of stored passwords, but I think we all agree that on shared computers (think Internet Cafe) we would rather that the user NOT store her password in the browser. If there&amp;#39;s a keylogger on the box, her password is already compromised as soon as she types it, but there&amp;#39;s no point inviting attack by leaving stored passwords in the browser as well (one of the evils of passwords is that they have long lifetimes).&lt;/p&gt; &lt;p&gt;Have you ever noticed that some websites don&amp;#39;t work so well with browser-stored passwords? It&amp;#39;s like the browser doesn&amp;#39;t recognize the password field (and often the user name as well). Knowing how to do this seems like it&amp;#39;d be a good tool in your bag of login page tricks.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Goal 4: Do all of this without introducing Denial of Service (DoS) vulnerabilities.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You don&amp;#39;t want to end up with a login page that makes it easy for an attacker to prevent legitimate users from logging in.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Goal 5: Do all of this while keeping your login page easy to use for legitimate users.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If your login page is hard to use, your customers will hate you. This is not good from a business or a security standpoint.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Do you agree with the goals I&amp;#39;ve listed here? Am I missing anything?&lt;/p&gt; &lt;p&gt;Next up, we&amp;#39;ll look at some random bits of advice that I&amp;#39;ve found during my research, and see how they help achieve these goals. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57020" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Excellent paper on password recovery</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/02/26/excellent-paper-on-password-recovery.aspx" /><id>/community/blogs/keith/archive/2009/02/26/excellent-paper-on-password-recovery.aspx</id><published>2009-02-26T17:33:49Z</published><updated>2009-02-26T17:33:49Z</updated><content type="html">&lt;p&gt;&lt;a href="http://fishbowl.pastiche.org/archives/docs/PasswordRecovery.pdf" target="_blank"&gt;This paper by Charles Miller&lt;/a&gt; has been around for awhile (2002), and I only now happened across it while gathering resources for my &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx" target="_blank"&gt;smarter password management series&lt;/a&gt;. A couple of quotes will give you a feel for the practicality and style of the paper, which came out of discussions from the webappsec mailing list at securityfocus.com.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;Some systems allow the user to choose the questions as well. This is a bad idea,&lt;br /&gt;as users don’t understand security, and will either make things too easy for an&lt;br /&gt;attacker to guess, or too hard for themselves to work out what the hell they were&lt;br /&gt;thinking, six months hence.&amp;quot;&lt;br /&gt;&lt;br /&gt;&amp;quot;If the process is not automated, and for some insane reason you have the original&lt;br /&gt;password on ﬁle, “What did you think the password was?” can be an effective&lt;br /&gt;question.&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=57018" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author></entry><entry><title>Towards smarter password management (part 1)</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx" /><id>/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-1.aspx</id><published>2009-02-21T15:43:38Z</published><updated>2009-02-21T15:43:38Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve been thinking a lot lately about password management. I&amp;#39;m not talking about how a user manages the myriad of passwords she&amp;#39;s stuck with, but rather how a system (e.g., a website) should go about accepting, storing, and protecting the password she chooses to use with that system. Face it. &lt;a href="http://boingboing.net/2008/11/26/passwords-suck.html" target="_blank"&gt;Passwords suck&lt;/a&gt;. But in reality, we&amp;#39;re going to be stuck with them for awhile, and it&amp;#39;d be nice to have some better guidance for people building systems that must manage them.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What motivates an attacker to want to know someone&amp;#39;s password?&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;1. Penetrate that system - by gaining control over a user&amp;#39;s account, an attacker gains a foothold, the depth of which is usually dependent on the level of privilege of the compromised account.&lt;/p&gt; &lt;p&gt;2. Glean knowledge about the user&amp;#39;s password - this could lead to attacks against other systems where the user has similar passwords.&lt;/p&gt; &lt;p&gt;3. &lt;a href="http://en.wikipedia.org/wiki/Denial-of-service_attack" target="_blank"&gt;Denial of service&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;I&amp;#39;m nervous about storing people&amp;#39;s passwords. And you should be too. So my main consideration in this little series of articles is going to focus on (2). Discovering &lt;a href="http://en.wikipedia.org/wiki/Personally_identifiable_information" target="_blank"&gt;PII&lt;/a&gt;&amp;nbsp;&lt;a href="http://news.cnet.com/8301-10789_3-10053523-57.html" target="_blank"&gt;can&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Identity_theft" target="_blank"&gt;be&lt;/a&gt; &lt;a href="http://www.securityfocus.com/news/6353" target="_blank"&gt;profitable&lt;/a&gt;, and I want to build systems that make this as hard as possible for the bad guys.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;There&amp;#39;s two avenues of attack at a typical website:&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;A. The system&amp;#39;s internal password store.&lt;/p&gt; &lt;p&gt;B. An anonymously-accessible login page.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The store (A) should be &lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsACountermeasure.html" target="_blank"&gt;protected&lt;/a&gt; so that an attacker cannot read it (2) or modify it (1, 3). And if an attacker does manage to read the store, it would be helpful if the store itself wouldn&amp;#39;t immediately divulge its secrets. You can strengthen a password store against &lt;a href="http://en.wikipedia.org/wiki/Password_cracking" target="_blank"&gt;offline attack&lt;/a&gt; by &amp;quot;&lt;a href="http://en.wikipedia.org/wiki/Salt_(cryptography)" target="_blank"&gt;salting&lt;/a&gt; and &lt;a href="http://www.schneier.com/paper-low-entropy.html" target="_blank"&gt;stretching&lt;/a&gt;&amp;quot; passwords with &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163958.aspx" target="_blank"&gt;techniques&lt;/a&gt; such as &lt;a href="http://en.wikipedia.org/wiki/PBKDF2" target="_blank"&gt;PBKDF2&lt;/a&gt;, from &lt;a href="http://tools.ietf.org/html/rfc2898" target="_blank"&gt;PKCS#5&lt;/a&gt;. This protection serves to slow down an offline attack, but likely won&amp;#39;t prevent him from eventually discovering at least some user passwords. At this point your main protection is the strength of your &lt;a href="http://en.wikipedia.org/wiki/Password_policy" target="_blank"&gt;password policy&lt;/a&gt; - if you allow short passwords, or easy-to-guess passwords, it&amp;#39;ll not take long for an attacker to discover them. You could go as far as performing your own dictionary attack against a proposed password before accepting it.&lt;/p&gt; &lt;p&gt;You can further strengthen your own website by &lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsACountermeasure.html" target="_blank"&gt;detecting&lt;/a&gt; such a breach and &lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/WhatIsACountermeasure.html" target="_blank"&gt;reacting&lt;/a&gt; by forcing users to reset their passwords by authenticating using a stronger, less convenient means. But those countermeasures aren&amp;#39;t going to matter if the attacker&amp;#39;s motivation is (2).&lt;/p&gt; &lt;p&gt;I&amp;#39;d hazard a guess that the vast majority of ASP.NET systems out there that store passwords are using SqlMembershipProvider, which does provide some basic protections like salt, but does not stretch passwords at all. It does provide some rudimentary methods for requiring strong passwords, but certainly doesn&amp;#39;t attempt a dictionary attack against them. And the password reset mechanism is very, very weak by default - supply your own question and answer? Don&amp;#39;t get me &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2006/05/24/24964.aspx" target="_blank"&gt;started&lt;/a&gt; on that! &amp;quot;What &lt;a href="http://www.goodsecurityquestions.com/" target="_blank"&gt;color&lt;/a&gt; is the sky?&amp;quot;&lt;/p&gt; &lt;p&gt;So readers, what am I missing in my analysis so far? In my &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/02/21/towards-smarter-password-management-part-2.aspx" target="_blank"&gt;next installment&lt;/a&gt;, I&amp;#39;ll start focusing on (B), which in truth, is really what I&amp;#39;m interested in at the moment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56880" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /></entry><entry><title>Back to basics</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/02/09/back-to-basics.aspx" /><id>/community/blogs/keith/archive/2009/02/09/back-to-basics.aspx</id><published>2009-02-10T04:36:06Z</published><updated>2009-02-10T04:36:06Z</updated><content type="html">&lt;p&gt;I&amp;#39;ve been getting a bit behind on my blog reading. So the other day, I took it upon myself to read some older posts on some of my favorite blogs. And a couple of items resonated with me enough that I decided to take some action. &lt;a href="http://www.hanselman.com/blog/TechnicalPresentationsBePreparedForAbsoluteChaos.aspx" target="_blank"&gt;This recent item&lt;/a&gt; from &lt;a href="http://www.hanselman.com/blog/" target="_blank"&gt;Scott Hanselman&lt;/a&gt; lead me to his &lt;a href="http://www.hanselman.com/blog/11TopTipsForASuccessfulTechnicalPresentation.aspx" target="_blank"&gt;outline of favorite presenting tips&lt;/a&gt;, where he reminded me to update the colors I use in PowerShell.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;I&amp;#39;ve found that the most readable setup for Command Prompts is a Black Background and with the Foreground Text set to Kermit Green (ala &amp;quot;Green Screen.&amp;quot;&amp;nbsp; Yes, I was suspicious and disbelieving also, but believe it or not, it really works.)&amp;nbsp; I set Command Prompts to Lucida Console, 14 to 18pt, Bold as well, with much success.&amp;quot;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;My shell used to look like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="78" alt="image" src="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_thumb.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;...but now it looks like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_4.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" height="76" alt="image" src="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith/image_5F00_thumb_5F00_1.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;...and I&amp;#39;ve been very happy with the difference. The new version (bright green on black) is much easier on my aging eyes, and from what Scott says, I think it&amp;#39;ll be easier for my audiences to read as well when I&amp;#39;m giving talks at shows or in the classroom. Thanks for the tips, Scott. I&amp;#39;m always reminded that the more I learn, the more I realize I know nothing.&lt;/p&gt; &lt;p&gt;And secondly, I&amp;#39;ve been meaning to get a good keyboard for a long time now. &lt;a href="http://www.codinghorror.com/blog/archives/001221.html" target="_blank"&gt;This article&lt;/a&gt; reminded me that as a developer, my keyboard is my main instrument, and that it&amp;#39;s a very cheap investment to buy a good one.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&amp;quot;As a corollary to &lt;a href="http://www.codinghorror.com/blog/archives/001188.html"&gt;We Are Typists First, Programmers Second&lt;/a&gt;, &lt;b&gt;a quality keyboard is one of the best (and cheapest) investments you can make in your career.&lt;/b&gt;&amp;quot;&lt;/p&gt; &lt;p&gt;&amp;quot;Whatever your choice, &lt;b&gt;give your keyboard the consideration it deserves; it is the one essential tool of our craft&lt;/b&gt;.&amp;quot;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;So a shiny new &lt;a href="http://www.daskeyboard.com/specifications.php" target="_blank"&gt;dasKeyboard&lt;/a&gt; is on its way. I opted for the wimpy one with the labeled keys because hey, sometimes I just need to look at the keyboard. Oh, and I also noticed that coding legend &lt;a href="http://www.pluralsight.com/main/instructor.aspx?name=fritz-onion" target="_blank"&gt;Fritz&lt;/a&gt; &lt;a href="http://www.pluralsight.com/community/blogs/fritz/default.aspx" target="_blank"&gt;Onion&lt;/a&gt; is now &lt;a href="http://twitter.com/fritzonion/status/1191616891" target="_blank"&gt;searching for keyboard stickers&lt;/a&gt; for his &lt;a href="http://www.thinkgeek.com/computing/input/8396/?cpg=ab" target="_blank"&gt;blank keyboard&lt;/a&gt;, so I figured I&amp;#39;d save myself some grief. I learned to program on a &lt;a href="http://en.wikipedia.org/wiki/Model_M_keyboard" target="_blank"&gt;clicky IBM keyboard&lt;/a&gt;, and it was, well, delightful to use. I&amp;#39;m looking forward to getting back to basics!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56671" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /></entry><entry><title>Top 25 Most Dangerous Programming Mistakes</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/02/05/top-25-most-dangerous-programming-mistakes.aspx" /><id>/community/blogs/keith/archive/2009/02/05/top-25-most-dangerous-programming-mistakes.aspx</id><published>2009-02-05T14:50:14Z</published><updated>2009-02-05T14:50:14Z</updated><content type="html">&lt;p&gt;From &lt;a href="http://www.codinghorror.com/blog/archives/001210.html" target="_blank"&gt;Coding Horror&lt;/a&gt;, originally from &lt;a href="http://cwe.mitre.org/top25/#Brief" target="_blank"&gt;CWE/SANS&lt;/a&gt;, this is a list that every developer should review from time to time.&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;&lt;b&gt;If you work on software in any capacity, at least skim this list.&lt;/b&gt; I encourage you to click through for greater detail on anything you&amp;#39;re not familiar with, or that piques your interest.  &lt;ol&gt; &lt;li&gt;&lt;a href="http://cwe.mitre.org/data/definitions/20.html"&gt;Improper Input Validation&lt;/a&gt; &lt;blockquote&gt;Ensure that your input is valid. If you&amp;#39;re expecting a number, it shouldn&amp;#39;t contain letters. Nor should the price of a new car be allowed to be a dollar. Incorrect input validation can lead to vulnerabilities when attackers can modify their inputs in unexpected ways. Many of today&amp;#39;s most common vulnerabilities can be eliminated, or at least reduced, with strict input validation. &lt;/blockquote&gt;&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;...&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Read the &lt;a href="http://www.codinghorror.com/blog/archives/001210.html" target="_blank"&gt;whole list&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56607" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /><category term="ASP.NET" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/ASP.NET/default.aspx" /></entry><entry><title>Is Intellisense for XAML broken for you in VS 2008?</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/01/28/is-intellisense-for-xaml-broken-for-you-in-vs-2008.aspx" /><id>/community/blogs/keith/archive/2009/01/28/is-intellisense-for-xaml-broken-for-you-in-vs-2008.aspx</id><published>2009-01-28T21:26:03Z</published><updated>2009-01-28T21:26:03Z</updated><content type="html">&lt;p&gt;I just fired up my first WPF project since I installed VS 2008, and intellisense wasn&amp;#39;t working in my XAML files. Like many other graybeards, I prefer to edit XAML files in the XML editor, rather than the designer. But I can&amp;#39;t live without intellisense!&lt;/p&gt; &lt;p&gt;If yours is broken, &lt;a href="http://social.msdn.microsoft.com/forums/en-US/vswpfdesigner/thread/88bc758f-e190-440a-a244-709ca646bc77/" target="_blank"&gt;the trick&lt;/a&gt; to fix it is probably as simple as ensuring that your default editor for XAML files is the Source Code editor, not the XML editor. Just close your XAML files if they are open, right click on one, and choose &amp;quot;Open With...&amp;quot; from solution explorer. Select whatever version of &amp;quot;Source Code (Text) editor&amp;quot; you prefer, and click &amp;quot;Set as Default&amp;quot;. That worked for me.&lt;/p&gt; &lt;p&gt;Hope this helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56462" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="GUI" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/GUI/default.aspx" /></entry><entry><title>My quest to programmatically generate a self-signed cert that makes IIS happy</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/01/28/my-quest-to-programmatically-generate-a-self-signed-cert-that-makes-iis-happy.aspx" /><id>/community/blogs/keith/archive/2009/01/28/my-quest-to-programmatically-generate-a-self-signed-cert-that-makes-iis-happy.aspx</id><published>2009-01-28T19:45:07Z</published><updated>2009-01-28T19:45:07Z</updated><content type="html">&lt;p&gt;I recently published &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/01/22/create-self-signed-x-509-certificates-in-a-flash-with-self-cert.aspx" target="_blank"&gt;Self-Cert&lt;/a&gt;, a tool that makes it really easy to generate self-signed certificates using the CryptoAPI. What&amp;#39;s nice about it is that it has a .NET class library underneath it that makes it easy to do this programmatically from managed code as well. The code is currently using &lt;a href="http://msdn.microsoft.com/en-us/library/aa376039(VS.85).aspx" target="_blank"&gt;CertCreateSelfSignCertificate&lt;/a&gt;, and it seems to work great, except that IIS refuses to set up an SSL session using one of my certs. &lt;p&gt;After quite a bit of experimenting and searching, I determined that the problem didn&amp;#39;t have anything to do with my cert creation code, but rather it had to do with the way I was importing the resulting certificate into the certificate store. &lt;p&gt;The details are still not entirely clear to me, although I&amp;#39;ve fixed the problem based on a comment left by &lt;a href="http://blogs.msdn.com/David.Wang/" target="_blank"&gt;David Wang&lt;/a&gt; on &lt;a href="http://groups.google.pt/group/microsoft.public.inetserver.iis.security/browse_thread/thread/07ba74d06dd0e673" target="_blank"&gt;a question posed on an IIS newsgroup&lt;/a&gt;. Two lines of code was all it took for the fix, right before I call X509Store.Add to add the cert. I export it to a PFX blob, then reimport it with a flag that indicates where the private key is stored:&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] pfx = cert.Export(X509ContentType.Pfx);
cert = &lt;span class="kwrd"&gt;new&lt;/span&gt; X509Certificate2(pfx, (&lt;span class="kwrd"&gt;string&lt;/span&gt;)&lt;span class="kwrd"&gt;null&lt;/span&gt;,
    X509KeyStorageFlags.PersistKeySet |
    X509KeyStorageFlags.MachineKeySet);&lt;/pre&gt;
&lt;p&gt;This makes the code work, though this feels a bit like cheating. If you know a more elegant solution, let me know, and I&amp;#39;ll incorporate it!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve updated &lt;a href="http://www.pluralsight.com/community/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/keith.SampleCode/SelfCert.zip" target="_blank"&gt;the bits&lt;/a&gt; with this fix, and added a version number. This fix brought it up to version 1.1.0.0.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56459" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /></entry><entry><title>Some tips on building better password storage for web sites</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/01/27/some-tips-on-building-better-password-storage-for-web-sites.aspx" /><id>/community/blogs/keith/archive/2009/01/27/some-tips-on-building-better-password-storage-for-web-sites.aspx</id><published>2009-01-27T21:10:59Z</published><updated>2009-01-27T21:10:59Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.pluralsight.com/main/instructor.aspx?name=mike-woodring" target="_blank"&gt;Mike Woodring&lt;/a&gt; sent me an email today. He was concerned that a website that he frequents wasn&amp;#39;t doing such a good job storing passwords. He pointed out that by clicking a button, you could get your password emailed back to you. After talking with someone at the website, he discovered that at least the website wasn&amp;#39;t storing passwords in cleartext, but they were instead encrypting those passwords and storing the ciphertext.&lt;/p&gt; &lt;p&gt;Mike&amp;#39;s concern about this makes sense. When you build a website that accepts passwords, &lt;a href="http://www.codinghorror.com/blog/archives/000953.html" target="_blank"&gt;you are taking on a huge responsibility&lt;/a&gt;, because you need to remember that many people tend to use the same password everywhere. So if you store the user&amp;#39;s name, email address, and password, and if your password database is compromised, your users might be in danger of having their bank accounts, etc. compromised. This is really scary stuff, and I&amp;#39;ve never envied developers who are in the position of building and maintaining such user account databases.&lt;/p&gt; &lt;p&gt;Here are some things you can do to help protect your users if you are storing their passwords:&lt;/p&gt; &lt;p&gt;1) Store the passwords using a strong, cryptographic &lt;a href="http://en.wikipedia.org/wiki/SHA_hash_functions" target="_blank"&gt;one way hash&lt;/a&gt; such as &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256.aspx" target="_blank"&gt;SHA-256&lt;/a&gt;. And use a long, random, &lt;a href="http://en.wikipedia.org/wiki/Salt_(cryptography)" target="_blank"&gt;salt&lt;/a&gt; value unique to each user. This will slow down a dictionary attack if someone is able to steal your password database.&lt;/p&gt; &lt;p&gt;2) Ensure that your website doesn&amp;#39;t allow &lt;a href="http://www.codinghorror.com/blog/archives/001206.html" target="_blank"&gt;unlimited failed login attempts&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;3) Implement a password policy that is strong enough for the level of security you need. Accepting three character passwords is just silly (the site Mike pointed me to allowed that, by the way). The higher value the website, the longer and more &lt;a href="http://en.wikipedia.org/wiki/Password_strength" target="_blank"&gt;complex&lt;/a&gt; your passwords should be.&lt;/p&gt; &lt;p&gt;4) Consider stretching the password by hashing and rehashing that hash, N times. PKCS #5 is an example of this, and there&amp;#39;s a class in the .NET Framework that makes this trivial: &lt;a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.rfc2898derivebytes.aspx"&gt;System.Security.Cryptography::Rfc2898DeriveBytes&lt;/a&gt;. This allows you to increase the strength of your password hash over time (by increasing N), so that Moore&amp;#39;s law isn&amp;#39;t only working in the attacker&amp;#39;s favor.&lt;/p&gt; &lt;p&gt;There&amp;#39;s no excuse for websites not to do at least (1) and (2).&lt;/p&gt; &lt;p&gt;(3) and (4) are important considerations for higher security websites, but then you should be asking yourself, why am I using passwords to protect a high security website?&lt;/p&gt; &lt;p&gt;What&amp;#39;s the ultimate solution to this problem? Instead of storing a password for a user, in the future it&amp;#39;ll be &lt;a href="http://msdn.microsoft.com/en-us/security/aa570351.aspx" target="_blank"&gt;much easier&lt;/a&gt; to&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/magazine/cc163520.aspx" target="_blank"&gt;federate&lt;/a&gt; with an identity provider that can deal with all the hard issues of client authentication. But if you&amp;#39;re not ready for that, there are still other alternatives, such as using SSL client certificates or &lt;a href="http://en.wikipedia.org/wiki/Information_Card" target="_blank"&gt;information cards&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56441" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /></entry><entry><title>Self-Cert and IIS</title><link rel="alternate" type="text/html" href="/community/blogs/keith/archive/2009/01/27/self-cert-and-iis.aspx" /><id>/community/blogs/keith/archive/2009/01/27/self-cert-and-iis.aspx</id><published>2009-01-27T15:01:00Z</published><updated>2009-01-27T15:01:00Z</updated><content type="html">&lt;p&gt;IIS is currently rejecting self-signed certs made with the &lt;a href="http://www.pluralsight.com/community/blogs/keith/archive/2009/01/22/create-self-signed-x-509-certificates-in-a-flash-with-self-cert.aspx" target="_blank"&gt;Self-Cert tool&lt;/a&gt;. Actually, you can install the cert into IIS, but when a client connects, IIS will refuse to set up the SSL tunnel. So far I believe the problem is that my certs aren&amp;#39;t getting an Authority Key Identifier extension, (CertCreateSelfSignCertificate doesn&amp;#39;t create one by default).&lt;/p&gt;
&lt;p&gt;Working on it...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.pluralsight.com/community/aggbug.aspx?PostID=56427" width="1" height="1"&gt;</content><author><name>keith-brown</name><uri>http://www.pluralsight.com/community/members/keith_2D00_brown/default.aspx</uri></author><category term="Security" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Security/default.aspx" /><category term="Geek talk" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Geek+talk/default.aspx" /><category term="Identity" scheme="http://www.pluralsight.com/community/blogs/keith/archive/tags/Identity/default.aspx" /></entry></feed>