What can Diaspora learn about security from Microsoft?
talesfromthe.net
talesfromthe.net
1. Train the developers. This is probably the highest-value thing Microsoft did, but they were starting from zero.
2. Do threat modeling. Startups, as a rule, never do this exercise, which involves plotting the roles of users and attacker objectives and mapping them to inputs to guide development and testing. Not a high return on investment for a small team.
3. Use the tools. The author is oddly fixated on the tools provided by the Ruby/Web environment, especially given the fact that there's one tool they really need --- Burp Suite --- that has little to do with spec testing.
4. Include security in the software lifecycle. This means something at Microsoft (security is a gating step at design, at implementation, and in testing), but doesn't mean something for a team that has gotten a minimum viable social network out the door with little to no testing. You might as well ask them not to be a startup.
5. Be wary of legacy code. What legacy code?
6. Reach out to the security community. If they had just set up a page for security contacts, they probably could avoided most of their recent security drama, so this rings true.
I'd agree with this. From my experience, the most effective part of Microsoft's security practice is that we had dedicated developers whose only job is to evaluate the security of proposed changesets. This doesn't really help a startup that doesn't even have a product yet and only a handful of developers.
1. Looking at the code base they've released so far, Diaspora is starting from zero as well
2. I agree that startups don't do that. The result is insecure code. If Diaspora gains a reputation for bad security, people won't trust them.
3. Well, I'm a tools guy. Burp Suite looks great too, I didn't know about it, but it's just naive to say "that's the only tool you need".
4. I agree that Diaspora's made the right tradeoff so far in getting a minimum viable product out -- I had discussed that in my previous post. The question is, what next?
5. Everything they've written so far.
6. Setting up a page for security contacts is certainly a good first step.
There are 4-person teams out there that have fielded secure web applications. None of them follow the Microsoft SDL security practices. I like Microsoft, but most things that work for them won't work for startups.
I'd be surprised if people were building highly-secure web apps involving personal information, photos, and friendships without threat modeling ... would love to see counterexamples. anything you can share?
Think about it: how much would it cost Diaspora to bring in Matasano or one of your competitors to get some significant help with threat modeling, and catalyze the community to get involved and take it from there? For that matter there may probably at least some security consulting firms who get started for free, both because they believe in what Diaspora's trying to do and because of the visibility they'll potentially get if the project is successful.
It's a huge opportunity, and Diaspora's got some advantages: visibility, enthusiasm, name. So while I think that Diaspora has done the right thing so far by focusing on functionality, now's the time they should be thinking about investing in the long term.
I wouldn't invest in it until you feel like you've got a groove going with code review and testing.
However, I am not sure how best to do this without falling into the rabbit-hole of type systems, and semantic consistency of programming languages. Not to mention the arduous task of compiling "semantic signatures" of system libraries, OS facilities, known 3rd party application limitations/bugs, protocols, in addition to "business rules" that dictate how the application is used.
Maybe one day, when systems software is generated by an Eclipse plugin, and the stubs, with unit tests and design-by-contract guards sent off to minion coders to fill in the blanks. In the mean time, anybody attempting to formalize this seriously risks becoming a theory-weenie, working in a "perfect formal system." For now, ad-hoc reigns.
pencil and paper works well for doing an initial threat model, although not for sharing it and evolving it over time.
threat modeling does have some project management and QA aspects (it's a good basis for generating a security testing plan) ... it's also very educational in helping developers learn to think about things from a security perspective.
Two books largely on the MS way: "Writing Secure Code: Practical Strategies and Proven Techniques for Building Secure Applications in a Networked World" and "Threat Modeling (Microsoft Professional)"
I read both of them years ago when I thought I might take a job in security products at MS, and didn't think much of them.
Every developer should have to go back to some of the original IT security papers like Saltzer and Schroeder and think about every way their current framework or design probably compromises a basic principle and whether it is a good thing: http://emergentchaos.com/the-security-principles-of-saltzer-... Looking at open source software designed for security like postfix can also be quite enlightening.