<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx</link><description>I wrote this piece up for our group as we entered the most recent round of threat models. I've cleaned it up a bit (removing some Microsoft-specific stuff), and there's stuff that's been talked about before, but the rest of the document is pretty relevant.</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>MSDN Blog Postings  &amp;raquo; Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5037015</link><pubDate>Fri, 21 Sep 2007 21:02:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5037015</guid><dc:creator>MSDN Blog Postings  » Threat Modeling Again, Threat Modeling Rules of Thumb</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://msdnrss.thecoderblogs.com/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb/"&gt;http://msdnrss.thecoderblogs.com/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5108174</link><pubDate>Tue, 25 Sep 2007 01:52:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5108174</guid><dc:creator>Bill Stepanov</dc:creator><description>&lt;p&gt;I don't want to ruin the party, but the security model is flawed.&lt;/p&gt;
&lt;p&gt;First, if there is any possibility of a flaw in a program, all the space (user space or kernel space) is wasted. At least that's how &amp;quot;the bad guys&amp;quot; (as you call them), do it. They first find one little function that didn't check the size of the array and overwrite your data. Then they find ways to execute the overwritten data.&lt;/p&gt;
&lt;p&gt;You mention that you tell developers to &amp;quot;check&amp;quot;. Sorry, but that won't cut it. You need to use abstraction layers (as used in Java) to remove from the language the very possibility of overwriting data. Educating developers is a lost battle, because they make mistakes all the time, and they are so tired and so full of ideas coming from the marketing department, that they can't retain in their heads all your suggestions.&lt;/p&gt;
&lt;p&gt;Besides, microkernel technologies and safe languages like Java have been invented to solve these issues, so why spend so much time reinventing the wheel?&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5108729</link><pubDate>Tue, 25 Sep 2007 02:46:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5108729</guid><dc:creator>nksingh</dc:creator><description>&lt;p&gt;@Bill: &lt;/p&gt;
&lt;p&gt;Java and safe languages are not yet ready to be used for system-level software. &amp;nbsp;They have hard-to-control failure conditions that make them unreliable in low-memory or other resource-constrained situations. &amp;nbsp;At least this is true in the CLR (may or may not be true in Java). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not to forget that the long legacy of systems out there have been written in C and other unsafe languages. &amp;nbsp;Microsoft would be reinventing the wheel even more if they were to move to a microkernel or to a safe OS (MSR is doing this with Singularity). &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Lastly, buffer overflows are checked for automatically in MS compilers. &amp;nbsp;Look up PreFAST and the /analyze compiler switch sometime. &amp;nbsp;These tools aren't perfect, but they do catch a number of bugs. &amp;nbsp;For another interesting tool that is being applied at Microsoft, look up &amp;quot;Automated Whitebox Fuzz Testing&amp;quot; in your favorite search engine. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Threat modeling, as Larry describes it, is just a way for Microsoft to focus more manual resources on reviewing sensitive code for bugs which the automated tools may have missed.&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5225229</link><pubDate>Mon, 01 Oct 2007 19:47:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5225229</guid><dc:creator>Jim Lyon</dc:creator><description>&lt;p&gt;Bill's comments above in some ways reiterate Larry's rule number 2: If an attacker has already gotten you to run his code, you don't care what exactly that code can do -- you've already lost.&lt;/p&gt;
&lt;p&gt;Therefore, you need to be really concerned (paranoid, actually) about threats that allow an attacker to run arbitrary code without your consent. But it's a losing battle to try to stop that arbitrary code, once running, from doing evil things.&lt;/p&gt;</description></item><item><title>Some final thoughts on Threat Modeling...</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5225287</link><pubDate>Mon, 01 Oct 2007 19:54:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5225287</guid><dc:creator>Larry Osterman's WebLog</dc:creator><description>&lt;p&gt;I want to wrap up the threat modeling posts with a summary and some comments on the entire process. Yeah,&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5227070</link><pubDate>Mon, 01 Oct 2007 22:35:10 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5227070</guid><dc:creator>Bill Gates</dc:creator><description>&lt;p&gt;Larry, keep up the good work, I wish we had more people like you in Redmond.&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5227707</link><pubDate>Mon, 01 Oct 2007 23:47:50 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5227707</guid><dc:creator>Ka-Ping Yee</dc:creator><description>&lt;p&gt;Please stop using, stop quoting, and stop teaching &amp;quot;Immutable Law #1.&amp;quot; &amp;nbsp;It's simply wrong, and it's deceptively named.&lt;/p&gt;
&lt;p&gt;One of the important jobs of an operating system is to isolate and protect applications from one another. &amp;nbsp;To assume the so-called &amp;quot;Immutable Law #1&amp;quot; is to pretend that this responsibility doesn't exist. &amp;nbsp;Yes -- it is an assumption, not a law, and to call it &amp;quot;immutable&amp;quot; is to mislead the reader into accepting a broken security model instead of demanding better.&lt;/p&gt;
&lt;p&gt;I'm sure you've heard of encapsulation? &amp;nbsp;Defense in depth? &amp;nbsp;How about the principle of least privilege? &amp;nbsp;The thinking behind Law #1 -- that when a user runs a program, that program automatically gets full rights to pull all the user's privileges out of thin air and exercise them in whatever way it wants -- runs counter to all of these fundamental security concepts.&lt;/p&gt;
&lt;p&gt;A revision of your Law that's somewhat closer to the truth would be something like: &amp;quot;If a bad guy can persuade you to run his program on your computer, and your operating system allows that program to damage the system, other programs, or your data, it's not your computer anymore.&amp;quot; &amp;nbsp;The operating system does not get a free pass.&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5233619</link><pubDate>Tue, 02 Oct 2007 05:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5233619</guid><dc:creator>Jeff Haynes</dc:creator><description>&lt;p&gt;Although you mentioned the codec example in your last post, I somewhat fail to see how the security model addresses this case. &amp;nbsp;And, it seems that in some respects, as we use more flexible technologies (e.g. XML) that this is the more prevalent case. &amp;nbsp;I like to think of various components as being layer-agnostic in the sense that, of course, a media player shouldn't have to understand the stream that the codec does. &amp;nbsp;To that end, it seems that the security model should be aspect oriented...but I don't think that it is. &amp;nbsp;Maybe I'm missing something.&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5238194</link><pubDate>Tue, 02 Oct 2007 08:19:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5238194</guid><dc:creator>Frank</dc:creator><description>&lt;p&gt;Ka-Ping, you need to re-think your logic.&lt;/p&gt;
&lt;p&gt;If an OS had zero bugs, then you couldn't write an exploit to make the OS do something that wasn't intended.&lt;/p&gt;
&lt;p&gt;However, all OSs have at least one bug (perhaps unknown) that will permit a hacker to run arbitrary code at an elevated priv. &lt;/p&gt;
&lt;p&gt;Thus, the statement as the author wrote it is accurate. I do agree that your statement makes sense in a 8th grade discussion on computer security however. That isn't a slam, it just glosses over real-world facts.&lt;/p&gt;
&lt;p&gt;Every OS has at least one hole lurking somplace.&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5240278</link><pubDate>Tue, 02 Oct 2007 12:33:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5240278</guid><dc:creator>Ka-Ping Yee</dc:creator><description>&lt;p&gt;Frank: I believe you're making an invalid logical leap — from &amp;quot;no operating system is perfect&amp;quot; to &amp;quot;it doesn't matter whether operating systems provide isolation&amp;quot;. &amp;nbsp;If &amp;quot;all OSs have at least one&amp;quot; privilege escalation bug, then why provide privilege levels at all? &amp;nbsp;Why even bother to provide any OS security? &amp;nbsp;Clearly, because design intentions still matter — the possibility of an imperfect implementation doesn't imply that you can ignore them.&lt;/p&gt;
&lt;p&gt;Larry is talking here about design. &amp;nbsp;He's using &amp;quot;Law&amp;quot; #1 as a reason to ignore a class of threats, and thereby to ignore the possibility of defense in depth. &amp;nbsp;It's as if he's forgotten that software components can be written using the principle of least privilege, to limit the damage that can happen when problems do occur.&lt;/p&gt;
&lt;p&gt;You say that the statement of &amp;quot;Law&amp;quot; #1 is accurate. &amp;nbsp;I propose &amp;quot;Law #11&amp;quot;, then: &amp;quot;Whenever you choose to visit any website, you are making a decision to turn over control of your computer to Internet criminals.&amp;quot; &amp;nbsp;Now, is that accurate? &amp;nbsp;Would you have any objections to this statement appearing, say, as a newspaper headline?&lt;/p&gt;
&lt;p&gt;Since you could argue that every browser has at least one security weakness and every website can be defaced, Law #11 is precisely as accurate as Law #1. &amp;nbsp;But obviously, Law #11 is not how browsers are supposed to work. &amp;nbsp;It is infeasible to use a browser in a way that is consistent with Law #11. &amp;nbsp;If you really believed it, you would never visit any websites. &amp;nbsp;And likewise with Law #1. &amp;nbsp;If you really believed it, you would hardly ever run any programs on your computer (which would include never visiting any websites, or disabling Flash, Java, and JavaScript).&lt;/p&gt;
&lt;p&gt;Law #1 is accurate only in the same way that Law #11 is accurate — that is, in a way that is not useful to anyone. &amp;nbsp;It neither gives users a model of computer operation that they can apply in practice, nor gives developers a technical fact that helps them design better programs.&lt;/p&gt;
&lt;p&gt;But &amp;quot;Law&amp;quot; #1 is presented as an &amp;quot;Immutable Law&amp;quot; — a definition of how computers must and will always work. &amp;nbsp;Culp introduces his &amp;quot;Laws&amp;quot; thus: &amp;quot;Don't hold your breath waiting for a patch... . &amp;nbsp;It isn't possible for Microsoft—or any software vendor—to 'fix' them, because they result from the way computers work.&amp;quot; &amp;nbsp;Presenting it in such a way is exactly as misleading as presenting Law #11 as an &amp;quot;Immutable Law&amp;quot;. &amp;nbsp;Would you be satisfied if the Firefox security team responded like this to an arbitrary code execution vulnerability? &amp;quot;Don't hold your breath. &amp;nbsp;It isn't possible for us to fix this problem, because it results from the way computers work.&amp;quot;&lt;/p&gt;</description></item><item><title>re: Threat Modeling Again, Threat Modeling Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5294912</link><pubDate>Fri, 05 Oct 2007 18:44:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5294912</guid><dc:creator>Alan Karp</dc:creator><description>&lt;p&gt;Ping is right. &amp;nbsp;There is no reason every program I run needs all my privileges. &amp;nbsp;I always launch my browser in a restricted user account using a variant of runAs. &amp;nbsp;More than once a malicious script has run that didn't do anything worse than make me delete the account and create a new one. &amp;nbsp;In other words, a bad guy persuaded me to run his program on my computer and it was still my computer. &amp;nbsp;Sounds like Law #1 isn't so immutable after all.&lt;/p&gt;
&lt;p&gt;(Full disclosure: Ping and I worked together for a while.)&lt;/p&gt;</description></item><item><title>Threat Modeling Self Checks and Rules of Thumb</title><link>http://blogs.msdn.com/larryosterman/archive/2007/09/21/threat-modeling-again-threat-modeling-rules-of-thumb.aspx#5609012</link><pubDate>Tue, 23 Oct 2007 00:04:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5609012</guid><dc:creator>The Security Development Lifecycle</dc:creator><description>&lt;p&gt;Adam again. I hope you&amp;amp;#x2019;re still enjoying this as we hit #5 in the threat modeling series. In my&lt;/p&gt;
</description></item></channel></rss>