<?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: sha]]></title>
    <link>http://securityratty.com/tag/sha</link>
    <description></description>
    <pubDate>Wed, 19 Dec 2007 19:16:35 +0000</pubDate>
    <generator>iRatty Engine</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <item>
      <title><![CDATA[America's Next Top Hash Function Begins]]></title>
      <link>http://securityratty.com/article/782d55dd167bb0c5193cd7724d7e2313</link>
      <guid>http://securityratty.com/article/782d55dd167bb0c5193cd7724d7e2313</guid>
      <description><![CDATA[You might not have realized it, but the next great battle of cryptography began this month. It's not a political battle over export laws or key escrow or NSA eavesdropping, but an academic battle over...]]></description>
      <content:encoded><![CDATA[<p>You might not have realized it, but the next great battle of cryptography began this month. It's not a political battle over export laws or key escrow or NSA eavesdropping, but an academic battle over who gets to be the creator of the next hash standard.</p>

<p>Hash functions are the most commonly used cryptographic primitive, and the most poorly understood. You can think of them as fingerprint functions: They take an arbitrary long data stream and return a fixed length, and effectively unique, string. The security comes from the fact that while it's easy to generate the fingerprint from a file, it's infeasible to go the other way and generate a file given a fingerprint. </p>

<p>Originally created to make digital signatures more efficient, hashes are now used to secure the very fundamentals of our information infrastructure: in password logins, secure web connections, encryption key management, virus and malware scanning, and almost every cryptographic protocol in current use. Without cryptographic hash functions, the internet would simply not work. At the same time, there isn't a good theory of hash functions. Unlike encryption algorithms, there are no secret keys involved; this makes it harder to mathematically define exactly what hash functions are.
</p>

<p>
The National Institute of Standards and Technology, NIST, is <a href="http://csrc.nist.gov/groups/ST/hash/sha-3/index.html">holding a competition</a> to replace the SHA family of hash functions. "SHA" stands for "Secure Hash Algorithm." It was developed by the NSA in 1993 to replace the commercial MD4 and MD5 algorithms, and has been updated several times since then. All the SHA algorithms are very similar, and have been <a href="http://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html">increasingly under attack</a>, so NIST <a href="http://www.schneier.com/blog/archives/2005/10/nist_hash_works_1.html">wants to replace them</a>.</p>

<p>The competition is important because, unlike other technological standards, committee design &#151; balancing the interests of diverse constituents &#151; isn't conducive to good security. Security is best when it's designed by expert teams and then subjected to public review. And cryptography is best when it's chosen by competition.</p>

<p>In 1997, NIST held a <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard_process">competition</a> for a <a href="http://csrc.nist.gov/archive/aes/index.html">block cipher</a> to replace DES. Fifteen candidates and three-and-a-half years later, Rijndael became the new Advanced Encryption Standard &#151; AES. NIST is doing the same thing for what it's calling SHA-3 (not, for some unexplained reason, the Advanced Hash Standard or AHS).</p>

<p>The deadline was October 31, and NIST received 64 submissions. This isn't surprising &#151; I <a href="http://www.schneier.com/blog/archives/2008/10/the_skein_hash.html">predicted</a> 80 &#151; as most of the 15 AES submitters were professors, whose students at the time have become professors themselves, with their own students. (If NIST does a stream cipher competition in another ten years, they should expect about 256 submissions.) These submissions came from academia, from industry, and from hobbyists. <cite><a href="http://www.cio.com/article/461164/Amateurs_and_Pros_Vie_to_Build_New_Crypto_Standard">CIO magazine</a></cite> recently interviewed one of the submitters, who is 15. Twenty-eight submissions have been made <a href="http://ehash.iaik.tugraz.at/wiki/The_SHA-3_Zoo">public</a> by the submitters, and six of those have been broken.  </p>

<p>NIST is going through all the submissions right now, making sure they are complete and proper. Their goal is to publish all accepted submissions by the end of November, in advance of the <a href="http://csrc.nist.gov/groups/ST/hash/timeline.html">First Hash Function Candidate Conference</a>, to be held in Belgium right after the <a href="https://www.cosic.esat.kuleuven.be/fse2009/index.shtml">Fast Software Encryption workshop</a> in February.  </p>

<p>The group expects to quickly make a first cut of algorithms &#151; hopefully to about a dozen &#151; and give the community a year of cryptanalysis before making a second cut in 2010. After another year of cryptanalysis, NIST will choose a winner in 2011. Expect a final standard by 2012.</p>

<p>My advice for software developers is to let the process run its course. While it's tempting to use the new cool algorithms in your designs, it's far too soon to trust any of them. This process is likely to result in all sorts of new research results in hash function security, and some real cryptanalytic surprises.  Give the community a few years to figure out which ones are good and which aren't.</p>

<p>I've previously called this sort of thing a cryptographic demolition derby: The last one left standing wins. But that's only partially true. Certainly all the groups will spend the next few years trying to cryptanalyze each other, but in the end there will be a bunch of unbroken algorithms. NIST will select one based on performance and features.</p>

<p>NIST has stated that the goal of this process is not to choose the best standard but to choose a good standard. I think that's smart; in this process, the best is the enemy of the good. While there's no rush to choose a new standard &#151; the SHA-2 algorithms will remain secure for the foreseeable future &#151; we don't want to analyze the candidates forever.</p>

<p>Personally, I was part of a group of eight cryptographers that submitted <a href="http://www.schneier.com/skein.html">Skein</a> to the competition. A decade ago, writing <a href="http://www.schneier.com/twofish.html">Twofish</a> and participating in the AES process was the most fun I had ever had in cryptography. These next few years promise to be even more fun.</p>

<p>---</p>

<p><i>Bruce Schneier is chief security technology officer of BT. His new book is </i>Schneier on Security<i>.</i></p><br style="clear: both;"/>
  <img alt="" style="border: 0; height:1px; width:1px;" border="0" src="http://www.pheedo.com/img.phdo?i=3fb55453a3600c210940457d550e67ec" height="1" width="1"/>
<img src="http://www.pheedo.com/feeds/tracker.php?i=3fb55453a3600c210940457d550e67ec" style="display: none;" border="0" height="1" width="1" alt=""/><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=AfuoN"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=AfuoN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=1WcCn"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=1WcCn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=dcuSn"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=dcuSn" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/wired/politics/privacy?a=6jt5N"><img src="http://feeds.feedburner.com/~f/wired/politics/privacy?i=6jt5N" border="0"></img></a>
 <a href="http://feeds.wired.com/~f/wired/politics/security?a=yYWDN"><img src="http://feeds.wired.com/~f/wired/politics/security?i=yYWDN" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=yrdIn"><img src="http://feeds.wired.com/~f/wired/politics/security?i=yrdIn" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=CF0Rn"><img src="http://feeds.wired.com/~f/wired/politics/security?i=CF0Rn" border="0"></img></a> <a href="http://feeds.wired.com/~f/wired/politics/security?a=l83kN"><img src="http://feeds.wired.com/~f/wired/politics/security?i=l83kN" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/wired/politics/privacy/~4/459059854" height="1" width="1"/><img src="http://feeds.wired.com/~r/wired/politics/security/~4/459059855" height="1" width="1"/>]]></content:encoded>
      <pubDate>Wed, 19 Nov 2008 23:00:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/hash function">hash function</category>
      <category domain="http://securityratty.com/tag/sha">sha</category>
      <category domain="http://securityratty.com/tag/sha-3">sha-3</category>
      <category domain="http://securityratty.com/tag/algorithms">algorithms</category>
      <category domain="http://securityratty.com/tag/cool algorithms">cool algorithms</category>
      <category domain="http://securityratty.com/tag/sha family">sha family</category>
      <category domain="http://securityratty.com/tag/nist held">nist held</category>
      <category domain="http://securityratty.com/tag/unlike encryption algorithms">unlike encryption algorithms</category>
      <category domain="http://securityratty.com/tag/nist">nist</category>
      <source url="http://feeds.wired.com/~r/wired/politics/security/~3/459059855/securitymatters_1120">America's Next Top Hash Function Begins</source>
    </item>
    <item>
      <title><![CDATA[Skein and SHA-3 News]]></title>
      <link>http://securityratty.com/article/cc81d2d4853466933826ebdeeef07d52</link>
      <guid>http://securityratty.com/article/cc81d2d4853466933826ebdeeef07d52</guid>
      <description><![CDATA[There are two bugs in the Skein code. They are subtle and esoteric, but they're there. We have revised both the reference and optimized code -- and provided new test vectors -- on the Skein website ....]]></description>
      <content:encoded><![CDATA[<p>There are two bugs in the Skein code.  They are subtle and esoteric, but they're there.  We have revised both the reference and optimized code -- and provided new test vectors -- on the <a href="http://www.schneier.com/skein.html">Skein website</a>.  A <a href="http://www.schneier.com/skein.pdf">revision of the paper</a> -- Version 1.1 -- has new IVs, new test vectors, and also fixes a few typos in the paper.</p>

<blockquote>Errata: Version 1.1 of the paper, reference, and optimized code corrects an error in which the length of the configuration string was passed in as the size of the internal block (256 bits for Skein-256, 512 for Skein-512, and 1024 for Skein-1024), instead of a constant 256 bits for all three sizes.  This error has no cryptographic significance, but affected the test vectors and the initialization values.  The revised code also fixes a bug in the MAC mode key processing.  This bug does not affect the NIST submission in any way.</blockquote>

<p><a href="http://csrc.nist.gov/groups/ST/hash/sha-3/index.html">NIST has received</a> 64 submissions.  (<a href="http://www.cio.com/article/461164/Amateurs_and_Pros_Vie_to_Build_New_Crypto_Standard">This article</a> interviews one of the submitters, who is fifteen.)  Of those, <a href="http://ehash.iaik.tugraz.at/wiki/The_SHA-3_Zoo">28 are public</a> and six have been broken.  NIST is going through the submissions right now, making sure they are complete and proper.  Their goal is to publish the accepted submissions by the end of the month, in advance of the <a href="http://csrc.nist.gov/groups/ST/hash/timeline.html">Third Cryptographic Hash Workshop</a> to be held in Belgium right after <a href="https://www.cosic.esat.kuleuven.be/fse2009/index.shtml">FSE</a> in February.  They expect to quickly make a first cut of algorithms -- hopefully to about a dozen -- and then give the community about a year of cryptanalysis before making a second cut in 2010.</p>

<p>Lastly, <a href="http://www.darkreading.com/blog/archives/2008/11/bending_skein_c.html">this</a> is a really nice article on Skein.</p>

<blockquote>These submissions make some accommodation to the Core 2 processor. They operate in "<a href="http://en.wikipedia.org/wiki/Little_endian" target="new">little-endian</a>" mode (a quirk of the <a href="http://en.wikipedia.org/wiki/X86" target="new">Intel-like processors</a> that reads some bytes in reverse order). They also allow a large file to be broken into chunks to split the work across multiple processors.

<p>However, virtually all of the contest submissions share the performance problem mentioned above. The logic they use won't optimally fit within the constraints of a Intel Core 2 processor. Most will perform as bad or worse than the existing SHA-1 algorithm.</p>

<p>One exception to this is <a href="http://www.schneier.com/skein.html" target="new">Skein</a>, created by several well-known cryptographers and noted pundit <a href="http://www.schneier.com/" target="new">Bruce Schneier</a>. It was designed specifically to exploit all three of the Core 2 execution units and to run at a full 64-bits. This gives it roughly four to 10 times the logic density of competing submissions.</p>

<p>This is what I meant by the <i><a href="http://www.imdb.com/title/tt0133093/" target="new">Matrix</a></i> quote above. They didn't bend the spoon; they bent the crypto algorithm. They moved the logic operations around in a way that wouldn't weaken the crypto, but would strengthen its speed on the Intel Core 2.</p>

<p>In their <a href="http://www.schneier.com/skein.pdf" target="new">paper</a> (PDF), the authors of Skein express surprise that a custom silicon <a href="http://en.wikipedia.org/wiki/Application-specific_integrated_circuit" target="new">ASIC</a> implementation is not any faster than the software implementation. They shouldn't be surprised. Every time you can redefine a problem to run optimally in software, you will reach the same speeds you get with optimized ASIC hardware. The reason software has a reputation of being slow is because people don't redefine the original problem.</blockquote></p>

<p>That's exactly what we were trying to do.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=98JTN"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=98JTN" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=diffN"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=diffN" border="0"></img></a>
</div>]]></content:encoded>
      <pubDate>Wed, 19 Nov 2008 03:14:48 +0000</pubDate>
      <category domain="http://securityratty.com/tag/skein">skein</category>
      <category domain="http://securityratty.com/tag/skein-1024">skein-1024</category>
      <category domain="http://securityratty.com/tag/skein-512">skein-512</category>
      <category domain="http://securityratty.com/tag/skein express surprise">skein express surprise</category>
      <category domain="http://securityratty.com/tag/skein website">skein website</category>
      <category domain="http://securityratty.com/tag/skein code">skein code</category>
      <category domain="http://securityratty.com/tag/submissions share">submissions share</category>
      <category domain="http://securityratty.com/tag/submissions">submissions</category>
      <category domain="http://securityratty.com/tag/code">code</category>
      <source url="http://www.schneier.com/blog/archives/2008/11/skein_and_sha-3.html">Skein and SHA-3 News</source>
    </item>
    <item>
      <title><![CDATA[The Skein Hash Function]]></title>
      <link>http://securityratty.com/article/c65ce3834e7790e113fa9e1fd1504568</link>
      <guid>http://securityratty.com/article/c65ce3834e7790e113fa9e1fd1504568</guid>
      <description><![CDATA[NIST is holding a competition to replace the SHA family of hash functions, which have been increasingly under attack . (I wrote about an early NIST hash workshop here
Skein is our submission (myself...]]></description>
      <content:encoded><![CDATA[<p>NIST is <a href="http://csrc.nist.gov/groups/ST/hash/sha-3/index.html">holding a competition</a> to replace the SHA family of hash functions, which have been <a href="http://www.schneier.com/blog/archives/2005/02/cryptanalysis_o.html">increasingly under attack</a>.  (I wrote about an early NIST hash workshop <a href="http://www.schneier.com/blog/archives/2005/10/nist_hash_works_1.html">here</a>.)</p>

<p>Skein is our submission (myself and seven others: <a href="http://en.wikipedia.org/wiki/Niels_Ferguson">Niels Ferguson</a>, <a href="http://th.informatik.uni-mannheim.de/People/Lucks/">Stefan Lucks</a>, <a href="http://www.hifn.com/executiveTeam.aspx?id=182">Doug Whiting</a>, <a href="http://www-cse.ucsd.edu/~mihir/">Mihir Bellare</a>, <a href="http://www.cs.washington.edu/homes/yoshi/">Tadayoshi Kohno</a>, <a href="http://www.pgp.com/about_pgp_corporation/management.html">Jon Callas</a>, and Jesse Walker).  <a href="http://www.schneier.com/skein.pdf">Here's</a> the paper:</p>

<blockquote><strong>Executive Summary</strong>

<p>Skein is a new family of cryptographic hash functions.  Its design combines speed, security, simplicity, and a great deal of flexibility in a modular package that is easy to analyze.</p>

<p>Skein is fast.  Skein-512 -- our primary proposal -- hashes data at 6.1 clock cycles per byte on a 64-bit CPU.  This means that on a 3.1 GHz x64 Core 2 Duo CPU, Skein hashes data at 500 MBytes/second per core -- almost twice as fast as SHA-512 and three times faster than SHA-256.  An optional hash-tree mode speeds up parallelizable implementations even more.  Skein is fast for short messages, too; Skein-512 hashes short messages in about 1000 clock cycles.</p>

<p>Skein is secure.  Its conservative design is based on the Threefish block cipher.  Our current best attack on Threefish-512 is on 25 of 72 rounds, for a safety factor of 2.9. For comparison, at a similar stage in the standardization process, the AES encryption algorithm had an attack on 6 of 10 rounds, for a safety factor of only 1.7.  Additionally, Skein has a number of provably secure properties, greatly increasing confidence in the algorithm.</p>

<p>Skein is simple.  Using only three primitive operations, the Skein compression function can be easily understood and remembered.  The rest of the algorithm is a straightforward iteration of this function.</p>

<p>Skein is flexible.  Skein is defined for three different internal state sizes -- 256 bits, 512 bits, and 1024 bits -- and any output size.  This allows Skein to be a drop-in replacement for the entire SHA family of hash functions.  A completely optional and extendable argument system makes Skein an efficient tool to use for a very large number of functions: a PRNG, a stream cipher, a key derivation function, authentication without the overhead of HMAC, and a personalization capability.  All these features can be implemented with very low overhead.  Together with the Threefish large-block cipher at Skein core, this design provides a full set of symmetric cryptographic primitives suitable for most modern applications.</p>

<p>Skein is efficient on a variety of platforms, both hardware and software.  Skein-512 can be implemented in about 200 bytes of state.  Small devices, such as 8-bit smart cards, can implement Skein-256 using about 100 bytes of memory.  Larger devices can implement the larger versions of Skein to achieve faster speeds.</p>

<p>Skein was designed by a team of highly experienced cryptographic experts from academia and industry, with expertise in cryptography, security analysis, software, chip design, and implementation of real-world cryptographic systems.  This breadth of knowledge allowed them to create a balanced design that works well in all environments.</blockquote></p>

<p><a href="http://www.schneier.com/code/skein_NIST_CD_101308.zip">Here's</a> source code, text vectors, and the like for Skein.  Watch the <a href="http://www.schneier.com/skein.html">Skein website</a> for any updates -- new code, new results, new implementations, the proofs.</p>

<p>NIST's deadline is Friday.  It seems as if everyone -- including many amateurs -- is working on a hash function, and I predict that NIST will receive at least 80 submissions.  (Compare this to the 21 submissions NIST received -- five were rejected as not being complete --  for the AES competition in 1998.)  I expect people to start posting their submissions over the weekend.  (Ron Rivest already <a href="http://people.csail.mit.edu/rivest/Rivest-TheMD6HashFunction.ppt">presented</a> MD6 at Crypto in August.)  Probably the best place to watch for new hash functions is <a href="http://planeta.terra.com.br/informatica/paulobarreto/hflounge.html">here</a>; I'll try to keep a listing of the submissions myself.</p>

<p>The selection process will take around four years.  I've previously called this sort of thing a cryptographic demolition derby -- last one left standing wins -- but that's only half true.  Certainly all the groups will spend the next couple of years trying to cryptanalyze each other, but in the end there will be a bunch of unbroken algorithms; NIST will select one based on performance and features.</p>

<p>NIST has stated that the goal of this process is not to choose the best standard but to choose a good standard.  I think that's smart of them; in this process, "best" is the enemy of "good."  My advice is this: immediately sort them based on performance and features.  Ask the cryptographic community to focus its attention on the top dozen, rather than spread its attention across all 80 -- although I also expect that most of the amateur submissions will be rejected by NIST for not being "complete and proper."  Otherwise, people will break the easy ones and the better ones will go unanalyzed.</p><div class="feedflare">
<a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=RsFiM"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=RsFiM" border="0"></img></a> <a href="http://feeds.feedburner.com/~f/schneier/fulltext?a=VuObM"><img src="http://feeds.feedburner.com/~f/schneier/fulltext?i=VuObM" border="0"></img></a>
</div>]]></content:encoded>
      <pubDate>Wed, 29 Oct 2008 01:35:29 +0000</pubDate>
      <category domain="http://securityratty.com/tag/skein">skein</category>
      <category domain="http://securityratty.com/tag/hash function">hash function</category>
      <category domain="http://securityratty.com/tag/function">function</category>
      <category domain="http://securityratty.com/tag/implement skein-256">implement skein-256</category>
      <category domain="http://securityratty.com/tag/implement">implement</category>
      <category domain="http://securityratty.com/tag/skein hashes data">skein hashes data</category>
      <category domain="http://securityratty.com/tag/skein website">skein website</category>
      <category domain="http://securityratty.com/tag/hashes data">hashes data</category>
      <category domain="http://securityratty.com/tag/key derivation function">key derivation function</category>
      <source url="http://www.schneier.com/blog/archives/2008/10/the_skein_hash.html">The Skein Hash Function</source>
    </item>
    <item>
      <title><![CDATA[Updating Hash Security: NIST and SHA-3]]></title>
      <link>http://securityratty.com/article/94692568ed6b6d019a1ad8b493dc3407</link>
      <guid>http://securityratty.com/article/94692568ed6b6d019a1ad8b493dc3407</guid>
      <description><![CDATA[The NIST (National Institute of Standards and Technology) is holding a competition aimed at finding the best possible replacement for the cureent SHAs (Secure Hash Algorithms) SHA-1 and...]]></description>
      <content:encoded><![CDATA[The NIST (National Institute of Standards and Technology) is holding a competition aimed at finding the best possible replacement for the cureent SHAs (Secure Hash Algorithms) &mdash; SHA-1 and SHA-2....]]></content:encoded>
      <pubDate>Thu, 31 Jul 2008 08:33:22 +0000</pubDate>
      <category domain="http://securityratty.com/tag/secure hash algorithms">secure hash algorithms</category>
      <category domain="http://securityratty.com/tag/cureent shas">cureent shas</category>
      <category domain="http://securityratty.com/tag/nist">nist</category>
      <category domain="http://securityratty.com/tag/national institute">national institute</category>
      <category domain="http://securityratty.com/tag/competition aimed">competition aimed</category>
      <category domain="http://securityratty.com/tag/sha-2">sha-2</category>
      <category domain="http://securityratty.com/tag/standards">standards</category>
      <category domain="http://securityratty.com/tag/sha-1">sha-1</category>
      <category domain="http://securityratty.com/tag/technology">technology</category>
      <source url="http://feeds.feedburner.com/~r/itsecurity/~3/382697994/">Updating Hash Security: NIST and SHA-3</source>
    </item>
    <item>
      <title><![CDATA[No, I Dont Know the Answer to the Big DNS Secret]]></title>
      <link>http://securityratty.com/article/5fafafd2e37af52ca51fbeb322a4b88a</link>
      <guid>http://securityratty.com/article/5fafafd2e37af52ca51fbeb322a4b88a</guid>
      <description><![CDATA[Rich Mogulls executive overview of Dan Kaminskys latest DNS vulnerability fluffed a few feathers yesterday
The good news is that due to the nature of this problem, it is extremely difficult to...]]></description>
      <content:encoded><![CDATA[<p>Rich Mogull&#8217;s <a href="http://securosis.com/publications/DNS-Executive-Overview.pdf">executive overview</a> of Dan Kaminsky&#8217;s <a href="http://www.us-cert.gov/cas/techalerts/TA08-190B.html">latest DNS vulnerability</a> fluffed a few feathers yesterday:</p>
<blockquote><p>The good news is that due to the nature of this problem, it is extremely difficult to determine the vulnerability merely by analyzing the patches; a common technique malicious individuals use to figure out security weaknesses.</p></blockquote>
<p>The typical response I heard was &#8220;what do you mean, it can&#8217;t be reverse engineered?  I&#8217;ll just look at the diffs!&#8221; </p>
<p>In hindsight, after examining the BIND diffs (yes, I did it too) and discussing with colleagues, all most people saw was UDP source port randomization and a better PRNG for generating the transaction ID, the latter of which would appear to be related to <a href="http://www.trusteer.com/files/BIND_9_DNS_Cache_Poisoning.pdf">Amit Klein&#8217;s cache poisoning attack</a> from about a year ago.</p>
<p>What Rich was really saying is that you can reverse engineer the patch until you&#8217;re blue in the face, but that won&#8217;t reveal the specifics of the vulnerability.</p>
<p>Dan&#8217;s <a href="http://www.doxpara.com/?p=1162">blog post this morning</a> appeared to confirm that interpretation:</p>
<blockquote><p>DJB was right. All those years ago, Dan J. Bernstein was right: Source Port Randomization should be standard on every name server in production use.</p>
<p>There is a fantastic quote that guides a lot of the work I do: Luck is the residue of design. Dan Bernstein is a notably lucky programmer, and that’s no accident. The professor lives and breathes systems engineering in a way that my hackish code aspires to one day experience. DJB got “lucky” here — he ended up defending himself against an attack he almost certainly never encountered.</p>
<p>Such is the mark of excellent design. Excellent design protects you against things you don’t have any information about. And so we are deploying this excellent design to provide no information.</p>
<p>To translate the fix strategy into a more familiar domain, imagine large chunks of Windows RPC went from Anonymous to Authenticated User only, or even all the way to Admin Only. Or wait, just remember Windows XPSP2 :&#41; This is a sledgehammer, by design. It cuts off attack surface, without necessarily saying why. Astonishingly subtle bugs can be easily hidden, or even rendered irrelevant, by a suitably blunt fix.</p></blockquote>
<p>Nate McFeters appears to think that Tom Ptacek <a href="http://blogs.zdnet.com/security/?p=1468">has figured it out</a>.  I&#8217;m going to go out on a limb and say that Tom didn&#8217;t figure anything out yet but still wanted to write a pithy blog post.  I think that if Tom had figured it out, he would have written it down privately and posted the SHA-1 hash, as is the trendy thing to do these days.  </p>
<p>Speculation aside, the title of Tom&#8217;s blog entry, <a href="http://www.matasano.com/log/1089/dan-kaminsky-could-have-made-hundreds-of-thousands-of-dollars-with-this-dns-flaw/"> Dan Kaminsky could have made hundreds of thousands of dollars with this DNS flaw!</a>, does make an important point &#8212; Dan didn&#8217;t sell the details to <a href="http://www.zerodayinitiative.com/">ZDI</a>, he used his influence and reputation to coordinate a massive vendor patch effort.  That&#8217;s an admirable move.</p>
]]></content:encoded>
      <pubDate>Wed, 09 Jul 2008 11:26:37 +0000</pubDate>
      <category domain="http://securityratty.com/tag/design">design</category>
      <category domain="http://securityratty.com/tag/excellent design protects">excellent design protects</category>
      <category domain="http://securityratty.com/tag/excellent design">excellent design</category>
      <category domain="http://securityratty.com/tag/dan">dan</category>
      <category domain="http://securityratty.com/tag/dan kaminsky">dan kaminsky</category>
      <category domain="http://securityratty.com/tag/dan bernstein">dan bernstein</category>
      <category domain="http://securityratty.com/tag/tom ptacek">tom ptacek</category>
      <category domain="http://securityratty.com/tag/attack surface">attack surface</category>
      <category domain="http://securityratty.com/tag/attack">attack</category>
      <source url="http://www.veracode.com/blog/?p=118">No, I Dont Know the Answer to the Big DNS Secret</source>
    </item>
    <item>
      <title><![CDATA[A New Hash Competition]]></title>
      <link>http://securityratty.com/article/948968d9e6cd378f3d7fdc9301711a94</link>
      <guid>http://securityratty.com/article/948968d9e6cd378f3d7fdc9301711a94</guid>
      <description><![CDATA[Since the discovery of collision attacks against several well-known cryptographic hash functions in 2004, a rush of new cryptanalytic results cast doubt on the current hash function standards. The...]]></description>
      <content:encoded><![CDATA[Since the discovery of collision attacks against several well-known cryptographic hash functions in 2004, a rush of new cryptanalytic results cast doubt on the current hash function standards. The relatively new NIST SHA-2 standards aren't yet immediately threatened, but their long-term viability is now in question. The US National Institute of Standards and Technology (NIST) has therefore begun an international competition to select a new SHA-3 standard. This article outlines the competition, its rules, the requirements for the hash function candidates, and the process that NIST will use to select the final winning SHA-3 standard.<br style="clear: both;"/>
  <img alt="" style="border: 0; height:1px; width:1px;" border="0" src="http://www.pheedo.com/img.phdo?i=1dd53886ae90096c5b628cd2dd6cc3fd" height="1" width="1"/>
<img src="http://www.pheedo.com/feeds/tracker.php?i=1dd53886ae90096c5b628cd2dd6cc3fd" style="display: none;" border="0" height="1" width="1" alt=""/>]]></content:encoded>
      <pubDate>Thu, 22 May 2008 10:32:02 +0000</pubDate>
      <category domain="http://securityratty.com/tag/nist sha-2 standards">nist sha-2 standards</category>
      <category domain="http://securityratty.com/tag/competition">competition</category>
      <category domain="http://securityratty.com/tag/standards">standards</category>
      <category domain="http://securityratty.com/tag/nist">nist</category>
      <category domain="http://securityratty.com/tag/sha-3 standard">sha-3 standard</category>
      <category domain="http://securityratty.com/tag/international competition">international competition</category>
      <category domain="http://securityratty.com/tag/collision attacks">collision attacks</category>
      <category domain="http://securityratty.com/tag/long-term viability">long-term viability</category>
      <category domain="http://securityratty.com/tag/article outlines">article outlines</category>
      <source url="http://www.pheedo.com/click.phdo?i=1dd53886ae90096c5b628cd2dd6cc3fd">A New Hash Competition</source>
    </item>
    <item>
      <title><![CDATA[Got Entropy ?]]></title>
      <link>http://securityratty.com/article/e241bfde32ce971a3341a22fcb76c27d</link>
      <guid>http://securityratty.com/article/e241bfde32ce971a3341a22fcb76c27d</guid>
      <description><![CDATA[So I have been planning a series of podcasts on Cryptographic Controls. In the process of this planning, I fell into one of the classic traps that crypto-geeks fall into: obsessing about random number...]]></description>
      <content:encoded><![CDATA[<p>So I have been planning a series of podcasts on Cryptographic Controls. In the process of this planning, I fell into one of the classic traps that crypto-geeks fall into: obsessing about random number  generators (RNGs).</p>
<p><em>(FYI, for the impatient, <a href="http://gotentropy.artofinfosec.com/" >click here</a>.)<br />
</em></p>
<p>There are two ways to generate random numbers on computers: (1) use a software program called a Pseudorandom Number Generator (PRNG) or (2) use a hardware random number generator. A Pseudorandom Number Generator uses a seed value to generate a sequence of numbers that appear random. The problem is that the same seed generates the same random sequence. The hardware based RNG observes and samples some physical phenomenon which is random, such as cosmic rays, RF noise, etc. (aka Entropy).</p>
<p>RNGs are important in Information Security because they are used to generate encryption keys, salts, etc. Historically, attacking RNGs has proven effective, such as the defeat of <a href="http://community.webreview.com/windows/184409807" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://community.webreview.com/windows/184409807');">Netscape&#8217;s HTTPS sessions</a>.</p>
<p>Most operating systems utilize a hybrid approach, implementing a PseudoRandom Number Generator that has a seed that is regularly updated through the collection of random hardware events. This process is called Entropy Collection or Entropy Harvesting. <strong>For most applications, this approach should be completely sufficient.</strong> However, one of the key assumptions is that the operating system has been up and running long enough for the seed value itself to become hard to predict through the collection of Entropy. Also, many of the Entropy collecting events come from properties of hardware devices, such as the minor variations in hard drive rate of rotation. As such, there are a few circumstances where the OS RNG may not be good enough for strong cryptographic key generation:</p>
<ul>
<li>Live Boot CD ( The start state of the RNG may be predictable. )</li>
<li>Virtualized Hosts ( OS may be dependent on simulated events for randomness. )</li>
</ul>
<p>( Given the exploding popularity of virtualization, this is an area worthy of research. Stay tuned. )</p>
<p><strong>Design of the Got Entropy Service</strong></p>
<p>Many RNGs (such as the one included in Linux, as well as OpenSSL&#8217;s) allow the addition of entropy from outside sources. So I started looking to Entropy sources I could use to bolster the RNGs on my virtual hosts (and other uses&#8230;). While I was looking into this, it occurred to me that I had an unused TV tuner card, a PVR-350.</p>
<p>When a TV is tuned to a channel with no local station, the &#8217;snow&#8217; on the screen is RF noise (the same as the static between stations on AM radios). But, for reasons beyond our scope, you never use a direct physical observation as the RNG. You have to &#8216;de-skew and whiten&#8217; the data prior to sampling it. Here is the process that I use:</p>
<ol>
<li>Collect about 3 minutes of video ( about 130 MB data ).</li>
<li>Using a random key and IV, encrypt the data ( using openssl &amp; AES-128-CBC ).</li>
<li>Discard the first 32k of the file.</li>
<li>Use each of the following 32k blocks as samples.</li>
<li>Compress each sample with SHA-256.</li>
<li>Discard the last block.</li>
</ol>
<ul>
<li>Steps 2 and 3 remove any patterns, such as MPEG file formatting, from the data.</li>
<li>Steps 4 and 5 generate a 32-byte random value ( 1024 to 1 compression in the hash ).</li>
</ul>
<p><strong>Check it out at <a href="http://gotentropy.artofinfosec.com" >http://gotentropy.artofinfosec.com</a></strong></p>
<p><strong>Can an Attacker Broadcast a Signal to Undermine This?</strong></p>
<p>Such an attacker could not remove RF noise from the received signal. Our eyes and brains are good at filtering out the noise in the TV video, but there is a lot of it. Part of the noise comes from the atmospheric background RF, but there are also flaws (noise) in the tuner&#8217;s radio and analog-to-digital capture circuitry.</p>
<p>I think this is a pretty strong RNG, and I have provided an interface for pulling just the values.</p>
<p>Also, I have written a script ( <a href="http://gotentropy.artofinfosec.com/getEntropy.sh" >getEntropy.sh</a> ) that will pull Entropy from the service and seed it into /dev/random on Linux.</p>
<p><strong>Results from ENT</strong></p>
<p>Here are results, from a sample run of the Got Entropy, analyzed by  <a href="http://www.fourmilab.ch/random/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.fourmilab.ch/random/');">ENT</a> ( A Pseudorandom Number Sequence Test Program provided by John Walker of www.fourmilab.ch - Thanks, John! ).</p>
<ul>
<li>Entropy = 7.999987 bits per byte</li>
<li>Optimum compression would reduce the size of this 13366112 byte file by 0 percent.</li>
<li>Chi square distribution for 13366112 samples is 233.85, and randomly would exceed this value 82.48 percent of the time.</li>
<li>Arithmetic mean value of data bytes is 127.4767 (127.5 = random).</li>
<li>Monte Carlo value for Pi is 3.143054786 (error = 0.05 percent).</li>
<li>Serial correlation coefficient is -0.000078 (totally uncorrelated = 0.0).</li>
</ul>
<p><strong>Resources for the Curious&#8230;</strong></p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Pseudorandom_number_generator" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Pseudorandom_number_generator');">Wikipedia - Pseudo-random Number Generator</a></li>
<li><a href="http://en.wikipedia.org/wiki/Hardware_random_number_generator" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://en.wikipedia.org/wiki/Hardware_random_number_generator');">Wikipedia - Hardware Random Number Generator</a></li>
<li><a href="http://csrc.nist.gov/groups/ST/toolkit/rng/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://csrc.nist.gov/groups/ST/toolkit/rng/index.html');">NIST - Random Numbers Page</a></li>
<li><a href="http://community.webreview.com/windows/184409807" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://community.webreview.com/windows/184409807');">Netscape RNG Attack</a></li>
<li><a href="http://www.vanheusden.com/ved/" onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.vanheusden.com/ved/');">van Heusden Video Rand</a></li>
</ul>
<p>Cheers, Erik</p>
<p><a href="http://artofinfosec.com" >Art of Information Security</a> would <a href="http://artofinfosec.com/feedback/" >love your feedback</a> !</p>
<p><a href="http://artofinfosec.com/?p=53" >Got Entropy ?</a></p>
<img src="http://feeds.feedburner.com/~r/artofinfosec/~4/262366868" height="1" width="1"/>]]></content:encoded>
      <pubDate>Tue, 01 Apr 2008 22:55:47 +0000</pubDate>
      <category domain="http://securityratty.com/tag/entropy">entropy</category>
      <category domain="http://securityratty.com/tag/random">random</category>
      <category domain="http://securityratty.com/tag/32-byte random">32-byte random</category>
      <category domain="http://securityratty.com/tag/byte">byte</category>
      <category domain="http://securityratty.com/tag/hardware random">hardware random</category>
      <category domain="http://securityratty.com/tag/entropy sources">entropy sources</category>
      <category domain="http://securityratty.com/tag/sequence">sequence</category>
      <category domain="http://securityratty.com/tag/random sequence">random sequence</category>
      <category domain="http://securityratty.com/tag/pull entropy">pull entropy</category>
      <source url="http://feeds.feedburner.com/~r/artofinfosec/~3/262366868/">Got Entropy ?</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>
    <item>
      <title><![CDATA[More trustworthy election systems via SDL?]]></title>
      <link>http://securityratty.com/article/866587460674cd492103d30bf6cdbe4f</link>
      <guid>http://securityratty.com/article/866587460674cd492103d30bf6cdbe4f</guid>
      <description><![CDATA[Hi folks, Eric Bidstrup here
We interrupt our regular schedule of blog postings to offer this special post for Super Tuesday given the subject matter. Hope you enjoy
This year is a presidential...]]></description>
      <content:encoded><![CDATA[<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>Hi folks, Eric Bidstrup here.<?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>We interrupt our regular schedule of blog postings to offer this special post for “</FONT><A href="http://en.wikipedia.org/wiki/Super_Tuesday" mce_href="http://en.wikipedia.org/wiki/Super_Tuesday"><FONT face=Calibri size=3>Super Tuesday</FONT></A><FONT size=3><FONT face=Calibri>” given the subject matter. Hope you enjoy…<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>This year is a presidential election year in the United States. Selecting a new president is perhaps the ultimate example of the importance of having a trustworthy election process. There have been some well chronicled examples of elections with extremely close results, where the winner’s margin of victory was perhaps smaller than the election system’s margin of error. The term “</FONT><A href="http://en.wikipedia.org/wiki/Hanging_chad" mce_href="http://en.wikipedia.org/wiki/Hanging_chad"><FONT face=Calibri size=3>Hanging Chads</FONT></A><FONT face=Calibri size=3>,” from the </FONT><A href="http://en.wikipedia.org/wiki/United_States_presidential_election%2C_2000" mce_href="http://en.wikipedia.org/wiki/United_States_presidential_election%2C_2000"><FONT face=Calibri size=3>2000 U.S Presidential election</FONT></A><FONT face=Calibri size=3>, is now part of the American vocabulary, and locally here in Washington State our </FONT><A href="http://en.wikipedia.org/wiki/Washington_gubernatorial_election%2C_2004" mce_href="http://en.wikipedia.org/wiki/Washington_gubernatorial_election%2C_2004"><FONT face=Calibri size=3>last gubernatorial election in 2004</FONT></A><FONT size=3><FONT face=Calibri> required 3 recounts with the final winner being determined by a margin of only 129 votes, or 0.0045% of the popular vote. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>The populace demands confidence that, even in close elections, the election result accurately reflects the voters’ intent. In theory, such precision can be improved by using computers and technology. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>However, it seems that every recent election season brings stories in the media about security concerns regarding voting machine (and their software) security. A recent </FONT><A href="http://www.nytimes.com/2008/01/06/magazine/06Vote-t.html?_r=2&amp;oref=slogin&amp;oref=slogin" mce_href="http://www.nytimes.com/2008/01/06/magazine/06Vote-t.html?_r=2&amp;oref=slogin&amp;oref=slogin"><FONT face=Calibri size=3>New York Times article</FONT></A><FONT face=Calibri size=3> provides a good overview of voting machine security concerns; and academic studies on voting systems last year in </FONT><A href="http://www.sos.ca.gov/elections/elections_vsr.htm" mce_href="http://www.sos.ca.gov/elections/elections_vsr.htm"><FONT face=Calibri size=3>California</FONT></A><FONT face=Calibri size=3>, </FONT><A href="http://voter.engr.uconn.edu/voter/Reports.html" mce_href="http://voter.engr.uconn.edu/voter/Reports.html"><FONT face=Calibri size=3>Connecticut</FONT></A><FONT face=Calibri size=3>, </FONT><A href="http://www.sait.fsu.edu/news/2007-03-05-essr.shtml" mce_href="http://www.sait.fsu.edu/news/2007-03-05-essr.shtml"><FONT face=Calibri size=3>Florida</FONT></A><FONT face=Calibri size=3>, and </FONT><A href="http://www.crypto.com/blog/ohio_voting/" mce_href="http://www.crypto.com/blog/ohio_voting/"><FONT face=Calibri size=3>Ohio</FONT></A><FONT size=3><FONT face=Calibri> <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>provide some interesting insights about security concerns and vulnerabilities in voting systems from several vendors. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>These analyses are fascinating to us, because they offer an opportunity to see how a set of experts look at products other than ours.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Applied security researchers often analyze our products, and often share their processes and tools with us, but it’s rare to see a top-to-bottom product review released.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>In California, there was both white and black box testing done by different teams, and we’ve studied these reports to see the perceptions of development practices from other vendors and results of a different type of review process.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>Something my colleagues and I find very interesting is that many of the vulnerabilities noted in these reports could have been prevented by following the requirements in Microsoft’s Security Development Lifecycle. The studies performed in California (prepared at UC Berkeley but created by teams of academics from across the United States) included detailed source code analysis. I’ll select out a few examples from those studies and describe them here. (Note: I’m deliberately picking a few examples from each vendor assessed in the study. I am not attempting to criticize any specific vendor, but rather am trying to illustrate examples of areas where application of the SDL could help contribute towards society’s need for trustworthy computing in a very visible and important application.) <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Let’s start with the </FONT><A href="http://www.sos.ca.gov/elections/voting_systems/ttbr/sequoia-source-public-jul26.pdf" mce_href="http://www.sos.ca.gov/elections/voting_systems/ttbr/sequoia-source-public-jul26.pdf"><FONT face=Calibri size=3>Source Code Review of the Sequoia Voting System</FONT></A><FONT size=3><FONT face=Calibri>. Two examples from the executive summary are interesting:<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%">“<I style="mso-bidi-font-style: normal">Cryptography</I></SPAN></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%">. …Many cryptographic functions are implemented incorrectly, based on weak algorithms with known flaws, or used in an ineffective or insecure manner. Of particular concern is the fact that virtually all cryptographic key material is permanently hardcoded in the system (and is apparently identical in all Sequoia hardware shipped to different jurisdictions)…<o:p></o:p></SPAN></I></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt 0.5in"><FONT face=Calibri><B style="mso-bidi-font-weight: normal"><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%">Software Engineering</SPAN></I></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%">. …The software suffers from numerous programming errors, many of which have a high potential to introduce or exacerbate security weaknesses. These include buffer overflows, format string vulnerabilities, and type mismatch errors….</SPAN></I><SPAN style="FONT-SIZE: 10pt; LINE-HEIGHT: 115%">”<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>A deeper reading of the cryptographic concerns (page 29 in report) notes concerns (amongst others) over the use of a flawed implementation of the SHA hash algorithm and use of the Data Encryption Standard (DES) algorithm. The SDL has specific policies outlining appropriate selection of cryptographic algorithms. <SPAN style="mso-spacerun: yes">&nbsp;</SPAN>For example, DES is prohibited except for backwards compatibility. SDL also requires that applications use operating system cryptographic functions and libraries. The cryptography team in the operating systems group is supported by world-class cryptographers who carefully scrutinize the implementation of crypto algorithms, and additionally these operating system functions are formally reviewed and certified by the </FONT><A href="http://csrc.nist.gov/groups/STM/cmvp/" mce_href="http://csrc.nist.gov/groups/STM/cmvp/"><FONT face=Calibri size=3>National Institute of Standards and Technology (NIST) Cryptographic Module Validation Program (CMVP) who validates cryptographic modules meet Federal Information Processing Standards (FIPS)</FONT></A><FONT size=3><FONT face=Calibri>. Most application developers are not cryptographers and hence are unlikely to encode crypto algorithms correctly. The SDL requires the use of standard crypto functions and outlines requirements on algorithm selection, key length and key management. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Moving to the software engineering concerns; while several common coding and design concerns are noted (e.g. input validation) I want to select one with a bit more subtlety: running code from USB sticks (page 37 in report). From the report, it appears the code present on the USB sticks is used to program a component (HAAT) of their client (WinEDS) to prepare for a specific election.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>The valid concern noted by the study is that USB sticks used by WinEDS to configure the HAAT are implicitly trusted to have appropriate authorization to program the voting devices for an election, and that a formal authorization framework didn’t appear to be present. The implication being (as stated in the report): “<I style="mso-bidi-font-style: normal">If such a stick is used in a HAAT that has been compromised by an attacker, or an attacker can provide a maliciously modified USB stick in place of a legitimate one, the attacker could surreptitiously take complete control over the WinEDS client</I>”. Basically, this is a potential “</FONT><A href="http://en.wikipedia.org/wiki/Rootkit" mce_href="http://en.wikipedia.org/wiki/Rootkit"><FONT face=Calibri size=3>rootkit</FONT></A><FONT size=3><FONT face=Calibri>” for election systems. A threat model, a fundamental design requirement of the SDL, could help uncover such design issues and illustrate the need for mitigations. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Now, let’s turn to the </FONT><A href="http://www.sos.ca.gov/elections/voting_systems/ttbr/Hart-source-public.pdf" mce_href="http://www.sos.ca.gov/elections/voting_systems/ttbr/Hart-source-public.pdf"><FONT face=Calibri color=#0000ff size=3>Source Code Review of the Hart InterCivic Voting System</FONT></A><FONT size=3><FONT face=Calibri>. I’ll try to keep my commentary balanced by selecting two examples here as well:<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>From the executive summary:<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><FONT face=Calibri><B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Bold">“Unsecured network interfaces …</SPAN></I></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Roma"> Voters can connect to unsecured network links in a polling place to subvert eSlates, as well as to eavesdrop on cast votes and to inject new votes. Poll workers can connect to JBCs or eScans over the management interfaces and perform back-office functions such as modifying the device software. The impact of this is that a malicious voter could potentially take over one or more eSlates in a precinct and a malicious poll worker could potentially take over all the devices in a precinct. …<o:p></o:p></SPAN></I></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Roma"><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></SPAN></I></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><FONT face=Calibri><B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Bold">Failure to protect ballot secrecy </SPAN></I></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Roma">Hart’s system fails to adequately protect ballot secrecy...”<o:p></o:p></SPAN></I></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>The concerns about unsecured network interfaces are discussed in the context of authentication and least privilege (pages 24-25). While that is certainly a reasonable perspective, with the SDL we take a broader view and require all teams to threat model the attack surface of the software being developed. Attack surface is the enumeration of all possible entry points that an attacker could use to compromise software (code listening to network interfaces, code that accepts data from external sources, etc). The SDL requires development teams to both minimize attack surface in the software they are building and to consider attacks from each entry point on the attack surface to ensure that mitigations are present. It would appear that these examples show that the development teams didn’t adopt such a systematic approach, or failed to think about mitigations of each possible attack if they did.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Ballot secrecy is an example where security and privacy concerns intersect. Many people confuse security and privacy, and both are fundamental to trust. Privacy addresses a wide variety of concerns about many types of data (such as Personally Identifiable Data (PII), ballot data, etc.), how it’s handled (gathered, transmitted, stored, and disposed of) and what rights and expectations different stakeholders may have regarding that data. (Tina Knutson gave a great overview on these issues in a previous blog posting “</FONT><A href="http://blogs.msdn.com/sdl/archive/2007/05/10/privacy-is-not-just-about-data-security.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2007/05/10/privacy-is-not-just-about-data-security.aspx"><FONT face=Calibri size=3>Privacy is not just about data security</FONT></A><FONT size=3><FONT face=Calibri>“). Security provides the mechanisms, policies, and practices to enforce privacy requirements. Given the intertwined nature of these issues, both are addressed in the SDL. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>The concerns about vote storage (section 6.8, page 58 of report) review some classic challenges in software security and privacy with weak random number generation. Randomization is important here since it controls how votes are stored in memory, and weak randomization enables someone to reverse engineer how individual voters voted by examining the aggregate tally of votes (which can be found on the Mobile Ballot Boxes “MBB”) in conjunction with the audit log. The MBB has mitigations in place to protect integrity (tampering) of votes, but doesn’t appear to protect against information disclosure. The SDL cryptographic policies also cover correct random number generation. The challenge of <B style="mso-bidi-font-weight: normal">fully</B> considering <B style="mso-bidi-font-weight: normal">all</B> ways in which data can be reverse engineered, contextualized (order of log entries providing information that can be linked to individuals’ choices), and correlated with other data sources is a growing challenge. In the SDL privacy policies, we call attention to these issues, but it’s still a challenge.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Next, let’s look at the </FONT><A href="http://www.sos.ca.gov/elections/voting_systems/ttbr/diebold-source-public-jul29.pdf" mce_href="http://www.sos.ca.gov/elections/voting_systems/ttbr/diebold-source-public-jul29.pdf"><FONT face=Calibri color=#0000ff size=3>Source Code Review of the Diebold Voting System</FONT></A><FONT size=3><FONT face=Calibri>. Again, I’ll pick two subjects.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><FONT face=Calibri><B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Bold">“Vulnerability to malicious software: </SPAN></I></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Roma">The Diebold software contains vulnerabilities that could allow an attacker to install malicious software on voting machines or on the election management system…<o:p></o:p></SPAN></I></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: CMSY10"><o:p><FONT face=Calibri>&nbsp;</FONT></o:p></SPAN></I></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; LINE-HEIGHT: normal; mso-layout-grid-align: none"><FONT face=Calibri><B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Bold">Vulnerability to malicious insiders: </SPAN></I></B><I style="mso-bidi-font-style: normal"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-family: URWPalladioL-Roma">The Diebold system lacks adequate controls to ensure that county workers with access to the GEMS central election management system do not exceed their authority….”<o:p></o:p></SPAN></I></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><o:p><FONT face=Calibri size=3>&nbsp;</FONT></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>Let’s look at the “Malicious Software” first: While there’s a lot of discussion of general concerns with viruses and malicious payloads, I’d like to drill down on a specific case noted in section 4.2.3 (page 29). The typical concerns around string handling in C/C++ and buffer overflows are mentioned. What is interesting is that in many places this system uses the Microsoft Foundation Classes (MFC) CString class to help mitigate such concerns. The problem noted is that this practice is not consistently followed, and in fact there is a case of one specific function making calls to both CString *and* a standard C string library, <I style="mso-bidi-font-style: normal">in the same function</I>. So here it appears the engineering team had the right idea by trying to remove calls to potentially risky C string library functions (just as required in SDL), but they just weren’t able to consistently and completely apply it.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT face=Calibri size=3>Regarding the executive summary concern about malicious insiders, I’m inclined to attribute it to what’s described in section 4.3 on page 30: “<I style="mso-bidi-font-style: normal">No formal threat model or security plan</I>” and “<I style="mso-bidi-font-style: normal">No formal security training</I>”. Both of these are pivotal elements in the SDL. Several comments are offered to the effect that “<I style="mso-bidi-font-style: normal">security measures that are in place appeared to be ad hoc</I>”, and “<I style="mso-bidi-font-style: normal">When new developers arrive at the company, they do not receive any kind of security training</I>”. We’ve blogged here in the past about the importance of both areas, so I won’t repeat that again. (See Adam’s Threat Modeling series and Dave’s “</FONT><A href="http://blogs.msdn.com/sdl/archive/2007/05/02/security-education-v-security-training.aspx" mce_href="http://blogs.msdn.com/sdl/archive/2007/05/02/security-education-v-security-training.aspx"><FONT face=Calibri size=3>Security Education v. Security Training</FONT></A><FONT size=3><FONT face=Calibri>” posts respectively for more info).<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Is the SDL enough to ensure trustworthy voting systems?<o:p></o:p></FONT></FONT></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>When I offered this blog post for the review of my colleagues, it generated some very interesting discussion. Some of my colleagues were worried that I would misrepresent the SDL as a panacea for creating perfectly trustworthy voting systems. Let me be clear: this is absolutely NOT the case. While the SDL could help mitigate repeating many of the problems identified in these studies, it’s worth noting that election systems have a number of unusual and unique requirements. For example, voters cannot review their voting records as they would their banking records to ensure that no fraud has been committed – since the ability to do so would typically enable vote-selling and coercion.&nbsp; Alternate techniques are therefore required to allow voters to verify that their votes have been properly counted. Such requirements force the adoption of “extraordinary” techniques that go beyond those of secure software engineering.<SPAN style="mso-spacerun: yes">&nbsp; </SPAN>Furthermore, the expectations of society on the trustworthiness of voting systems are much greater as compared to other types of software (for example: the latest XBOX game title). I’ll further explore differences in how different people think about “degrees of trustworthiness” (aka “assurance” or “robustness”) in a future posting. <o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><B style="mso-bidi-font-weight: normal"><FONT size=3><FONT face=Calibri>Summary<o:p></o:p></FONT></FONT></B></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>Let me wrap by saying this, building secure software is difficult. Prior to the advent of Trustworthy Computing and the Security Development Lifecycle here at Microsoft, I’d bet that many of the issues noted in these reports would have applied to earlier Microsoft products too. Some might think I’m throwing stones while living in a glass house, but that is not my intent. While Microsoft products are not vulnerability free, we continue to systematically analyze the sources of vulnerabilities in our software. We continue to modify our engineering practices and tools to better identify potential vulnerabilities and mitigate them before software is released. With increasing awareness and concerns over the trustworthiness of computers in general, the entire industry needs to improve. Given the importance of how we choose to organize ourselves as a society and elect representatives to govern us, voting systems are a great place to step up both in the context of the computing industry, and to better serve society.<o:p></o:p></FONT></FONT></P>
<P class=MsoNormal style="MARGIN: 0in 0in 10pt"><FONT size=3><FONT face=Calibri>I believe many of the issues found in these voting systems would not have entered the system if the SDL was used to design and build the voting systems.<o:p></o:p></FONT></FONT></P><img src="http://blogs.msdn.com/aggbug.aspx?PostID=7450582" width="1" height="1">]]></content:encoded>
      <pubDate>Mon, 04 Feb 2008 20:34:00 +0000</pubDate>
      <category domain="http://securityratty.com/tag/machine security concerns">machine security concerns</category>
      <category domain="http://securityratty.com/tag/security concerns">security concerns</category>
      <category domain="http://securityratty.com/tag/election systems">election systems</category>
      <category domain="http://securityratty.com/tag/election">election</category>
      <category domain="http://securityratty.com/tag/security">security</category>
      <category domain="http://securityratty.com/tag/security researchers">security researchers</category>
      <category domain="http://securityratty.com/tag/election systems margin">election systems margin</category>
      <category domain="http://securityratty.com/tag/margin">margin</category>
      <category domain="http://securityratty.com/tag/election management system">election management system</category>
      <source url="http://blogs.msdn.com/sdl/archive/2008/02/04/more-trustworthy-election-systems-via-sdl.aspx">More trustworthy election systems via SDL?</source>
    </item>
    <item>
      <title><![CDATA[Squirreling Backdoors Into Distribution Points]]></title>
      <link>http://securityratty.com/article/d8ef44e03fe98fc6621007c7b84ad026</link>
      <guid>http://securityratty.com/article/d8ef44e03fe98fc6621007c7b84ad026</guid>
      <description><![CDATA[So it seems that SquirrelMail 1.4.11 and 1.4.12 were recently backdoored. Similar to some high-profile backdoors in the past, this was done by modifying the distribution tarball on rather than...]]></description>
      <content:encoded><![CDATA[<p>So it seems that <a href="http://www.squirrelmail.org/">SquirrelMail</a> 1.4.11 and 1.4.12 were recently backdoored.  Similar to some high-profile backdoors in the past, this was done by modifying the distribution tarball on rather than infiltrating the source code repository <a href="#_ftnref1">[1]</a>.  In this case, the backdoor was detected when a user noticed that the MD5 published on SquirrelMail&#8217;s website didn&#8217;t match the calculated MD5 from the SourceForge distribution.  </p>
<p>Since the SVN repository remained intact, we can&#8217;t go back and examine the backdoor in detail.  However, we do have a <a href="http://article.gmane.org/gmane.mail.squirrelmail.user/33501">newsgroup posting</a> that sheds a little light on the situation:</p>
<blockquote><p>
> What diff do you see between the compromised version and<br />
> the one that is there now? I see only a comment diff in one file.</p>
<p>it was a small block of code that checks for a $_SERVER var.  If that var was present, it would redefine SM_PATH.  Under normal circumstances, this would never be executed, but we have since learned how to make it execute.
</p></blockquote>
<p>In PHP, $_SERVER is an array populated by the web server that contains information such as headers, paths, and script locations.  This includes some user-supplied input such as the URL query string and the HTTP headers.  SM_PATH is the filesystem path where SquirrelMail is configured to be run from.  So once an attacker controls SM_PATH, it&#8217;s likely that a subsequent call to <a href="http://us2.php.net/manual/en/function.include.php">include()</a> can be exploited to fetch and execute PHP code from a remote server.  This is a typical example of a <a href="http://www.owasp.org/index.php/Top_10_2007-A3">Remote File Include</a> vulnerability.</p>
<p>Note that the attacker <a href="http://article.gmane.org/gmane.mail.squirrelmail.user/33519">backdoored the 1.5.1 distribution</a> as well, with the same type of vulnerability but at a different location in the codebase.</p>
<p>I think what&#8217;s most interesting to me about this is that so many open source projects still rely on MD5 hashes for integrity checking.  The minute the <a href="http://eprint.iacr.org/2004/199">Xiaoyun Wang paper on MD5 collisions</a> was released, every security practitioner in the world considered MD5 unsafe from that point forward.  Even though practical attacks had not yet been formulated, the writing was on the wall.  Unfortunately, the rest of the world either didn&#8217;t notice or didn&#8217;t care.</p>
<p>Cryptographers have since developed increasingly sophisticated attacks stemming from Wang&#8217;s original work.  Recently, researchers in the Netherlands demonstrated two examples of <a href="http://www.win.tue.nl/hashclash/SoftIntCodeSign/">chosen-prefix</a> <a href="http://www.win.tue.nl/hashclash/Nostradamus/">attacks</a> which would make it possible for an attacker to take two tarballs (one original, one backdoored) and append a series of bytes to each that result in both files having the same MD5 hash.  This proves beyond a shadow of a doubt that MD5 is not an effective method for verifying software integrity.  There was hardly any doubt that this attack would surface eventually, so why is MD5 still in such widespread usage?</p>
<p>Cryptographic weaknesses aside, a lot of people completely miss the mark with hashes.  MD5 or SHA-1 (or any hash function) are not very effective if the only way a user can verify them is on the same website where the download is hosted.  If the download point is compromised, chances are the attacker can modify the hashes printed on the website too.  Even when it&#8217;s done correctly, hashes only help identify when the distribution point is compromised.  It does nothing to protect against source code compromise or vulnerabilities in the development tool chain.</p>
<hr width="33%" size="1" align="left" /><a name="_ftnref1"></a>[1] <a href="http://www.veracode.com/images/stories/static-detection-of-backdoors-1.0.pdf">Static Detection of Backdoors</a>, Chris Wysopal and Chris Eng, 2007.</p>
<p><a name="_ftnref2"></a></p>
]]></content:encoded>
      <pubDate>Wed, 19 Dec 2007 19:16:35 +0000</pubDate>
      <category domain="http://securityratty.com/tag/md5 collisions">md5 collisions</category>
      <category domain="http://securityratty.com/tag/md5">md5</category>
      <category domain="http://securityratty.com/tag/md5 hashes">md5 hashes</category>
      <category domain="http://securityratty.com/tag/distribution">distribution</category>
      <category domain="http://securityratty.com/tag/php">php</category>
      <category domain="http://securityratty.com/tag/execute php code">execute php code</category>
      <category domain="http://securityratty.com/tag/execute">execute</category>
      <category domain="http://securityratty.com/tag/code">code</category>
      <category domain="http://securityratty.com/tag/md5 unsafe">md5 unsafe</category>
      <source url="http://www.veracode.com/blog/?p=73">Squirreling Backdoors Into Distribution Points</source>
    </item>
  </channel>
</rss>
