<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title><![CDATA[[SecurityRatty] tag: fuzz]]></title>
    <link>http://securityratty.com/tag/fuzz</link>
    <description></description>
    <pubDate>Thu, 06 Mar 2008 19:13:00 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[MS08-067 and the SDL]]></title>
      <link>http://securityratty.com/article/df5eba2c21ebdf631d2dd9fbe82532ab</link>
      <guid>http://securityratty.com/article/df5eba2c21ebdf631d2dd9fbe82532ab</guid>
      <description><![CDATA[Hi, Michael here
No doubt you are aware of the out-of-band security bulletin issued by the Microsoft Security Response Center today, and like all security vulnerabilities, this is a vulnerability we...]]></description>
      <content:encoded><![CDATA[<P mce_keep="true">Hi, Michael here.</P>
<P>No doubt you are aware of the out-of-band security bulletin issued by the <A href="http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx" mce_href="http://www.microsoft.com/technet/security/Bulletin/MS08-067.mspx">Microsoft Security Response Center</A> today, and like all security vulnerabilities, this is a vulnerability we can learn from and, if necessary, can use to shape future versions of the Security Development Lifecycle (SDL).</P>
<P>Before I get into some of the details, it's important to understand that the SDL is designed as a multi-pronged security process to help systemically reduce security vulnerabilities. In theory, if one facet of the SDL process fails to prevent or catch a bug, then some other facet should prevent or catch the bug. The SDL also mandates the use of security defenses, because we know full well that the SDL process will never catch all security bugs. As we have said many times, the goal of the SDL is to "Reduce vulnerabilities, and reduce the severity of what's missed."</P>
<P>In this post, I want to focus on the SDL-required code analysis, code review, fuzzing and compiler and operating system defenses and how they fared.</P>
<H3>Code Analysis and Review</H3>
<P>I want to start by analyzing the code to understand why we did not find this bug through manual code review nor through the use of our static analysis tools. First, the code in question is reasonably complex code to canonicalize path names; for example, strip out ‘..' characters and such to arrive at the simplest possible directory name. The bug is a stack-based buffer overflow inside a loop; finding buffer overruns in loops, especially complex loops, is difficult to detect with a high degree of probability without producing many false positives. At a later date I will publish more of the source code for the function. </P>
<P>The loop inside the function walks along an incoming string to determine if a character in the path might be a dot, dot-dot, slash or backslash and if it is then applies canonicalization algorithms.</P>
<P>The irony of the bug is it occurs while calling a bounded function call:</P>
<BLOCKQUOTE>
<P>_tcscpy_s(previousLastSlash, pBufferEnd - previousLastSlash, ptr + 2);</P></BLOCKQUOTE>
<P>This function is a macro that expands to <A href="http://msdn.microsoft.com/en-us/library/td1esda9(VS.80).aspx" mce_href="http://msdn.microsoft.com/en-us/library/td1esda9(VS.80).aspx">wcscpy_s</A>(dest, len, source); technically, the bug is not in the call to wcscpy_s, but it's in the way the arguments are calculated. As I alluded to, all three arguments are highly dynamic and constantly updated within the while() loop. There is a great deal of pointer arithmetic in this loop. Without going into all the gory attack details, given a specific path, and after the while() loop has been passed through a few times, the pointer, previousLastSlash, gets clobbered. </P>
<P>In my opinion, hand reviewing this code and successfully finding this bug would require a great deal of skill and luck. So what about tools?&nbsp; It's very difficult to design an algorithm which can analyze C or C++ code for these sorts of errors.&nbsp; The possible variable states grows very, very quickly.&nbsp; It's even more difficult to take such algorithms and scale them to non-trivial code bases. This is made more complex as the function accepts a highly variable argument, it's not like the argument is the value 1, 2 or 3! Our present toolset does not catch this bug. </P>
<P>Ok, now I'm really going out on a limb with this next section.</P>
<P>Over the last year or so I've noticed that the security vulnerabilities across Microsoft, but most noticeably in Windows have become bugs of a class I call "onesey - twosies" in other words, one-off bugs. There is a good side and a bad side to this. First the good news; I think perhaps we have removed a good number of the low-hanging security vulnerabilities from many of our products, especially the newer code. The bad news is, we'll continue to have vulnerabilities because you cannot train a developer to hunt for unique bugs, and creating tools to find such bugs is also hard to do without incurring an incredible volume of false positives. With all that said, I will add detail about one-off bugs to our internal education; I think it's important to make people aware that even with great tools and great security-savvy engineers, there are still bugs that are very hard to find.</P>
<H3>Fuzz Testing</H3>
<P>I'll be blunt; our fuzz tests did not catch this and they should have. So we are going back to our fuzzing algorithms and libraries to update them accordingly. For what it's worth, we constantly update our fuzz testing heuristics and rules, so this bug is not unique.</P>
<H3>Defenses</H3>
<P>If you want the full details of the defenses, and how they come into play on Windows Vista and Windows Server 2008, I urge you to read teh SVRD team's in-depth <A href="http://blogs.technet.com/swi/" mce_href="http://blogs.technet.com/swi/">analysis</A>&nbsp;once it is posted.</P>
<P>A big focus of the SDL is to define and require defenses because we have no allusions about finding or preventing all security vulnerabilities by attempting to get the code right all the time, because no-one can do that. No one. &nbsp;See my comment above about one-off bugs! </P>
<P>Let's look at each SDL mandated requirement and how they fared in light of this vulnerability.</P>
<H4>-GS</H4>
<P>The -GS story is not so simple. A lot of code is executed before a cookie check is made and the attacker can control the overflow because the overflow starts at an offset before the stack buffer, rather than at the stack buffer itself. So the attacker can overwrite other frames on the call stack, corresponding to functions that return before a cookie check is made. That's a long way of saying that -GS was not meant to prevent this type of scenarios.</P>
<H4>ASLR and NX</H4>
<P>The code fully complies with the SDL, and is linked with /DYNAMICBASE and /NXCOMPAT on Windows Vista and Windows Server 2008. There are great defenses when used together, and reduce the chance of a successful attack substantially. Also, the stack offset is randomized too, making a deterministic attack even more unlikely.</P>
<H4>Service Restart Policy</H4>
<P>By default the affected service is marked to restart only twice after a crash on Windows Vista and Windows Server 2008, which means the attacker has only two attempts to get the attack right. Prior to Windows Vista, the attacker has unlimited attempts because the service restarts indefinitely. </P>
<H4>Authentication</H4>
<P>Thanks to mandatory integrity control (MIC) settings (which comes courtesy of UAC) the networking endpoint that leads to the vulnerable code requires authentication on Windows Vista and Windows Server 2008 by default. Prior to Windows Vista, the end point is always anonymous, so anyone can attack it, so long as the attacker can traverse the firewall. This is a great example of SDL's focus on attack surface reduction; requiring authentication means the number of attackers that can access the entry point is dramatically reduced.</P>
<H4>Firewall</H4>
<P>We enabled the firewall by default in Windows XP SP2 and later, this was a direct learning from the Blaster worm. By default, ports 139 and 445 are not opened to the Internet on Windows XP SP2, Windows Vista and Windows Server 2008. </P>
<H3>Summary</H3>
<P>The $64,000 question we ask ourselves when we issue any bulletin is "did SDL fail?" and the answer in this case is categorically "No!" No because as I said earlier the goal of the SDL is "Reduce vulnerabilities, and reduce the severity of what you miss." Windows Vista and Windows Server 2008 customers are protected by the defenses in the operating system that have been crafted in part by the SDL. The development team who built the affected component compiled and linked with the appropriate settings as described in "<A href="http://msdn.microsoft.com/en-us/library/bb430720.aspx" mce_href="http://msdn.microsoft.com/en-us/library/bb430720.aspx">Windows Vista ISV Security</A>" and <A href="http://www.microsoft.com/mspress/books/10723.aspx" mce_href="http://www.microsoft.com/mspress/books/10723.aspx">Writing Secure Code for Windows Vista</A> so that their service is protected by the operating system. </P>
<P>The team did not poke holes through the firewall unnecessarily, in accordance with the SDL.</P>
<P>The team reduced their attack surface, in accordance with the SDL, by requiring authenticated connections rather than anonymous connections by default.</P>
<P>We know that the SDL-mandated -GS has very strict heuristics so some functions are not protected by a stack cookie, but in this case, there is no buffer on the stack, so there will be no cookie. We know this. There are no plans to remedy this in the short term. </P>
<P>Fuzzing missed the bug, so we will update our fuzz testing heuristics, but we continually update our fuzzing heuristics anyway. </P>
<P>In short, based on what we know right now, Windows Vista and Windows Server 2008 customers are protected because of the SDL-mandated defenses in the operating system, and because the development team adhered to the letter of the SDL to take advantage of those defenses.</P>
<P>Chalk one up for Windows Vista and later and the SDL!</P>
<P>As usual, questions and comments are very welcome.</P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=9012073" width="1" height="1">]]></content:encoded>
      <pubDate>Wed, 22 Oct 2008 21:09:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/manual code review">manual code review</category>
      <category domain="http://securityratty.com/tag/code review">code review</category>
      <category domain="http://securityratty.com/tag/vulnerabilities">vulnerabilities</category>
      <category domain="http://securityratty.com/tag/reduce security vulnerabilities">reduce security vulnerabilities</category>
      <category domain="http://securityratty.com/tag/sdl">sdl</category>
      <category domain="http://securityratty.com/tag/windows">windows</category>
      <category domain="http://securityratty.com/tag/windows server">windows server</category>
      <category domain="http://securityratty.com/tag/sdl process fails">sdl process fails</category>
      <category domain="http://securityratty.com/tag/sdl process">sdl process</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/10/22/ms08-067.aspx">MS08-067 and the SDL</source>
    </item>
    <item>
      <title><![CDATA[SDL Sessions at BlueHat]]></title>
      <link>http://securityratty.com/article/bddb4f5b0c8437f73140811dafbc6401</link>
      <guid>http://securityratty.com/article/bddb4f5b0c8437f73140811dafbc6401</guid>
      <description><![CDATA[Bryan here. Last January, I wrote a post on this blog bemoaning the difficulty of making security interesting and sexy to developers. Applied research conferences generally place a much greater...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Bryan here. Last January, I wrote a post on this blog bemoaning the difficulty of making security interesting and “</FONT><A href="http://blogs.msdn.com/sdl/archive/2008/01/29/sexy-development-lifecycle.aspx"><FONT face=Calibri color=#0000ff size=3>sexy</FONT></A><FONT face=Calibri size=3>” to developers. Applied research conferences generally place a much greater emphasis on revealing new vulnerabilities and new attack techniques, and much less emphasis on educating people on how to actually fix those vulnerabilities. I was at </FONT><A href="http://www.rsaconference.com/"><FONT face=Calibri color=#0000ff size=3>RSA Conference</FONT></A><FONT size=3><FONT face=Calibri> last April, and I attended a session by a very well-regarded, high-profile security researcher. He gave an eloquent and educational presentation on the dangers of a significant new attack vector, but all the prescriptive guidance he gave for dealing with the threat amounted to something like, “If you’re worried about this kind of thing, talk to your browser manufacturer.” No offense to this presenter, but if I’m going to listen to 70 minutes of discussion of a dangerous threat, I want to leave the room with a clear understanding of what I can do to solve the problem! It’s not enough just to know that the problem exists.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>So, in conjunction with the </FONT><A href="http://blogs.technet.com/bluehat/"><FONT face=Calibri size=3>BlueHat</FONT></A><FONT size=3><FONT face=Calibri> team, I am pleased to announce that the SDL team will be organizing the sessions for the second day of the fall BlueHat conference. The BlueHat SDL sessions will be laser-focused on not just describing vulnerabilities but also solving them. Every attendee should leave every presentation with a clear idea of exactly what he or she needs to do to protect themselves from the threat that was discussed during the session.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>The sessions will begin, appropriately, with the topic of secure design. Danny Dhillon of </FONT><A href="http://www.emc.com/"><FONT face=Calibri size=3>EMC</FONT></A><FONT face=Calibri size=3> and the SDL team’s own Adam Shostack will each present their organization’s approach to threat modeling. As a bonus, Adam will also be demonstrating the new </FONT><A href="http://download.microsoft.com/download/1/5/0/150636A9-9EA8-4D00-9E6B-2723F4C188B4/Microsoft%20SDL%20Threat%20Modeling%20Tool%203.0.pdf"><FONT face=Calibri size=3>SDL Threat Modeling tool</FONT></A><FONT face=Calibri size=3> that you might have heard about </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/09/16/sdl-press-tour-announcements.aspx"><FONT face=Calibri size=3>last week</FONT></A><FONT size=3><FONT face=Calibri>. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Next up is Matt Miller, a recent and very welcome </FONT><A href="http://blogs.msdn.com/michael_howard/archive/2008/08/18/matt-miller-joins-the-security-science-team.aspx"><FONT face=Calibri size=3>addition</FONT></A><FONT face=Calibri size=3> to the Microsoft Security Science team. Matt has a fantastic presentation on the evolution of buffer overflow attacks and on the corresponding development of overflow mitigations. From there we will switch gears to look at some managed code implementation issues: </FONT><A href="http://www.isecpartners.com/"><FONT face=Calibri size=3>iSEC Partners</FONT></A><FONT size=3><FONT face=Calibri>’ Scott Stender and Alex Vidergar will demonstrate coding techniques to mitigate elusive concurrency vulnerabilities in web applications.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>At this point we will have covered the Design and Implementation phases of the SDL; where better to go from here than Verification? One of the most important activities in the Verification phase is fuzzing, and we have a trio of security experts from the Microsoft Security Science team to talk about it. Jason Shirk, Lars Opstad, and Dave Weinstein will answer three of the most common fuzzing questions: How should I fuzz? When have I fuzzed enough? And what do I do now that I’ve fuzzed? <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Finally, we will wrap up the Verification phase talks with a return appearance to BlueHat by </FONT><A href="http://www.stachliu.com/"><FONT face=Calibri size=3>Stach &amp; Liu</FONT></A><FONT size=3><FONT face=Calibri>’s Vinnie Liu. Vinnie will compare different approaches to security verification – static code analysis, blackbox analysis, and manual code review – and make recommendations as to when each approach is best used.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Even if you can’t make it in to BlueHat in person, you can still watch the sessions via streaming media on </FONT><A href="http://technet.microsoft.com/"><FONT face=Calibri color=#0000ff size=3>TechNet</FONT></A><FONT face=Calibri size=3>. Additionally, webcast interviews with the speakers – condensed “Cliff’s Notes” versions of their full presentations – will be posted on </FONT><A href="http://channel9.msdn.com/Search/Default.aspx?Term=bluehat"><FONT face=Calibri color=#0000ff size=3>Channel 9</FONT></A><FONT size=3><FONT face=Calibri>. And we’ll be continuing the BlueHat tradition of inviting speakers and other industry notables to guest blog about their topics and the latest security trends. More information on all of these resources will be posted here when it becomes available.<o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8965212" width="1" height="1">]]></content:encoded>
      <pubDate>Thu, 25 Sep 2008 12:05:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/sdl">sdl</category>
      <category domain="http://securityratty.com/tag/bluehat">bluehat</category>
      <category domain="http://securityratty.com/tag/sessions">sessions</category>
      <category domain="http://securityratty.com/tag/sdl team">sdl team</category>
      <category domain="http://securityratty.com/tag/sdl threat">sdl threat</category>
      <category domain="http://securityratty.com/tag/bluehat sdl sessions">bluehat sdl sessions</category>
      <category domain="http://securityratty.com/tag/bluehat conference">bluehat conference</category>
      <category domain="http://securityratty.com/tag/verification phase talks">verification phase talks</category>
      <category domain="http://securityratty.com/tag/verification phase">verification phase</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/09/25/sdl-sessions-at-bluehat.aspx">SDL Sessions at BlueHat</source>
    </item>
    <item>
      <title><![CDATA[Discovery and Fuzzing for SQL injections with Web 2.0 Applications]]></title>
      <link>http://securityratty.com/article/11c0b7d1187a4d4792526511fcafa051</link>
      <guid>http://securityratty.com/article/11c0b7d1187a4d4792526511fcafa051</guid>
      <description><![CDATA[Web 2.0 application assessment is becoming increasingly challenging due to their behavior and implementation of the components. It is imperative to identify hidden Web 2.0 resources and fuzz them to...]]></description>
      <content:encoded><![CDATA[Web 2.0 application assessment is becoming increasingly challenging due to their behavior and implementation of the components. It is imperative to identify hidden Web 2.0 resources and fuzz them to d...]]></content:encoded>
      <pubDate>Wed, 03 Sep 2008 07:32:19 +0000</pubDate>
      <category domain="http://securityratty.com/tag/web">web</category>
      <category domain="http://securityratty.com/tag/application assessment">application assessment</category>
      <category domain="http://securityratty.com/tag/resources">resources</category>
      <category domain="http://securityratty.com/tag/due">due</category>
      <category domain="http://securityratty.com/tag/components">components</category>
      <category domain="http://securityratty.com/tag/behavior">behavior</category>
      <category domain="http://securityratty.com/tag/imperative">imperative</category>
      <category domain="http://securityratty.com/tag/increasingly">increasingly</category>
      <category domain="http://securityratty.com/tag/fuzz">fuzz</category>
      <source url="http://www.net-security.org/article.php?id=1174">Discovery and Fuzzing for SQL injections with Web 2.0 Applications</source>
    </item>
    <item>
      <title><![CDATA[Improve Security with "A Layer of Hurt"]]></title>
      <link>http://securityratty.com/article/8863df5f439aabcb64e3fc7d0777f2bf</link>
      <guid>http://securityratty.com/article/8863df5f439aabcb64e3fc7d0777f2bf</guid>
      <description><![CDATA[Hello, Michael here
I got a lot of interesting comments from my TechEd 2008 presentation entitled, &quot;How To Review Your Code And Test For Security Bugs,&quot; but the most comments and questions were...]]></description>
      <content:encoded><![CDATA[Hello, Michael here. 
<P>I got a lot of interesting comments from my <A href="http://blogs.msdn.com/sdl/archive/2008/06/26/security-thoughts-from-teched-2008.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2008/06/26/security-thoughts-from-teched-2008.aspx">TechEd 2008 presentation</A> entitled, "How To Review Your Code And Test For Security Bugs," but the most comments and questions were reserved for fuzz testing; I was blown away by the number of people who thought fuzz testing was hard, or that you only left fuzz testing to ‘leet hackers.</P>
<P>During the presentation I mentioned in some depth how to perform fuzz testing, and what parts of an application should be fuzz testing targets. I also introduced an idea (that's not new) to help people who have never performed fuzz testing begin fuzz testing with very little cost and friction. The idea is to add a small layer of code to an application to automatically mutate untrusted data as it comes into an application; I called that code layer "a layer of hurt."</P>
<P>Before I continue, I want to point out that fuzzing is an SDL requirement, but the idea in this blog post is not an SDL requirement, it's just another way to help meet SDL fuzzing requirements.</P>
<P>Adding a layer of hurt, as shown in the picture below, is pretty simple as it involves adding code to an application to tweak data as it comes into an application. You can work out where to place the fuzzing code by looking at your threat models to see where data crosses trust boundaries. You could also simply grep the code looking for APIs that read data, for example:</P>
<UL>
<LI>Read from files: fread, ReadFile</LI>
<LI>Reading from sockets: recv, recvfrom</LI>
<LI>For .NET code, any stream.Read</LI></UL>
<P>You get the picture.</P>
<P>The fuzzing code should appear right after the API that reads that data.</P>
<P mce_keep="true">For example, C or C++ code that reads from a UDP socket and then fuzzes the data before it's consumed by the rest of the application might look like this:</P><FONT size=1 face=Courier>
<P>char RecvBuf[1024];<BR>int&nbsp; BufLen = sizeof(RecvBuf);</P>
<P mce_keep="true">int result = recvfrom(<BR>&nbsp;&nbsp; RecvSocket, <BR>&nbsp;&nbsp; RecvBuf, <BR>&nbsp;&nbsp; BufLen, <BR>&nbsp;&nbsp; 0, <BR>&nbsp;&nbsp; (SOCKADDR *)&amp;SenderAddr, <BR>&nbsp;&nbsp; &amp;SenderAddrSize);</P></FONT><FONT size=1 face=Courier>
<P>#ifdef _FUZZ<BR>&nbsp;&nbsp; Fuzz(RecvBuf,&amp;BufLen);<BR>#endif</P></FONT>
<P>Or, in C#, code that reads from an untrusted file:</P><FONT size=1 face=Courier>
<P>FileStream fileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);<BR>uint len = (uint)(fileStream.Length);<BR>byte[] fileData = new byte[fileStream.Length];<BR>fileStream.Read(fileData, 0, (int)len);<BR>fileStream.Close();</P></FONT><FONT size=1 face=Courier>
<P mce_keep="true">#if _FUZZ_<BR>&nbsp; Malform pain = new Malform();<BR>&nbsp; fileData = pain.Fuzz(fileData);<BR>#endif</P></FONT>
<P>In both code examples, Fuzz() mutates the incoming data. In the C++ case, the fuzzing code looks like this:</P><FONT size=1 face=Courier>
<P>void Fuzz(_Inout_bytecap_(*pcbBuf) char *pBuf, <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _Inout_ size_t *pcbBuf) {<BR><BR>&nbsp; if (!pcbBuf || !pBuf || !*pcbBuff || *pBuf) return;<BR>&nbsp; if ((rand() % 100) &gt; 5) return; // fuzz about 5% of Buffers</P>
<P>&nbsp; size_t cLoop = 1 + (rand() % 4);</P>
<P>&nbsp; for (size_t j = 0; j &lt; cLoop; j++) {</P>
<P>&nbsp;&nbsp;&nbsp; size_t i=0,&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iLow = rand() % *pcbBuf,&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iHigh = 1+rand() % *pcbBuf,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iIter = 1+rand() % 8;<BR><BR>&nbsp;&nbsp;&nbsp; if (iLow &gt; iHigh)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {size_t t=iHigh; iHigh=iLow; iLow=t;}</P>
<P>&nbsp;&nbsp;&nbsp; char ch=0;<BR>&nbsp;&nbsp;&nbsp; switch(rand() % 9) {</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 0 : // reset upper bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] &amp;= 0x7F;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 1 : // set upper bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] |= 0x80;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 2 : // toggle all bits<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] ^= 0xFF;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 3 : // set to random chars<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] = (char)(rand() % 256);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 4 : // set NULL chars to (possibly) non-NULL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!pBuf[i])&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] = (char)(rand() % 256);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 5 : // swap adjacent bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; __max(iHigh-1,iLow); i+= iIter)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {char t=pBuf[i]; pBuf[i] = pBuf[i+1]; pBuf[i+1]=t;}&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 6 : // set to random chars every n-bytes<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; __max(iHigh-1,iLow); i+= iIter)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] = (char)(rand()%256);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; case 7 : // set bytes to one random char<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ch=(char)(rand() % 256);&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for (i=iLow; i &lt; iHigh; i++)&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pBuf[i] = ch;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default: // truncate stream<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *pcbBuf = iHigh;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;<BR>&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp; }<BR>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </P></FONT>
<P>The sample C# and C++ fuzzing code is available as a ZIP file at the end of this post.</P>
<P>This code is an example of dumb-fuzzing, which is fuzzing with little or no regard for the data structure being manipulated. If you've never performed any kind of fuzz testing in the past, then you will probably find bugs with this simple fuzzing technique. Once you have weeded out the low-hanging bugs, you may need to turn your attention to smarter fuzzers. For example, in theory, this code would find few if any bugs in a PNG parser, because PNG files have a built in check-sum, so if you fuzz a PNG file, you'd have to recalculate the checksum to get decent code coverage.</P>
<P>When I showed this code during my presentation, I urged people to add it to their applications today if they currently don't do fuzz testing, and simply run their applications through their normal testing processes. Within three days of my presentation I received emails from people saying they had found bugs. I have no doubt others did too.</P>
<P>One of the comments I made during the session was,"If you can't spend the time on great fuzzing, fuzz anyway" and adding a "layer of hurt" is a reasonable start.</P>
<P>Please feel free to sound off if you have ideas to help improve the code and let us know what you think, either through email or comments to this post.</P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8794487" width="1" height="1">]]></content:encoded>
      <pubDate>Thu, 31 Jul 2008 15:13:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/layer">layer</category>
      <category domain="http://securityratty.com/tag/code layer">code layer</category>
      <category domain="http://securityratty.com/tag/code">code</category>
      <category domain="http://securityratty.com/tag/decent code coverage">decent code coverage</category>
      <category domain="http://securityratty.com/tag/fuzz">fuzz</category>
      <category domain="http://securityratty.com/tag/void fuzz">void fuzz</category>
      <category domain="http://securityratty.com/tag/ifdef fuzz">ifdef fuzz</category>
      <category domain="http://securityratty.com/tag/code examples">code examples</category>
      <category domain="http://securityratty.com/tag/perform fuzz">perform fuzz</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/07/31/improve-security-with-a-layer-of-hurt.aspx">Improve Security with "A Layer of Hurt"</source>
    </item>
    <item>
      <title><![CDATA[ Walking with the SDL Part 2]]></title>
      <link>http://securityratty.com/article/6fd946e1231f0fb50a945c379295e319</link>
      <guid>http://securityratty.com/article/6fd946e1231f0fb50a945c379295e319</guid>
      <description><![CDATA[Jeremy Dallman here with Part Two in my series on Walking with the SDL. In Part One , I provided a snapshot of Crawling and discussed getting management approval. In Part Two, I will cover a couple...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Jeremy Dallman here with Part Two in my series on “Walking” with the SDL. In </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/07/18/walking-with-the-sdl-part-1.aspx"><FONT size=3 face=Calibri>Part One</FONT></A><FONT size=3><FONT face=Calibri>, I provided a snapshot of “Crawling” and discussed getting management approval. In Part Two, I will cover a couple more “Walk” components: expanding security training and formalizing requirements. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>This blog gives us a place to talk about our experiences from using the SDL here at Microsoft and hopefully provide useful information that will help you implement it more effectively at your company.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>So, I would encourage you to use the Comments section at the bottom of each post to ask questions, give us feedback, or request other topics for us to cover.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Some quick definitions before we dive in. I’ve been using the imagery of learning to “crawl, walk and run” as a way to provide some basic starting points that would move your organization toward implementing the Security Development Lifecycle (SDL). <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>“Walking” is the point where your security development practices become a lifecycle – a repeatable, reusable process that makes security a part of your development culture. To relate the analogy to SDL a bit more closely, think of <I style="mso-bidi-font-style: normal"><U>crawling</U></I> as the “SD” in SDL. For this post, we’ll continue to talk about <I style="mso-bidi-font-style: normal"><U>walking</U></I> – or adding the “L” in SDL. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Let’s jump into another component for adopting the Microsoft SDL to expand your own Security Development Lifecycle.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Expand Security Training<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Once you have management approval, it is necessary to gain grassroots acceptance of the changes – at the developer, QA/test, and PM levels. If you have been “crawling”, you have probably already implemented some sort of discipline-specific training around things like threat modeling, using compiler defenses, and fuzz testing. Now that you are building a lifecycle, your goal for security training should expand. Security training should be about creating an environment where writing secure software is everyone’s mission. While security training should be undertaken with the goal of understanding security issues and how to address them, good training (and instructors) will also explain why solving security problems is in their best interests and create an environment where they know voicing security concerns is encouraged. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Training has been one of the earliest and most important elements of the SDL at Microsoft. From our experience, we learned that the most effective approach is to divide your training into two tracks: <I style="mso-bidi-font-style: normal">general security principles</I> and <I style="mso-bidi-font-style: normal">role-specific security practices.</I> Before I jump into the details, I want to encourage you to also read Shawn Hernan’s </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/05/29/sdl-training.aspx"><FONT color=#0000ff size=3 face=Calibri>very good post about SDL training</FONT></A><FONT size=3><FONT face=Calibri> that highlights some of the ways to make security training effective.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>The general security principles should explain why security is important, how you define security requirements, the process you will use for writing and validating secure code, and how security relates to each phase of the lifecycle or unique roles contributing to the development process. A key factor for building a development lifecycle is educating your individual contributors on the value of investing in security. Of course </FONT><A href="http://blogs.msdn.com/sdl/archive/2007/05/31/oil-change-or-culture-change.aspx"><FONT color=#0000ff size=3 face=Calibri>changing culture</FONT></A><FONT size=3><FONT face=Calibri> takes time, but using the opportunity of structured training to explain your principles will be one of your most effective platforms for influencing change.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>At this point in your organizational maturity, you are also beginning to expand your security thinking by focusing on each role in the development process. Discipline-specific security training is where you dig into the details of implementing a Security Development Lifecycle. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpFirst><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The developer needs to understand the practical details of how to write code securely, how to set compiler flags, what a security code review means, how to avoid using banned APIs, and what tools are available for them to perform security analysis before checking in their code. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The QA/tester needs to know how to set security rules in test tools, how to perform penetration testing, and what the security quality criteria is for your product, or how to file a security bug. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The PM needs to understand how to define measurable goals or how security policies can be factored into feature design. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpMiddle><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>The business decision maker of your organization should understand how to track security metrics alongside other product measurements or how security policy plays a critical role in the overall quality and value of your product. <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 10pt 0.5in; mso-list: l1 level1 lfo1" class=MsoListParagraphCxSpLast><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Finally, it is critical for the employees occupying all job roles to understand the value of threat modeling – both as a tool for understanding threats early in the design phase and throughout the development process as a key barometer to the security pulse of your product. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Discipline-specific training will be the place to address these issues for your organization. In case you were wondering, <I style="mso-bidi-font-style: normal">all job roles should b</I>e required to attend both types of security training <B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal">before</I></B> wo<I style="mso-bidi-font-style: normal">rking<B style="mso-bidi-font-weight: normal"> </B></I>on your product.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3 face=Calibri>Our new SDL website [</FONT><A href="http://www.microsoft.com/sdl"><FONT color=#0000ff size=3 face=Calibri>http://www.microsoft.com/sdl</FONT></A><FONT size=3 face=Calibri>] will be a very good place to watch for future training materials. The </FONT><A href="http://msdn.microsoft.com/en-us/security/cc448120.aspx"><FONT color=#0000ff size=3 face=Calibri>SDL Training and Resources</FONT></A><FONT size=3><FONT face=Calibri> page has some useful material up now and more will be coming in the future. <o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>That’s Part Two. In Part Three, I will discuss the important “walk” components of formalizing security requirements and reusing threat models and attack surface reviews. Then we will close with the discussions on conducting final security reviews, and managing post-release documentation. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><U><FONT size=3><FONT face=Calibri>I’d like to hear if anyone is using the concept of “crawling” and “walking” to implement SDL in your company. <o:p></o:p></FONT></FONT></U></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoNoSpacing><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>?</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Do you provide security training to your employees today?<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoNoSpacing><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>?</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Do these additional training topics make sense in your organization? <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo2" class=MsoNoSpacing><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>?</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>What would you add to this that is unique to your application or company? <o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8762037" width="1" height="1">]]></content:encoded>
      <pubDate>Mon, 21 Jul 2008 12:56:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/define security requirements">define security requirements</category>
      <category domain="http://securityratty.com/tag/security requirements">security requirements</category>
      <category domain="http://securityratty.com/tag/requirements">requirements</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security development lifecycle">security development lifecycle</category>
      <category domain="http://securityratty.com/tag/development lifecycle">development lifecycle</category>
      <category domain="http://securityratty.com/tag/security pulse">security pulse</category>
      <category domain="http://securityratty.com/tag/perform security analysis">perform security analysis</category>
      <category domain="http://securityratty.com/tag/principles">principles</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/07/21/walking-with-the-sdl-part-2.aspx"> Walking with the SDL Part 2</source>
    </item>
    <item>
      <title><![CDATA["Walking" with the SDL - Part 1]]></title>
      <link>http://securityratty.com/article/a385f01ff42122f11ba5929b9506795a</link>
      <guid>http://securityratty.com/article/a385f01ff42122f11ba5929b9506795a</guid>
      <description><![CDATA[Jeremy Dallman here. Back in March I wrote a post about Crawling Toward SDL . I used the imagery of learning to crawl, walk and run as a way to provide some basic starting points that would move your...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>Jeremy Dallman here. Back in March I wrote a post about </FONT><A href="http://blogs.msdn.com/sdl/archive/2008/03/06/crawling-toward-sdl.aspx"><FONT size=3 face=Calibri>“Crawling” Toward SDL</FONT></A><FONT size=3><FONT face=Calibri>. I used the imagery of learning to “crawl, walk and run” as a way to provide some basic starting points that would move your organization toward implementing a version of Microsoft’s Security Development Lifecycle (SDL). <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>In this series I am going to talk about “Walking” with the SDL. Walking is the point where your security development practices become a lifecycle – a repeatable, mostly reusable process that makes security a part of your development culture. To relate the analogy to SDL a bit more closely, think of <I style="mso-bidi-font-style: normal"><U>crawling</U></I> as the “SD” in SDL. For this post, we’ll talk about <I style="mso-bidi-font-style: normal"><U>walking</U></I> – or adding the “L” in SDL. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>I will be covering quite a bit on this topic, so I intend to split it up in to a multi-part series over a few days. I’ll condense it all into one big doc at the end. In Part One, I will review “crawling” and the foundation you need to have in place as well as discuss getting management approval. In Part Two we’ll cover the topic of expanding your security training. In the additional posts, we’ll discuss formalizing requirements, reusing threat modeling and attack surface review data, the importance of final security reviews, and managing post-release documentation. All of these are components to “walking” with the SDL.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Before I jump into detailing what you can do to “walk” with the SDL, let’s look back at a snapshot of what you should already have in place from learning to “crawl.” At a high level, crawling involved three components. Each of these components requires specific activities or tools that your team must implement to begin developing secure code: <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Detailed awareness of your architecture and its </FONT><A href="http://msdn2.microsoft.com/en-us/magazine/cc163882.aspx"><FONT color=#0000ff size=3 face=Calibri>attack surface</FONT></A><FONT size=3><FONT face=Calibri>.<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>a.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Threat Modeling<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Tools that will perform security analysis on your application.<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>a.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Strengthen compiler defenses<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>b.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use code analysis or static analysis tools such as PREfast, FxCop, AppVerif<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>c.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Build a strong fuzz testing capability<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Results that show how the analysis resulted in improved security<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>a.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Response planning and response process in place<o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 1in; mso-list: l0 level2 lfo1" class=MsoNoSpacing><SPAN style="mso-bidi-font-family: Calibri; mso-bidi-theme-font: minor-latin"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>b.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use bugs to gather evidence and show that your work improved security<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 1in" class=MsoNoSpacing><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Think of these pieces as the “gross motor skills” you need to start walking. You should already be using these components and have reached a conscious decision to start building a lifecycle around your secure development practices. As you start figuring out how to “walk”, I want to point out that each of the concepts I discuss in this post is a <I style="mso-bidi-font-style: normal">critical</I> component of the Microsoft Security Development Lifecycle. Adopting the SDL in your company involves a combination of integrating the existing SDL principles and the creating of unique requirements and components specific to your environment to build your own Security Development Lifecycle. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>With that in place, let’s start talking about what it means to “Walk with SDL.”<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Obtain Management Approval/Endorsement<o:p></o:p></FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Creating a Security Development Lifecycle <I style="mso-bidi-font-style: normal">will</I> cost time and money. In addition, it will likely require some process changes. In most organizations, this change will not happen unless you obtain the management approval and endorsement necessary to compel the organization to act.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The key to successfully pitching SDL to your management can be found in the data you have been accumulating during the “crawl” phase. As you may recall from my crawling post, the simplest way to create evidence that clearly illustrates improved application security is to “mine” the data from your bug database. Connecting those bugs to known security vulnerabilities or to what would have been bad security issues that were avoided by fixing them in development is a powerful story. Of course your pitch should include other necessary components like anticipated costs, new software acquisition, possible vendor and consulting contracts and anticipated return on investment. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>However, the heart of your argument will be the story <I style="mso-bidi-font-style: normal">you</I> tell. The story is quite simply “If we hadn’t done this basic work in security, here is what we would have missed and how much it would have hurt…” followed by “if we continue to expand our security practices and make them a part of our process, we can better predict measurable security improvements that reduce the likelihood of future risks.”<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3 face=Calibri>The new SDL website [</FONT><A href="http://www.microsoft.com/sdl"><FONT color=#0000ff size=3 face=Calibri>http://www.microsoft.com/sdl</FONT></A><FONT size=3 face=Calibri>] provides some valuable reference material on the </FONT><A href="http://msdn.microsoft.com/en-us/security/cc420637.aspx"><FONT size=3 face=Calibri>Business Case for SDL</FONT></A><FONT size=3><FONT face=Calibri>. I would recommend that looking through that information for some good supporting material. In Part Two, I will discuss expanding your security training as another&nbsp;component of “walking” with SDL.</FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 10pt" class=MsoNormal><FONT size=3><FONT face=Calibri><U>I’d like to hear if anyone is using the concept of “crawling” and “walking” to implement SDL in your company. </U><o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoNoSpacing><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>?</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>What unique challenges are you facing as you try to push for SDL adoption? <o:p></o:p></FONT></FONT></P>
<P style="TEXT-INDENT: -0.25in; MARGIN: 0in 0in 0pt 0.5in; mso-list: l1 level1 lfo2" class=MsoNoSpacing><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>?</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>What have you used to successfully communicate the importance of security to your management?<o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8750221" width="1" height="1">]]></content:encoded>
      <pubDate>Fri, 18 Jul 2008 12:55:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/development">development</category>
      <category domain="http://securityratty.com/tag/secure development practices">secure development practices</category>
      <category domain="http://securityratty.com/tag/development culture">development culture</category>
      <category domain="http://securityratty.com/tag/security development practices">security development practices</category>
      <category domain="http://securityratty.com/tag/sdl">sdl</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security practices">security practices</category>
      <category domain="http://securityratty.com/tag/perform security analysis">perform security analysis</category>
      <category domain="http://securityratty.com/tag/application security">application security</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/07/18/walking-with-the-sdl-part-1.aspx">"Walking" with the SDL - Part 1</source>
    </item>
    <item>
      <title><![CDATA[SDL Training]]></title>
      <link>http://securityratty.com/article/36095f95c3adf54cf7cabefc378acfcb</link>
      <guid>http://securityratty.com/article/36095f95c3adf54cf7cabefc378acfcb</guid>
      <description><![CDATA[Hi everyone, Shawn Hernan here. Being a security guy is incredibly rewarding because you get to look at virtually any part of a product, from kernel drivers to web services to user education to sales...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Hi everyone, Shawn Hernan here. Being a security guy is incredibly rewarding because you get to look at virtually any part of a product, from kernel drivers to web services to user education to sales and servicing. You have to do that because a failure in one of those areas can endanger the security of our customers. Microsoft’s SDL process reflects that reality. The process is structured so that you really do have to look at each piece before you can sign off. But sometimes when others want to emulate the success of the SDL, they want to skip steps. They try to boil the SDL down into its component parts, like training, or tooling, or security response. Maybe the most common form of that mistake is training, but you see that same thinking applied to code scanning, security response, and just about every phase of the SDL. “<I style="mso-bidi-font-style: normal">Let’s just train everyone, and all our security problems will go away</I>.” If only it were so easy. I’d like to take a few minutes to try to explain why it’s not really that easy from my own experience. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>Have you ever sat in a corporate training? Some are good, some are bad, but did you ever say, “man I can’t <I>wait</I> for training today.” What about mandatory training? What about mandatory training in a subject that you really don’t think is your area? What if you had to do it every year, and got harassed if you didn’t do it? What if you were, say, an audio engineer and were dragged into a security class? <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>I ran the SDL training program at Microsoft for a long time, and developed and taught a big chunk of the training. I spent hundreds of hours in front of thousands of developers, testers, and program managers. <SPAN style="mso-bidi-font-style: italic">I got some really good reviews (and a few bad ones) on the classes I offered. And I tried to do a lot of things to try to make the trainings interesting. I handed out dozens of fresh peaches in an early class on fuzz testing, for example.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The room smelled really nice after that, and there are probably still a few people around Microsoft who think of fuzz testing when they see a peach. </SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>But even on my best day, I was under no illusion that the majority of the audience was excited to be there, and I was certain that they weren’t going to go back to their offices and spend weeks applying the lessons from the class, setting aside <I>other </I>things that are causing present and immediate problems in favor of something that is far off into the future. <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><SPAN style="mso-bidi-font-style: italic"><FONT face=Calibri>You have to work at getting people’s attention – especially as it relates to security and privacy. From time to time, I would see people reading their mail in class, and I would point to them and ask them a question. That did not endear me to the audience as much as the peaches, but embarrassment is always fresh and in season.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN></FONT></SPAN><SPAN style="FONT-FAMILY: Wingdings; mso-bidi-font-style: italic; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-ascii-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: Wingdings"><SPAN style="mso-char-type: symbol; mso-symbol-font-family: Wingdings">J</SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT face=Calibri> <o:p></o:p></FONT></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>One student wrote of one of my classes, “<I>the basics for secure design - could be replaced by non-anonymous site-wide exam with open material.” </I><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>He was not alone, I assure you. <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Is that an indication that our training, or any training, is pointless? Hardly, but training alone is not a change agent.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT face=Calibri size=3>Richard Derwent Cooke </FONT></SPAN><A href="http://www.changingminds.org/articles/articles08/you_get_the_results_you_reward.htm"><SPAN style="mso-bidi-font-style: italic"><FONT face=Calibri color=#0000ff size=3>wrote</FONT></SPAN></A><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>,<SPAN style="mso-spacerun: yes">&nbsp; </SPAN><I><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>“It is a first principle of Change Management that people will act in what they perceive as being their best interests.”<o:p></o:p></I></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>At best, training can provide people with insight into what they need to do to solve a security problem <I>if they believe that solving that security problem is in their best interests. <o:p></o:p></I></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>To be effective, training needs to happen in an environment:<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpFirst style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-style: italic; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>Where expectations are clearly set (the SDL sets specific minimum requirements). <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-style: italic; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>People have appropriate incentives and consequences (security is a great career path at Microsoft, and nobody wants to be the one holding up a ship schedule for failure to meet a security requirement).<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-style: italic; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>Where tools and resources to accomplish the goals are available (we build a whole variety of tools that map to the SDL requirements).<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpMiddle style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-style: italic; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>Where management models the behavior (recall the original BillG TWC memo). <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoListParagraphCxSpLast style="MARGIN: 0in 0in 10pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo1"><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-style: italic; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><SPAN style="mso-bidi-font-style: italic"><FONT size=3><FONT face=Calibri>Where the environment reflects and supports the values presented in the training (apparent in everything Microsoft does). <o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Don’t make the mistake of thinking that a bunch of training, even really high quality training done periodically, will result in actual behavior change. It won’t. You have to build an environment where people perceive solving security problems as being in their best interests. You have to make security <I style="mso-bidi-font-style: normal">their</I> problem – not in the sense of passing the buck, but in the sense of changing their behavior so they will bring security problems to you.</FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>To illustrate further, I’ll cite two examples. First, fuzz testing. Fuzz testing has been a success story here at Microsoft. Tools arise spontaneously to solve new fuzzing challenges, written by people who believe the challenges are their challenges. There are people who feel ownership for our fuzzing strategy and on-going research and science, there are specific goals and requirements, we have training (remember the peaches?), and internally developed fuzzers have won prestigious awards within the company, handed out by members of the executive staff, and all of this gets revisited periodically as part of the SDL. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp;</SPAN>By contrast, I’ll choose a less successful area – defect estimation. On my own volition, I created (based mostly on some excellent material from Microsoft Research) and taught a class called “Defect Estimation and Management” and added it to the SDL curriculum. Microsoft is a great place to work in that regard. It was pretty close to the best-reviewed class I taught. But, we have not yet been able to establish a set of tools to estimate security defect density effectively, and establish a fair set of expectations, incentives, and consequences, or even<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>decide what we should do if we had the data. We discovered some things, though. For example, based on what I observed (which should not be construed as rigorous research), it does not appear as if the density of general defects correlates closely with the density of security defects. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>And Microsoft Research found higher code coverage in testing correlates with <I style="mso-bidi-font-style: normal">higher </I>bug rates in the field. </FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>And so even though people like the idea of defect estimation, and we’ve got some interesting and surprising data, we’ve not yet been successful in changing people’s behavior. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>Generally speaking, an individual test manager does not feel that establishing a high quality estimate of their defect density is in his or her best interests, as compared to, say, improving the time in which an established series of tests can be performed . <SPAN style="mso-spacerun: yes">&nbsp;</SPAN><SPAN class=msoIns><INS cite=mailto:Kristen%20Kish dateTime=2008-05-28T10:53><o:p></o:p></INS></SPAN></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>We need to build an environment that has the tools, training, rewards and incentives, and expectations and consequences to change people’s behavior. Not that we’re not trying. But training won’t solve it alone, nor would tools, trophies, rants, testing, code review, or some edict from on high. The SDL is as much about changing the culture and influencing the behavior of individual engineers as it is anything else. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>I’m convinced that Microsoft’s SDL process works because it addresses the end-to-end problem - from training through servicing, and provides a complete environment where people feel ownership of their part of the security problem and have the resources to solve it. </FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>So the next time you find yourself sitting in some mandatory training, remember the lessons of the SDL (and most of the research on human performance management): training alone won’t cut it. If you want real behavior change, there have to be things outside the lecture room to influence people to change their behavior.</FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8558916" width="1" height="1">]]></content:encoded>
      <pubDate>Thu, 29 May 2008 11:22:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/real behavior change">real behavior change</category>
      <category domain="http://securityratty.com/tag/behavior">behavior</category>
      <category domain="http://securityratty.com/tag/sdl">sdl</category>
      <category domain="http://securityratty.com/tag/change peoples behavior">change peoples behavior</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security guy">security guy</category>
      <category domain="http://securityratty.com/tag/security defects">security defects</category>
      <category domain="http://securityratty.com/tag/defects">defects</category>
      <category domain="http://securityratty.com/tag/security class">security class</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/05/29/sdl-training.aspx">SDL Training</source>
    </item>
    <item>
      <title><![CDATA[Trip Report: PH-Neutral]]></title>
      <link>http://securityratty.com/article/16f4b3a55157f829576693064e2b93d2</link>
      <guid>http://securityratty.com/article/16f4b3a55157f829576693064e2b93d2</guid>
      <description><![CDATA[I spent the weekend in Berlin attending a conference called PH-Neutral, run primarily by the Phenoelit crew. This was the first European security conference Ive attended and I found it quite different...]]></description>
      <content:encoded><![CDATA[<p>I spent the weekend in Berlin attending a conference called PH-Neutral, run primarily by the <a href="http://www.phenoelit.de/">Phenoelit</a> crew.  This was the first European security conference I&#8217;ve attended and I found it quite different from any North American security gathering I&#8217;ve been to, such as <a href="http://blackhat.com">BlackHat</a>, <a href="http://cansecwest.com/">CanSecWest</a>, <a href="http://www.sourceboston.com/">SOURCE Boston</a>, <a href="http://www.microsoft.com/technet/security/bluehat/default.mspx">BlueHat</a>, or <a href="http://rsaconference.com/">RSA</a>.  Everything was far more casual and laid back, which is something I had heard about European conferences but hadn&#8217;t experienced until now (even EUSecWest is held in a club whereas CanSecWest is in a Marriott).</p>
<p><a href='http://www.veracode.com/blog/wp-content/uploads/2008/05/2525962901_6c15d2f291_o.jpg'><center><img src="http://www.veracode.com/blog/wp-content/uploads/2008/05/2525962901_6c15d2f291_o-300x225.jpg" alt="PH-Neutral Bridge" title="2525962901_6c15d2f291_o" width="300" height="225" class="aligncenter size-medium wp-image-103 photoborder" /></center></a></p>
<p>The event was held at <a href="http://www.insel-berlin.net/">Die Insel</a>, on a tiny island a few kilometers outside of Berlin&#8217;s city center, near Treptower Park.  The venue is mostly used for live music so basically it feels like a dark, somewhat dingy club (certainly the bathrooms are reminiscent of a club).  The presentations were on the 3rd floor in a room that probably held about 60 people in close quarters; to handle overflow, a closed-circuit feed was being simulcast on the 4th floor, which was a bit less crowded and, more importantly, opened out onto a rooftop deck which meant better ventilation.  The bottom floor led out to a Biergarten with tables, beach chairs, and a stage which was used for DJing.  The layout was actually pretty efficient for allowing around 200 people to mill about and socialize/network while not having to stray too far from where the talks were presented.</p>
<p><a href='http://www.veracode.com/blog/wp-content/uploads/2008/05/2525962813_b842faf96d_o.jpg'><center><img src="http://www.veracode.com/blog/wp-content/uploads/2008/05/2525962813_b842faf96d_o-225x300.jpg" alt="Bridge to Die Insel" title="2525962813_b842faf96d_o" width="225" height="300" class="aligncenter size-medium wp-image-102 photoborder" /></center></a></p>
<p>As far as the event itself, when I said &#8220;laid back&#8221; earlier, don&#8217;t interpret that to mean disorganized or watered down in any way.  It was run with stereotypical German efficiency, from badging to presentations to the after-hours parties.  The presentations were just as technical and relevant as any of the more &#8220;corporate&#8221; conferences.  Unfortunately for me, I don&#8217;t know that many people in European security circles, and most of the ones I do know weren&#8217;t in attendance.  Those I did meet, however, were impressively smart and well-versed.  Nobody was trying to conduct business transactions or slip away for meetings, which is inevitably what happens when only technical folks are present!</p>
<p><a href='http://www.veracode.com/blog/wp-content/uploads/2008/05/2526783152_fed88680d4_o.jpg'><center><img src="http://www.veracode.com/blog/wp-content/uploads/2008/05/2526783152_fed88680d4_o-225x300.jpg" alt="PH-Neutral Registration" title="2526783152_fed88680d4_o" width="225" height="300" class="alignnone size-medium wp-image-101 photoborder" /></center></a></p>
<p>For me, a few talks stood out.  Fukami and BeF&#8217;s talk on <a href="https://www.flashsec.org/mediawiki/images/5/57/SWF_and_the_Malware_Tragedy.pdf">SWF and the Malware Tragedy</a> discussed methods for automated static detection of malware in Flash movies.  Much of it centered on heuristics related to inconsistencies in the file format or tag structure, abnormal concentrations of strings in the constant pool, or the existence of various obfuscation techniques.  Ultimately, there are false positive issues to be addressed but that is just a fact of life with static analysis, and it will be an iterative process to refine those heuristics as the attack vectors evolve.  I thought this talk was particularly timely given the increasing prevalence of Flash as a conduit for exploits/malware, such as the most recent <a href="http://trailofbits.com/2008/05/28/flash-zero-day-attacks-wow/">Flash 0day</a> that made the news (granted, this was an exploit against Flash itself, not just using Flash as a delivery mechanism, but close enough).</p>
<p>I also enjoyed pierre&#8217;s talk on counterintelligence, basically a mélange of wiretapping and other bugging devices discovered in the wild.  War stories are always interesting, particularly when it comes to the realm of physical security.  One of the x-ray images he showed of a bugged pen was identical to a pen that I own (minus the bugging device of course&#8230; I hope).  The feel of the talk reminded me a bit of James Atkinson&#8217;s talk at SOURCE, &#8220;Telephone Defenses Against the Dark Arts&#8221; (video: <a href="http://sourceboston2008.blip.tv/file/799027/">Part 1</a> and <a href="http://sourceboston2008.blip.tv/file/800299/">Part 2</a>), which also got rave reviews.  </p>
<p>Mike Eddington&#8217;s presentation on the <a href="http://peachfuzz.sourceforge.net/">Peach 2</a> fuzzing framework was also quite interesting.  Peach 2 was released several months back but I haven&#8217;t really been paying much attention to it or any other fuzzing tool for some time.  In fact the last time I really had to implement a protocol fuzzer, I was using SPIKE 2.9, so that gives you some indication of how long it&#8217;s been.  Peach 2 includes some powerful built-in capabilities such as node relationships (e.g. field 1 represents the length of field 2; field 10 is a CRC-32 of fields 1 through 9), data transforms (those with battle scars from ASN.1 will be happy), state machines (packets 1 and 2 have to be normal in order to fuzz packet 3), monitoring agents (detecting when a crash happens and under what conditions), and much more.  I am itching to go fuzz something now just so I can tinker with Peach.</p>
<p>All in all, it was a good trip and I enjoyed the opportunity to see how things are done across the pond, and to do a little sightseeing in a historic and beautiful city.</p>
]]></content:encoded>
      <pubDate>Wed, 28 May 2008 16:56:40 +0000</pubDate>
      <category domain="http://securityratty.com/tag/talk">talk</category>
      <category domain="http://securityratty.com/tag/james atkinsons talk">james atkinsons talk</category>
      <category domain="http://securityratty.com/tag/flash">flash</category>
      <category domain="http://securityratty.com/tag/flash movies">flash movies</category>
      <category domain="http://securityratty.com/tag/recent flash 0day">recent flash 0day</category>
      <category domain="http://securityratty.com/tag/befs talk">befs talk</category>
      <category domain="http://securityratty.com/tag/dingy club">dingy club</category>
      <category domain="http://securityratty.com/tag/conference">conference</category>
      <category domain="http://securityratty.com/tag/european security conference">european security conference</category>
      <source url="http://www.veracode.com/blog/?p=98">Trip Report: PH-Neutral</source>
    </item>
    <item>
      <title><![CDATA[Oh No! Security Metrics!]]></title>
      <link>http://securityratty.com/article/a5891f843d3737c74fed3e8d871b1770</link>
      <guid>http://securityratty.com/article/a5891f843d3737c74fed3e8d871b1770</guid>
      <description><![CDATA[Hello, Michael here
A colleague sent me a link to a blog post from a couple of days ago: Pete Lindstrom of Burton Group blogged that Microsoft's SDL has Saved the World!! raising concerns about...]]></description>
      <content:encoded><![CDATA[Hello, Michael here. 
<P>A colleague sent me a link to a blog post from a couple of days ago: Pete Lindstrom of Burton Group blogged that&nbsp;<A href="http://spiresecurity.typepad.com/spire_security_viewpoint/2008/04/microsofts-sdl.html" mce_href="http://spiresecurity.typepad.com/spire_security_viewpoint/2008/04/microsofts-sdl.html">Microsoft's SDL has Saved the World!!</A> raising concerns about Microsoft using vulnerability counts as a means to measure security improvement resulting from the SDL.</P>
<P>I've raised this topic before, in my blog post <A href="http://blogs.msdn.com/sdl/archive/2008/02/21/the-first-step-on-the-road-to-more-secure-software-is-admitting-you-have-a-problem.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2008/02/21/the-first-step-on-the-road-to-more-secure-software-is-admitting-you-have-a-problem.aspx">The First Step on the Road to More Secure Software is admitting you have a Problem</A>. Here are two pertinent quotes from that blog post of Feb 21<SUP>st</SUP>:</P>
<BLOCKQUOTE>
<P><B><I>"Let's face it, no-one can agree on any measurement of security without getting knotted up." </I></B></P>
<P><B><I>"Measuring security is a real challenge, and while we may debate the merits of vulnerability counts, right now it's the only concrete metric we have."</I></B></P></BLOCKQUOTE>
<P>These comments are very important because there appears to be no more widely accepted security metric today, and while no perfect metrics exist, it's useful to have some objective data when trying to discuss this complex subject. Our customers constantly tell us to reduce the number of patches they need to apply to their products once in deployment. It costs them time and money to deploy security updates. The primary metric that matters to customers is the number of security updates they need to apply. &nbsp;And the only way to reduce the number of&nbsp; updates is to systematically reduce the number and severity of vulnerabilities in the code in the first place - that's the goal of the SDL.</P>
<P>In my mind there are two kinds of vulnerability metrics, and I alluded to both in my prior blog post. The first vulnerability metric compares Microsoft to Microsoft, in other words we compare Windows XP to Windows Vista, SQL Server 2000 to SQL Server 2005 and so on. We use this metric while a product is being built; we track incoming security bugs for the prior version of the product to see how we're faring with the current version in development. Fewer vulnerabilities in the product under development is a good sign that the product will fare better in the real world. </P>
<P>The second vulnerability metric compares Microsoft with other vendors. This is an interesting metric, but our group is full of engineers, so we pay little attention to the figures because there is very little we can influence. &nbsp;The post Mr. Lindstrom refers to cited those vulnerability figures I use to point out that other development organizations need to admit they have a secure development problem.&nbsp; Looking back at the figures we cited, it's pretty clear that the sheer volume of security vulnerabilities supports our assertion, regardless of the subtleties of security metrics.&nbsp; More about this below.</P>
<P>Mr. Lindstrom states:</P>
<BLOCKQUOTE>
<P><B><I>"Microsoft has systematically hired and/or contracted with every one of their most vocal critics (and most seasoned bugfinders) to do the work behind the scenes and they don't count those vulns!" &nbsp;</I></B></P></BLOCKQUOTE>
<P>But in making this assertion, he's saying the vulnerabilities we remove (and do not add to the code in the first place) as part of the SDL process should be counted as though they were part of the product after we shipped it. We don't count vulnerabilities that don't affect customers, regardless of the vendor. </P>
<P>We hire some security researchers to be part of our teams executing the SDL because they're among the best and brightest at performing component design reviews, code reviews, black box testing and other security procedures needed to make our products more secure.&nbsp; Everyone in the industry covets their expertise because it's in short supply, and so we've competed to bring in the most capable people - as employees, contractors and advisors. These experts, helping us execute the SDL, have helped Microsoft eliminate vulnerabilities before our products ship, which naturally means lower vulnerability counts and improved security for our customers. In addition, bringing in researchers helps us to better understand what the community is thinking about today so we can anticipate and head off the problems of tomorrow. </P>
<P>To put it bluntly, we hire security researchers to help protect customers. Period. </P>
<P>While we've made an effort to hire the right researchers to help us improve the security of our products, it's far from the case that we've hired "every one of their [our] most vocal critics." &nbsp;There are still plenty of security researchers who are looking at our products and reporting the vulnerabilities they find after the products ship.</P>
<P>We have found that the training and principles of SDL have indeed significantly improved the products Microsoft engineers create. You improve security by expending effort on improving security. We have seen the evidence of this in the fewer customer updates being released against that code. When applied correctly, the SDL development principles <B><I>prevent vulnerabilities from entering the final code in the first place</I></B>. This last point is very, very important: you can't count a bug that was never created; the goal of the SDL is to not create the bugs in the first place.</P>
<P>Some of the many SDL principles that reduce or mitigate security bugs include:</P>
<UL>
<LI>Mandatory education (Net effect: fewer security bugs up front)</LI>
<LI>Design decisions based on threat models (Net effect: fewer security design bugs up front)</LI>
<LI>Cannot use known insecure APIs (Net effect: fewer security bugs up front)</LI>
<LI>Use of static analysis tools (Net effect: fewer security bugs enter the central source code repository) </LI>
<LI>Cannot use known weak crypto primitives and key lengths (Net effect: fewer security bugs up front)</LI>
<LI>Compiler and linker requirements (Net effect: extra defenses, in case you miss a bug)</LI>
<LI>Fuzz testing (Net effect: implementation bugs found before shipping)</LI></UL>
<P>So, to answer Mr. Lindstrom's question: </P>
<BLOCKQUOTE>
<P><B><I>"Could it really be that SDL has done nothing to help MS developers write better code?"</I></B></P></BLOCKQUOTE>
<P>Without a doubt, the SDL <B><I>has</I></B> helped Microsoft developers write better and more secure code. </P>
<P>However, we are still faced with the question whether vulnerability-based metrics are a valid way to measure progress of the SDL. In my opinion, vulnerability counts are a useful metric, but imperfect. We'd welcome Mr. Lindstrom's (and anyone else in the security community) sharing with us the metrics they would use to measure security-related success and how to calculate them. While the notion of what constitutes a "real, objective metric" is often based on individual preference, I think both the efficacy of SDL and the industry as a whole would benefit from this discussion.</P>
<P>Interestingly, Mr. Lindstrom has at times <A href="http://spiresecurity.typepad.com/spire_security_viewpoint/2008/02/getting-over-th.html" mce_href="http://spiresecurity.typepad.com/spire_security_viewpoint/2008/02/getting-over-th.html">pointed to vulnerability counts</A> as an interesting (but not perfect) metric. </P>
<P>One final comment: If the Microsoft product security vulnerability trend was in the other direction, up and not down, would industry observers claim SDL is failing? I think so.</P>
<P>The SDL works; it's not perfect, we've never said it is, but it's making our customers happier because they have fewer security updates to apply. Not zero, but fewer. And we are always looking for ways to improve how we measure the progress of SDL. </P>
<P>As we've been saying all along, industry dialogue is key - so let us know what you think. </P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8407828" width="1" height="1">]]></content:encoded>
      <pubDate>Fri, 18 Apr 2008 08:43:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/bugs">bugs</category>
      <category domain="http://securityratty.com/tag/implementation bugs">implementation bugs</category>
      <category domain="http://securityratty.com/tag/fewer security bugs">fewer security bugs</category>
      <category domain="http://securityratty.com/tag/fewer">fewer</category>
      <category domain="http://securityratty.com/tag/security bugs include">security bugs include</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/metrics">metrics</category>
      <category domain="http://securityratty.com/tag/security metrics">security metrics</category>
      <category domain="http://securityratty.com/tag/security bugs">security bugs</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/04/18/oh-no-security-metrics.aspx">Oh No! Security Metrics!</source>
    </item>
    <item>
      <title><![CDATA["Crawling" Toward SDL]]></title>
      <link>http://securityratty.com/article/6340a9b5d612b714ea8fad65d3999ed0</link>
      <guid>http://securityratty.com/article/6340a9b5d612b714ea8fad65d3999ed0</guid>
      <description><![CDATA[Hey everyone, Jeremy Dallman here

One of the phrases I often hear during vision and strategy planning meetings at Microsoft is &quot;What is the crawl, walk, run?&quot; We use this phrase to differentiate the...]]></description>
      <content:encoded><![CDATA[<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Hey everyone, Jeremy Dallman here. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>One of the phrases I often hear during vision and strategy planning meetings at Microsoft is "What is the crawl, walk, run?" We use this phrase to differentiate the initial activities that will get us quickly moving toward our larger goals and then supplement them with other activities that may require longer preparation or planning. As I help non-Microsoft companies implement SDL into their development lifecycles, this "crawl" phase toward full adoption of SDL is very important. Usually some person in an organization picks up on the principles of SDL and is ready to roll them out immediately. However, that person usually is faced with competing interests that complicate full adoption: the team is mid-stream in development, short on budget, or management wants to see clear evidence before investing in the changes to support full SDL adoption. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Since we usually focus on how to roll out the full Lifecycle, I want to take a shot at defining what it means to start “crawling” toward SDL. One very important note before I start. What I describe below is not Microsoft’s SDL process. It matches some of the tools and principles, but does not encompass the holistic application security solution provided by SDL. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>In my mind, to start crawling toward SDL, you need to execute on some of the core principles. They obviously need to be low-cost and effective. So, I want to summarize these into three components. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Detailed awareness of your architecture and its </FONT><A href="http://msdn2.microsoft.com/en-us/magazine/cc163882.aspx" mce_href="http://msdn2.microsoft.com/en-us/magazine/cc163882.aspx"><FONT size=3 face=Calibri>attack surface</FONT></A><FONT size=3><FONT face=Calibri>.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Tools that will perform security analysis on your application.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l0 level1 lfo2" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Results that show how the analysis resulted in improved security.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>The good news is that you can attain these components with tools that are already available. The one consistent minimum requirement is that your code compiles/builds within Visual Studio 2005 SP1. The SP1 piece of this is important because some of the important defenses I discuss below were first made available in that version. Let’s look at some of the tools you can use to get “crawling” toward SDL today:<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: #365f91; mso-themecolor: accent1; mso-themeshade: 191"><FONT face=Calibri>Detailed awareness of your architecture and its attack surface<o:p></o:p></FONT></SPAN></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><A href="http://msdn.microsoft.com/msdnmag/issues/06/11/ThreatModeling/default.aspx" mce_href="http://msdn.microsoft.com/msdnmag/issues/06/11/ThreatModeling/default.aspx"><FONT color=#0000ff size=3 face=Calibri>Threat Modeling</FONT></A><o:p></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Even if you are past the design phase, assign someone to do a retrospective model (perhaps as part of a pre-release review). This will likely give you a better understanding of your overall architecture and uncover holes in places you may have inadvertently overlooked. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>&nbsp;<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: #365f91; mso-themecolor: accent1; mso-themeshade: 191"><FONT face=Calibri>Tools that will perform security analysis on your application<o:p></o:p></FONT></SPAN></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>This is probably one of the most often discussed topics around SDL, so I’ll spend some time providing more detail. Let’s break this down into how it impacts differing parts of your team or organization: developers, testers, and operation. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal">Developers</B></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>You should start by strengthening your compiler defenses. Depending on whether you are writing native or managed code, these will differ. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>For C and C++ code:<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><U><FONT size=3><FONT face=Calibri>Strengthen your compiler defenses<o:p></o:p></FONT></FONT></U></I></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use the latest compiler and linker because important defenses are added by the tools<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>If using Visual C++, <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>use Visual Studio 2005 SP1 or later<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Compile with appropriate compiler flags<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Compile clean at the highest possible warning level<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Compile with –GS to detect stack-based buffer overruns<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l4 level1 lfo3" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Link with appropriate linker flags: /NXCompat to get NX defenses, /DynamicBase to get ASLR,<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>and /SafeSEH to get exception handler protections<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><U><FONT size=3><FONT face=Calibri>Do not use banned APIs in new code<o:p></o:p></FONT></FONT></U></I></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Use #include “banned.h” header file to find banned C/C++ functions in your code quickly. This header file is included in the companion disk in the </FONT><A href="http://www.microsoft.com/mspress/books/8753.aspx" mce_href="http://www.microsoft.com/mspress/books/8753.aspx"><FONT size=3 face=Calibri>Security Development Lifecycle book</FONT></A><FONT size=3><FONT face=Calibri>.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l1 level1 lfo4" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Compile regularly with /W4 and fix all C4996 (banned C Runtime function) warnings<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>For all Languages:<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><U><FONT size=3><FONT face=Calibri>Strengthen your compiler defenses<o:p></o:p></FONT></FONT></U></I></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use the latest compiler, linker and libraries because defenses are added by the tools and code<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"><SPAN style="mso-list: Ignore"><FONT size=3>o</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>If using C#, use&nbsp; C# v2.0 or later and if using VB.Net use 8.0 or later<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use .NET Framework 2.0 or later<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Do not use weak crypto in new code<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 1in; TEXT-INDENT: -0.25in; mso-list: l2 level2 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: 'Courier New'; mso-fareast-font-family: 'Courier New'"><SPAN style="mso-list: Ignore"><FONT size=3>o</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Use only AES, RSA and SHA-256 (or better)<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Prevent XSS vulnerabilities by using </FONT><A href="http://msdn2.microsoft.com/en-us/security/aa973814.aspx" mce_href="http://msdn2.microsoft.com/en-us/security/aa973814.aspx"><FONT color=#0000ff size=3 face=Calibri>filtering and escaping</FONT></A><FONT size=3><FONT face=Calibri> libraries around all Web output<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l2 level1 lfo5" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3 face=Calibri>Secure your SQL script by only using </FONT><A href="http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlparameter.aspx"><FONT color=#0000ff size=3 face=Calibri>prepared SQL statements</FONT></A><FONT size=3><FONT face=Calibri> - no string concatenation or string replacement<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><I style="mso-bidi-font-style: normal"><U><FONT size=3><FONT face=Calibri>Run these tools habitually<o:p></o:p></FONT></FONT></U></I></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l6 level1 lfo1" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol"><SPAN style="mso-list: Ignore"><FONT size=3>·</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><A href="http://msdn2.microsoft.com/en-us/library/ms933794.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms933794.aspx"><FONT color=#0000ff size=3 face=Calibri>PREfast</FONT></A><FONT size=3><FONT face=Calibri> (in Visual Studio 2005, use the /analyze compiler option) – a static analysis tool that identifies defects in C/C++ programs and enables you to perform quick desktop error detection on small code bases<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol"><FONT size=3>·</FONT></SPAN><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><A href="http://msdn2.microsoft.com/en-us/library/bb429476(vs.80).aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb429476(vs.80).aspx"><FONT color=#0000ff size=3 face=Calibri>FxCop</FONT></A><FONT size=3><FONT face=Calibri> – an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in" class=MsoListParagraph><SPAN style="FONT-FAMILY: Symbol"><FONT size=3>·</FONT></SPAN><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: 'Times New Roman','serif'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><A href="http://msdn2.microsoft.com/en-us/library/aa480483.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa480483.aspx"><FONT color=#0000ff size=3 face=Calibri>Application Verifier</FONT></A><FONT size=3><FONT face=Calibri> (AppVerif) – detect and help debug memory corruptions, critical security vulnerabilities, and limited user account privilege issues.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Testers</FONT></FONT></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>James Whittaker has covered </FONT><A href="http://blogs.msdn.com/sdl/archive/2007/05/24/testing-in-the-sdl.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2007/05/24/testing-in-the-sdl.aspx"><FONT size=3 face=Calibri>testing in the SDL</FONT></A><FONT size=3 face=Calibri> on this blog in the past. In a “crawl” scenario, you need to keep it simple while maximizing the value of output. I would recommend focusing on fuzz testing. This is likely something you will need to invest some time creating.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Scott Lambert’s article on </FONT><A href="http://blogs.msdn.com/sdl/archive/2007/09/20/fuzz-testing-at-microsoft-and-the-triage-process.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2007/09/20/fuzz-testing-at-microsoft-and-the-triage-process.aspx"><FONT color=#0000ff size=3 face=Calibri>Fuzz Testing at Microsoft and the Triage Process</FONT></A><FONT size=3><FONT face=Calibri> provides some good guidance on how to think through what type(s) of fuzzing to exercise against your application. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>If you choose to expand beyond fuzz testing, I would point you back to James’ article on the broader topic of </FONT><A href="http://blogs.msdn.com/sdl/archive/2007/05/24/testing-in-the-sdl.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2007/05/24/testing-in-the-sdl.aspx"><FONT size=3 face=Calibri>Testing in SDL</FONT></A><FONT size=3><FONT face=Calibri>. You may come to the conclusion that expanded security testing<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>may come later in your “walk” or “run” phases, but I would take some time to think through testing even while “crawling” to ensure you are getting broad enough coverage for your application. James’ article highlights the three-pronged approach to security testing we use at Microsoft. You should use these three approaches to ensure your own fuzz testing is comprehensive. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><SPAN style="mso-spacerun: yes">&nbsp;</SPAN><o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo6" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Attacks against the application’s environment.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo6" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Direct attacks against the application itself.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; mso-list: l3 level1 lfo6" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Indirect attacks against the application’s functionality.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><SPAN style="BACKGROUND: silver; mso-highlight: silver"><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></SPAN></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; COLOR: #365f91; mso-themecolor: accent1; mso-themeshade: 191"><FONT face=Calibri>Results that show how the analysis resulted in improved security<o:p></o:p></FONT></SPAN></B></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal">Response planning</B></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>Protecting your customers is the entire reason for focusing energy on application security.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>If there are holes in your code that you don’t uncover, someone else will. It is absolutely critical that you are prepared to respond rapidly and protect your customers. It is equally important that you construct your<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>response plan to serve as a front-line barometer for detecting the resilience of your security design<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>and what pieces of your applications security should be proactively bolstered to<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>address externally reported vulnerabilities. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>The knowledge you harvest from these security incidents (typically through root cause analysis) is the primary way to improve your code and security tooling for the future.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Do everything you can to learn lessons from the vulnerabilities others find. If you don’t have a response plan in place, you need to get one in place as soon as possible. If you don’t know where to start, take a look at how our own </FONT><A href="http://www.microsoft.com/security/msrc/incident_response.mspx" mce_href="http://www.microsoft.com/security/msrc/incident_response.mspx"><FONT size=3 face=Calibri>Microsoft Security Response Center</FONT></A><FONT size=3 face=Calibri> does it and fit to your scale or pick up the </FONT><A href="http://www.microsoft.com/mspress/books/8753.aspx" mce_href="http://www.microsoft.com/mspress/books/8753.aspx"><FONT size=3 face=Calibri>Security Development Lifecycle book</FONT></A><FONT size=3><FONT face=Calibri> and dig into the four-step process outlined.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt 0.25in" class=MsoNormal><FONT size=3><FONT face=Calibri>The four steps of the emergency response process:<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l5 level1 lfo7" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>1.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Watch<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l5 level1 lfo7" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>2.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Alert and Mobilize<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l5 level1 lfo7" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>3.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Assess and Stabilize<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt 0.75in; TEXT-INDENT: -0.25in; mso-list: l5 level1 lfo7" class=MsoListParagraph><SPAN style="mso-bidi-font-family: Calibri; mso-fareast-font-family: Calibri"><SPAN style="mso-list: Ignore"><FONT size=3 face=Calibri>4.</FONT><SPAN style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN></SPAN></SPAN><FONT size=3><FONT face=Calibri>Resolve<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri><B style="mso-bidi-font-weight: normal">Bugs, Bugs, Bugs</B></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>Gathering evidence that clearly shows your work has improved the security of your application is always a challenge. Trying to keep it lightweight adds to that challenge. The most effective way to create traceable and practical evidence without a lot of overhead is detailed management of security issues in your bug database.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The key here is that your bug database is configurable and able to be queried in a variety of ways to pull out this data. From the time you set out to implement this plan, be strict in tracking every discovery from threat modeling, the mitigations to those threats, and every bug you expose in tool analysis. This library of security bugs will give you an easy way to go back and gather evidence that shows the quantity of issues you discovered, the mitigations you used, and the impact the changes had on your application.<o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>I have provided a fairly detailed view of these components. As I indicated, many of these defenses are available for you in Visual Studio 2005 SP1 or various linked resources above. If you are unsure whether you are taking advantage of all available defenses in your development tools, take the time to check. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>It is my hope that some of you can use this scaled back entry into the principles of SDL to get moving toward improved security assurance. In the non-Microsoft SDL engagements I have been involved in, we have seen these steps&nbsp;effectively establish a baseline architectural understanding of your application security and identify critical weaknesses while providing solid evidence to support the decision to “run” forward into full SDL adoption. <o:p></o:p></FONT></FONT></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></P>
<P style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3><FONT face=Calibri>[I want to thank Michael Howard for providing some of the key data for the Developer pieces in&nbsp;this article.]<o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=8081069" width="1" height="1">]]></content:encoded>
      <pubDate>Thu, 06 Mar 2008 19:13:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/sdl">sdl</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/perform security analysis">perform security analysis</category>
      <category domain="http://securityratty.com/tag/application security">application security</category>
      <category domain="http://securityratty.com/tag/application">application</category>
      <category domain="http://securityratty.com/tag/applications security">applications security</category>
      <category domain="http://securityratty.com/tag/security issues">security issues</category>
      <category domain="http://securityratty.com/tag/issues">issues</category>
      <category domain="http://securityratty.com/tag/non-microsoft sdl engagements">non-microsoft sdl engagements</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/03/06/crawling-toward-sdl.aspx">"Crawling" Toward SDL</source>
    </item>
  </channel>
</rss>
