<?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-3]]></title>
    <link>http://securityratty.com/tag/sha-3</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[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[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>
