<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Extended Subset</title>
	<atom:link href="http://extendedsubset.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://extendedsubset.com</link>
	<description>"X is the new Y" is the new "Z considered harmful"</description>
	<pubDate>Tue, 17 Aug 2010 14:49:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>Trivial forwarding attack on NTLMv2 authentication</title>
		<link>http://extendedsubset.com/?p=36</link>
		<comments>http://extendedsubset.com/?p=36#comments</comments>
		<pubDate>Fri, 13 Aug 2010 05:31:53 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[bugs]]></category>

		<category><![CDATA[MitM]]></category>

		<category><![CDATA[NTLM]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=36</guid>
		<description><![CDATA[NTLM (v1 and v2) and MS-CHAP (v1 and v2) are challenge-response authentication protocols which are designed to be compatible with the hashing algorithms windows uses to handle password credentials. The challenge-response system solves the obvious problem of previous protocols which tended to simply transmit the password in the clear. However, NTLM is still susceptible to [...]]]></description>
			<content:encoded><![CDATA[<p>NTLM (v1 and v2) and MS-CHAP (v1 and v2) are challenge-response authentication protocols which are designed to be compatible with the hashing algorithms windows uses to handle password credentials. The challenge-response system solves the obvious problem of previous protocols which tended to simply transmit the password in the clear. However, NTLM is still susceptible to credentials forwarding attacks, it simply has little or no built-in defenses against them. What this means is that an active attacker (i.e., one who can modify traffic on the network between the client and server) is able to redirect a few bytes in one direction, a few bytes in the other, and &#8220;steal&#8221; the login from the legitimate client and use it to authenticate his own connection to the server. Effectively, this challenge-response scheme amounts to a one-time password transmitted in the clear.</p>
<p>I was honored to be a guest presenter at Dan Geer&#8217;s talk today at the Usenix Security Symposium 10. We talked about the need to fix network protocols and the unique challenges that presents. Although I had originally planned to talk about the SSL/TLS experience, I took this opportunity to present what I had learned about NTLM after spending some time looking into the issue over the past few weeks.</p>
<p>People in-the-know have been aware of this attack for at least 14 years. The security research community discussed it repeatedly years back, but somehow it fell through the cracks and was forgotten. But today&#8217;s hostile networking environment has given us a newfound appreciation of the need to keep up with any detail which might have implications for data security, so possibly this is the right time to raise awareness of this problem once again. Spread the word.</p>
<p>I&#8217;ll be updating this post with more technical detail, so watch for changes over the next day. Until then, I&#8217;ll post some links to material as it&#8217;s available.</p>
<p><strong>Attack demo videos by Liam Schneider</strong></p>
<p><a href="/smb_reflection_arp_poisoning.wmv">SMB reflection</a></p>
<p><a href="/smb_relay_fully_patched.wmv">SMB relaying with a fully-patched Windows</a></p>
<p><strong>Other</strong></p>
<p><a href="/usenix-security-2010-protocol-bugs.pdf">Slides</a> from Usenix Security 2010 presentation</p>
<p><strong>Press</strong></p>
<p><a href="http://www.zdnet.com/blog/security/security-flaws-haunt-ntlmv1-2-challenge-response-protocol/7136">ZDNet</a></p>
<p><a href="http://www.theregister.co.uk/2010/08/12/ntlm_authentication_still_vulnerable/">The Register</a></p>
<p><a href="http://www.h-online.com/security/news/item/Authentication-under-Windows-A-smouldering-security-problem-1059422.html">Authentication under Windows: A smouldering security problem - The H</a></p>
<p><strong>Papers, Presentations, and Published Attacks</strong></p>
<p>1996 - Dominique Brezinski - <em>A Weakness in CIFS Authentication</em><br />
1997 - Brezinski - BlackHat - <em>Security posture assessment of Windows NT networks</em><br />
1999 - Schneier, Mudge, Wagner review PPTP+MSCHAPv2<br />
2000 - DilDog - @stake - Telnet NTLM Replay Vulnerability<br />
2001 - Sir Dystic - Cult of the Dead Cow - @lantacon - SMBRelay<br />
2004 - Jesse Burns - iSEC -<em>NTLM Authentication Unsafe</em>,  HTTP to SMB attack demo<br />
2007 - Grutzmacher - Squirtle<br />
2007 - HTTP to SMB implemented in Metasploit<br />
2007 - HD Moore, valsmith - BlackHat - <em>Tactical Exploitation</em><br />
2008 - Eric Rachner exploits HTTP-HTTP<br />
2008 - Andres and Miguel Tarasco Acuña - <a href='http://www.tarasco.org/security/smbrelay/index.html'>SMBrelay3</a></p>
<p><strong>Recognized vulnerabilities arising from this fundamental weakness in NTLM</strong></p>
<p>CVE-1999-1087 MS98-016 IE interprets a 32-bit number as an Intranet zone IP address<br />
CVE-2000-0834 MS00-067 Patch for &#8220;Windows 2000 Telnet Client NTLM  Authentication&#8221; CVE-2001-0003 MS01-001 Patch for MS Office &#8220;Web Extender  Client&#8221; to use IE settings  CVE-2005-0147 Firefox responds to proxy auth requests from arbitrary servers<br />
CVE-2008-3009 MS08-076 Windows Media do not use the SPN for validating replies<br />
CVE-2008-3010 MS08-076 Windows Media associates ISATAP addresses with Intranet zone<br />
CVE-2008-4037 MS08-068 SMB credential reflection protection<br />
CVE-2009-0550 MS09-013 WinHTTP doesn&#8217;t correctly opt-in to the NTLM reflection protection<br />
CVE-2009-0550 MS09-014 WinINet doesn&#8217;t correctly opt-in to the NTLM reflection protection<br />
CVE-2009-1930 MS09-042 Telnet protocol doesn&#8217;t correctly opt-in to the NTLM reflection protection<br />
CVE-2009-3983 Firefox allows remote attackers to replay NTLM credentials of the user<br />
CVE-2010-0231 Hernan Ochoa, Augustin Azubel - BlackHat - Windows&#8217; SMB PRNG is pwned (somewhat unrelated, but too good not to mention)<br />
CVE-2010-1413 Webkit sends NTLM in unspecified circumstances.</p>
<p><strong>Notes</strong></p>
<p>Most or all of the current patched mitigations appear to be less than completely effective. For example read about the remote code execution vulnerability <a href="http://www.microsoft.com/technet/security/bulletin/ms08-068.mspx">MS08-068</a>. Except that when you see the words &#8220;reflection protection&#8221; mentally substitute &#8220;protection that can be bypassed by simply targeting a different machine&#8221;.</p>
<p>Starting with Vista, a MIC (message integrity code) has been included in the messages. However, it probably can&#8217;t be very effective unless clients and servers are willing to refuse to make connections with remote endpoints that do not supply it. It signs the content of the messages in each direction, but it doesn&#8217;t look like any new info has been &#8220;bound&#8221; into the authentication process. For example, the target server may be checked, but an attacker may still be able to forward the credentials to a different port and protocol on the same server. In some scenarios (e.g., http rewriting) the bad guy may be the one specifying the target server in the first place.</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=36</wfw:commentRss>
		</item>
		<item>
		<title>KHOBE your arguments consistently</title>
		<link>http://extendedsubset.com/?p=34</link>
		<comments>http://extendedsubset.com/?p=34#comments</comments>
		<pubDate>Thu, 13 May 2010 20:57:43 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=34</guid>
		<description><![CDATA[Nice research from matousec.com. Their article KHOBE – 8.0 earthquake for Windows desktop security software points out a common flaw in the implementation of functions that are called across a security boundary. It seems this is an easy-to-make mistake as all of the tested products made it!
This technique has been known about for a while, [...]]]></description>
			<content:encoded><![CDATA[<p>Nice research from matousec.com. Their article <a href="http://www.matousec.com/info/articles/khobe-8.0-earthquake-for-windows-desktop-security-software.php">KHOBE – 8.0 earthquake for Windows desktop security software</a> points out a common flaw in the implementation of functions that are called across a security boundary. It seems this is an easy-to-make mistake as all of the tested products made it!</p>
<p>This technique has been known about for a while, too. The author lists a few earlier (and very general) examples. It immediately reminded me of of <a href="http://www.watson.org/~robert/2007woot/">Exploiting Concurrency Vulnerabilities in System Call Wrappers</a>. Looks like the direct Windows AV equivalent of this well-known Systrace bug.</p>
<p>The good news for the vendors is that there&#8217;s a straightforward fix: hook functions simply must deep-copy their pointer arguments upon entry and use those consistently, even passing them to the hooked function if that is called. This is no more or less than what the implementation of any normal system function is expected to do.</p>
<p>The article&#8217;s example vulnerable code has some race conditions which might just allow a little escalation (line 14). I hear this is not atypical in actual AV products. Even if an add-on security product fails to offer every additional protection it promises, at the very least it should not make anything worse (which again is extraordinarily easy to do in this type of code).</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=34</wfw:commentRss>
		</item>
		<item>
		<title>Has Mozilla lost their &#8230; oh never mind</title>
		<link>http://extendedsubset.com/?p=33</link>
		<comments>http://extendedsubset.com/?p=33#comments</comments>
		<pubDate>Wed, 12 May 2010 08:00:04 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=33</guid>
		<description><![CDATA[I had heard about this being discussed but I didn&#8217;t think Mozilla would actually go through with it. But nevertheless, in my browser, there it is:

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1228079105 (0x49330001)
     [...]]]></description>
			<content:encoded><![CDATA[<p>I had heard about this being discussed but I didn&#8217;t think Mozilla would actually go through with it. But nevertheless, in my browser, there it is:</p>
<blockquote>
<pre>Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 1228079105 (0x49330001)
        Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=CN, O=CNNIC, CN=CNNIC ROOT
        Validity
            Not Before: Apr 16 07:09:14 2007 GMT
            Not After : Apr 16 07:09:14 2027 GMT
        Subject: C=CN, O=CNNIC, CN=CNNIC ROOT
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:d3:35:f7:3f:...:f3:3a:ca:cb:
                    99:cb
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            Netscape Cert Type:
                SSL CA, S/MIME CA, Object Signing CA
            X509v3 Authority Key Identifier:
                keyid:65:F2:31:AD:2A:F7:F7:DD:52:96:0A:C7:02:C1:0E:EF:A6:D5:3B:11

            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Key Usage:
                Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment, Key Agreeme
nt, Certificate Sign, CRL Sign
            X509v3 Subject Key Identifier:
                65:F2:31:AD:2A:F7:F7:DD:52:96:0A:C7:02:C1:0E:EF:A6:D5:3B:11
    Signature Algorithm: sha1WithRSAEncryption</pre>
</blockquote>
<p>Remember: The entire purpose of PKI and the Certificate Authority industry is to prevent active man-in-the-middle-style attacks. Passive eavesdroppers can be defeated with much simpler anonymous cryptography.</p>
<p>Look, nothing against the Chinese people or necessarily even the country of China. We all know they are some real groovy cats over there, if you catch my drift. But this specific organization is well-known for conducting network interception, monitoring, and filtering on a massive scale. There&#8217;s probably no organization in the world doing more of it.</p>
<p>If Mozilla&#8217;s idea of a security policy is to allow the CNNIC (or any of its delegated sub-CAs) to read and/or modify the data I exchange with websites, in my opinion it raises some serious questions about their judgment.</p>
<p>I guess it could be worse. Firefox could be like MS Windows and trust them for code signing too.*</p>
<p>Sigh.</p>
<p>* OK, OK &#8230; actually, that&#8217;s not completely correct. Vista, for example, doesn&#8217;t trust them out-of-the-box. There&#8217;s just this handy little feature where the first time any user (admin or no) running IE makes an https request to a server which presents a cert rooting to CNNIC, the OS silently adds them to the trusted root CAs for the entire local machine. You can delete it then if you want, but don&#8217;t worry, it will be there to help you out like that again if ever the need may arise.</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=33</wfw:commentRss>
		</item>
		<item>
		<title>McAfee Power</title>
		<link>http://extendedsubset.com/?p=31</link>
		<comments>http://extendedsubset.com/?p=31#comments</comments>
		<pubDate>Mon, 26 Apr 2010 17:42:46 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=31</guid>
		<description><![CDATA[The fact that McAfee can shut down mass numbers of systems running Windows XP and the power stays on is a very positive sign.
Nevertheless, here&#8217;s a list of reported power incidents about that time. This was from a quick search, some may be out of place due to time zone issues, etc.
http://www.inforum.com/event/article/id/276674/
http://www.indianexpress.com/news/blackout-at-power-utility-office-disrupts-bill-payment/610712/
http://www.eyretribune.com.au/news/local/news/general/lightning-strike-sparks-blackout/1810629.aspx
http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&#38;objectid=10640337
http://www.digitimes.com/news/a20100422PD203.html
http://www.blayneychronicle.com.au/news/local/news/general/blackout-affects-3000-shire-residents/1810338.aspx
]]></description>
			<content:encoded><![CDATA[<p>The fact that McAfee can <a href="http://isc.sans.org/diary.html?storyid=8656">shut down mass numbers</a> of systems running Windows XP and the power stays on is a very positive sign.</p>
<p>Nevertheless, here&#8217;s a list of reported power incidents about that time. This was from a quick search, some may be out of place due to time zone issues, etc.</p>
<p><a href="http://www.inforum.com/event/article/id/276674/">http://www.inforum.com/event/article/id/276674/</a><br />
<a href="http://www.indianexpress.com/news/blackout-at-power-utility-office-disrupts-bill-payment/610712/">http://www.indianexpress.com/news/blackout-at-power-utility-office-disrupts-bill-payment/610712/</a><br />
<a href="http://www.eyretribune.com.au/news/local/news/general/lightning-strike-sparks-blackout/1810629.aspx">http://www.eyretribune.com.au/news/local/news/general/lightning-strike-sparks-blackout/1810629.aspx</a><br />
<a href="http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10640337">http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10640337</a><br />
<a href="http://www.digitimes.com/news/a20100422PD203.html">http://www.digitimes.com/news/a20100422PD203.html</a><br />
<a href="http://www.blayneychronicle.com.au/news/local/news/general/blackout-affects-3000-shire-residents/1810338.aspx">http://www.blayneychronicle.com.au/news/local/news/general/blackout-affects-3000-shire-residents/1810338.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=31</wfw:commentRss>
		</item>
		<item>
		<title>Intel C++ and Debugger (with DRM and classic security bugs)</title>
		<link>http://extendedsubset.com/?p=30</link>
		<comments>http://extendedsubset.com/?p=30#comments</comments>
		<pubDate>Wed, 21 Apr 2010 09:07:49 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[bugs]]></category>

		<category><![CDATA[c++]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=30</guid>
		<description><![CDATA[Saturday afternoon
Intel has a nice C++ toolchain. They use the great EDG C++ front end which is known for its standards-compliance. There&#8217;s even a free-as-in-beer offer of many of the tools on Linux for &#8220;non-commercial software development&#8220;.
I have played with this package from time to time. Last weekend I downloaded and upgraded to the latest [...]]]></description>
			<content:encoded><![CDATA[<h3>Saturday afternoon</h3>
<p>Intel has a nice C++ toolchain. They use the great EDG C++ front end which is known for its standards-compliance. There&#8217;s even a free-as-in-beer offer of many of the tools on Linux for &#8220;<a href="http://software.intel.com/en-us/articles/non-commercial-software-development/">non-commercial software development</a>&#8220;.</p>
<p>I have played with this package from time to time. Last weekend I downloaded and upgraded to the latest suite which include the compiler, debugger, and various libraries.</p>
<p>The compiler seemed to work just fine. But when I run the debugger&#8230;</p>
<blockquote><p><code>Intel(R) Debugger for applications running on Intel(R) 64, Version 11.1, Build [1.2097.2.333]<br />
30 DAY EVALUATION LICENSE<br />
NOTE: The evaluation period for this product ends in 23 days.</code></p></blockquote>
<p>Well, that&#8217;s not very nice. I thought I had a proper non-commercial license! Hmm&#8230;I must have chosen the wrong option when I installed it last week.</p>
<p>I&#8217;ll try dropping in the license file manually. Doesn&#8217;t work.</p>
<p>I&#8217;ll do an uninstall and reinstall. No luck.</p>
<p>So I uninstall, this time completely removing the /opt/intel and the /tmp/FLEXnet directories. Reinstall making sure to give it the correct license file this time.</p>
<p>Again! The compiler is happy, but the debugger still insists it&#8217;s a time-limited evaluation copy. Hmmm, something not very funny is going on here.</p>
<p>Did a little web searching. It seems that <a href="http://en.wikipedia.org/wiki/FlexNet_Publisher">FLEXnet</a> is some sort of software licensing product that&#8217;s been owned by several different corporate entities using several different names over the years. Including <a href="http://en.wikipedia.org/wiki/Rovi_Corporation">Macrovision</a>! At this point I approach panic&#8230;they&#8217;d better not have <a href="http://www.geek.com/articles/news/turbotax-installer-destroys-non-windows-partitions-20030214/">screwed</a> <a href="http://en.wikipedia.org/wiki/SafeCast">with my</a> <a href="http://www.truecrypt.org/docs/?s=incompatibilities">boot sector</a>&#8230;this was my cleanest dev box!</p>
<p>There were a few questions on Intel&#8217;s forums about problems in this area, and it seemed they were getting help. But this is on a weekend (non-commercial after all), so I figured I&#8217;d try to figure it out on my own. I found <a href="http://software.intel.com/en-us/forums/showthread.php?t=63083">one post</a> which suggested setting the environment variable <code>INTEL_LMD_DEBUG=1</code>. This was a useful tip as it provided a fascinating view into the mind of a pile of code as it is deciding whether or not to be a functioning piece of software. Some excerpts:</p>
<blockquote><p><code>INTEL_LMD: checkout: contents of particular license actually checked out:<br />
INTEL_LMD: checkout:     feature name:                  DbgL (INCREMENT line)<br />
INTEL_LMD: checkout:     license expires:               11-may-2010<br />
INTEL_LMD: checkout:     license maintenance expires:   2020.1231<br />
INTEL_LMD: checkout:     type of license:               uncounted (unlimited number of users)<br />
INTEL_LMD: checkout:     allowed platforms:<br />
INTEL_LMD: checkout:             amd64_re       (Intel(R) 64 architecture; Linux*)<br />
INTEL_LMD: checkout:             i86_r          (IA-32 architecture; Linux*)<br />
INTEL_LMD: checkout:             i86_re         (IA-32 architecture; Linux*)<br />
INTEL_LMD: checkout:             it64_lr        (IA-64 architecture; Linux*)<br />
INTEL_LMD: checkout:             it64_re        (IA-64 architecture; Linux*)<br />
INTEL_LMD: checkout:         *Other brands and names are the property of their respective owners.</code></p></blockquote>
<p>I could have used the debugger on itself, that might have been interesting in a recursive sort of way. But <a href="http://linux.die.net/man/1/strace">strace(1)</a> got straight to the point.</p>
<p>Here are some of the highlights, there was lots of repetition I didn&#8217;t duplicate here. Also, this happens in a child process so use the strace -o and -ff options.</p>
<blockquote><p><code>stat("/home/marsh/.flexlmrc", 0x7fff334bf8d0) = -1 ENOENT (No such file or directory)<br />
stat("/home/marsh/.flexlmborrow", 0x7fff334bf920) = -1 ENOENT (No such file or directory)</code></p></blockquote>
<p>Never seen those files before.</p>
<blockquote><p><code>mkdir("/tmp/FLEXnet", 0777)             = -1 EEXIST (File exists)<br />
chmod("/tmp/FLEXnet", 0777)             = -1 EPERM (Operation not permitted)<br />
open("/tmp/FLEXnet/2167552-85A0F138-527D-4012-8175-79A3AEA4152E", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)</code></p></blockquote>
<p>Man, they sure like the file permissions wide-open. I hope this thing doesn&#8217;t have any buffer overflows.</p>
<blockquote><p><code>open("/tmp/FLEXnet/2167552-16F7558F-328B-4dc3-BEDF-095C1F14FFF1", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)<br />
close(4294967295)                       = -1 EBADF (Bad file descriptor)</code></p></blockquote>
<p>Nice of them to make sure not to leave any bad file descriptors open.</p>
<blockquote><p><code>stat("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0<br />
stat("/usr/local", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0<br />
stat("/usr/local/share", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0<br />
stat("/usr/local/share/macrovision", {st_mode=S_IFDIR|S_ISGID|0755, st_size=4096, ...}) = 0<br />
stat("/usr/local/share/macrovision/storage", {st_mode=S_IFDIR|S_ISGID|0777, st_size=4096, ...}) = 0<br />
stat("/usr/local/share/macrovision/storage/FLEXnet", {st_mode=S_IFDIR|0777, st_size=4096, ...}) = 0<br />
open("/usr/local/share/macrovision/storage/FLEXnet/INTEL_00211300_tsf.data", O_RDWR|O_CREAT, 0666) = 4<br />
chmod("/usr/local/share/macrovision/storage/FLEXnet/INTEL_00211300_tsf.data",  0666) = 0</code></p></blockquote>
<p>Hey, how did those &#8220;macrovision&#8221; directories get there? I don&#8217;t recall giving permission for the uninstaller to leave old files lying around! I thought I had put everything under /opt.</p>
<p>Well I&#8217;ll just delete that old directory and reinstall, once again. (That fixed it by the way, but I was more interested in the strace at this point).</p>
<p><em>An aside</em>: I always figured Intel made a compiler in order to ensure  there would be one that could take best advantage of new features in  their chips. Whatever profit they made from toolchain sales couldn&#8217;t  possibly be significant compared to even the tiniest incremental boost  to their processor business. Seems to me that the primary effect of leaving  these hidden DRM files behind is to convert software developers from people with a passing familiarity with the toolchain into those who no longer are using it, and their dev  boxes into machines that forever refuse to run it!</p>
<blockquote><p><code>stat("/Users/Shared/Library/Application Support/Intel/Licenses", 0x7fff334bf960) = -1 ENOENT (No such file or directory)</code></p></blockquote>
<p>Maybe it&#8217;s a Mac thing?</p>
<blockquote><p><code>open("/proc/pci", O_RDONLY)             = -1 ENOENT (No such file or directory)<br />
open("/proc/pci", O_RDONLY)             = -1 ENOENT (No such file or directory)<br />
open("/etc/hostid", O_RDONLY)           = -1 ENOENT (No such file or directory)<br />
uname({sys="Linux", node="m...", ...}) = 0</code></p></blockquote>
<p>Hmm, I wonder why it&#8217;s interested in those system files.</p>
<blockquote>
<pre>open("/etc/resolv.conf", O_RDONLY)      = 5
connect(5, {sa_family=AF_FILE, path="/var/run/nscd/socket"...}, 110) = -1 ENOENT (No such file or directory)
open("/etc/nsswitch.conf", O_RDONLY)    = 5
fstat(5, {st_mode=S_IFREG|0644, st_size=475, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5905c59000
read(5, "# /etc/nsswitch.conf\n#\n# Example "..., 4096) = 475
open("/etc/host.conf", O_RDONLY)        = 5
open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 5
open("/opt/intel/Compiler/11.1/069/lib/intel64/libnss_files.so.2", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libnss_files.so.2", O_RDONLY) = 5</pre>
</blockquote>
<p>OK, this guy is starting to creep me out a little bit. It&#8217;s almost like he&#8217;s getting ready to make a network connection or something. This is not something I want, in the same way that I would not want to see a dinner guest at my house start writing down the serial numbers off my home appliances.</p>
<blockquote><p><code>statfs("/", {f_type="EXT2_SUPER_MAGIC", f_bsize=4096, f_blocks=1032112, f_bfree=431368, f_bavail=378940, f_files=262144, f_ffree=206780, f_fsid={596574817, -405841800}, f_namelen=255, f_frsize=4096}) = 0<br />
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0<br />
open("/proc/mounts", O_RDONLY)          = 5<br />
read(5, "rootfs / rootfs rw 0 0\nnone /sys "..., 1024) = 1024</code></p></blockquote>
<p>Oh good, no network connection. He sure is interested in my filesystems though. Maybe being a little nosy even?</p>
<blockquote><p><code>readlink("/dev/fb", 0x7fff601d15f0, 1024) = -1 ENOENT (No such file or directory)</code></p></blockquote>
<p>Now why would a command-line program care if I have a framebuffer device?</p>
<blockquote><p><code>open("/proc/cpuinfo", O_RDONLY)         = 5<br />
open("/proc/meminfo", O_RDONLY)         = 5<br />
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5<br />
ioctl(5, SIOCGIFHWADDR, {ifr_name="xp0", ???}) = -1 ENODEV (No such device)</code></p></blockquote>
<p>What is this interface &#8220;xp0&#8243; I wonder, and why is its hardware address interesting?</p>
<blockquote><p><code>ioctl(5, SIOCGIFHWADDR, {ifr_name="eth0", ifr_hwaddr=00:...})  = 0</code></p></blockquote>
<p>Well, I guess we knew that was coming.</p>
<blockquote><p><code>uname({sys="Linux", node="m...", ...}) = 0</code></p></blockquote>
<p>That too.</p>
<blockquote><p><code>ioctl(5, SIOCGIFADDR, {ifr_name="xp0", ???}) = -1 ENODEV (No such device)<br />
ioctl(5, SIOCGIFADDR, {ifr_name="eth0", ifr_addr={AF_INET, inet_addr("192.168...")}}) = 0</code></p></blockquote>
<p>Now it wants assigned addresses. There&#8217;s that &#8220;xp0&#8243; again.</p>
<p>Oh! We&#8217;d better read a bunch of int32&#8217;s from our secret file:</p>
<blockquote><p><code>fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
lseek(4, 1877, SEEK_SET)                = 1877<br />
read(4, "\0\0\0\33"..., 4)              = 4<br />
fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
lseek(4, 1881, SEEK_SET)                = 1881<br />
read(4, "\1!\0\0"..., 4)                = 4<br />
fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
fstat(4, {st_mode=S_IFREG|0666, st_size=12754, ...}) = 0<br />
lseek(4, 1885, SEEK_SET)                = 1885</code></p></blockquote>
<p>[a lot more of these]</p>
<p>This obsession with the file size before every seek and read is symptomatic of a program suppressing its inner race condition. Hmm, a suitable case for treatment. Nurse! Seize him!!</p>
<blockquote><p><code>mkdir("/tmp/FLEXnet", 0777)             = -1 EEXIST (File exists)<br />
chmod("/tmp/FLEXnet", 0777)             = -1 EPERM (Operation not permitted)<br />
open("/tmp/FLEXnet/608B1FE4-2ACE-4914-9910-3B4BC90DA531", O_WRONLY|O_CREAT|O_EXCL, 0666) = -1 EEXIST (File exists)<br />
close(4294967295)                       = -1 EBADF (Bad file descriptor)<br />
stat("/tmp/FLEXnet/608B1FE4-2ACE-4914-9910-3B4BC90DA531", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0</code></p></blockquote>
<p>Ready, fire, aim!</p>
<blockquote><p><code>open("/usr/local/share/macrovision/storage/.tfCaFrmpbmEbzmoEBzFqjzbuFc", O_RDWR) = 5<br />
chmod("/usr/local/share/macrovision/storage/.tfCaFrmpbmEbzmoEBzFqjzbuFc", 0666) = -1 EPERM (Operation not permitted)<br />
read(5, "...", 80) = 55<br />
read(5, ""..., 25)                      = 0<br />
close(5)                                = 0</code></p></blockquote>
<p>The lesson here is always be sure your hidden files in a world-writable directory are world-writable before you read from them?</p>
<blockquote><p><code>stat("/usr/local/share/macrovision/storage/.mEEmchcxpinkgaogqeEzDEuzyb", 0x7fff601d2020) = -1 ENOENT (No such file or directory)<br />
link("/usr/local/share/macrovision/storage/.DyvjkuyxBpbcAtpyheotsmkone", "/tmp/FLEXnet/mEEmchcxpinkgaogqeEzDEuzyb") = -1 EXDEV (Invalid cross-device link)</code></p></blockquote>
<p>Sorry, that link is just not going to persist across the next reboot.</p>
<blockquote><p><code>open("/opt/intel/Compiler/11.1/069/bin/intel64/*.lic", O_RDONLY) = -1 ENOENT (No such file or directory)</code></p></blockquote>
<p>You know, I don&#8217;t think that syscall does wildcard expansion.</p>
<blockquote><p><code>stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3543, ...}) = 0<br />
write(2, "    INTEL_LMD: flex_expire_days: "..., 44) = 44</code></p></blockquote>
<p>Clearly we wouldn&#8217;t want to expire somebody&#8217;s license in the wrong timezone.</p>
<blockquote><p><code>write(2, "3"..., 1)                     = 1<br />
write(2, "0"..., 1)                     = 1<br />
write(2, " "..., 1)                     = 1<br />
write(2, "D"..., 1)                     = 1<br />
write(2, "A"..., 1)                     = 1<br />
write(2, "Y"..., 1)                     = 1<br />
write(2, " "..., 1)                     = 1<br />
write(2, "E"..., 1)                     = 1<br />
write(2, "V"..., 1)                     = 1<br />
....</code></p></blockquote>
<p>Why did they print it like that? To hide the string or something?</p>
<p>Finally:</p>
<blockquote><p><code>INTEL_LMD: flex_config: at least one license has been granted<br />
INTEL_LMD: flex_config: the most recently checked out feature was checked out successfully<br />
INTEL_LMD: flex_expire_days: returns 3650000<br />
INTEL_LMD: checkout: returns GRANTED</code></p></blockquote>
<p>Awesome! I&#8217;m considered legit for the next 10,000 years! (except leap days)</p>
<h2>Deeper issues</h2>
<p>Darn, all that looking at strace logs got me out of the mood for writing whatever code that was I was planning to write. I&#8217;m also starting to wonder about the wisdom of putting DRM on a low-level debugger and licensing it free only to people who use them on the weekend for fun.</p>
<p>Wait a second&#8230;what were those lines from before?</p>
<blockquote><p><code>mkdir("/tmp/FLEXnet", 0777)             = -1 EEXIST (File exists)<br />
chmod("/tmp/FLEXnet", 0777)             = -1 EPERM (Operation not permitted)</code></p></blockquote>
<p>Are they seriously not checking the return code on mkdir and just chmod&#8217;ing whatever existed before?</p>
<p>This needs testing.</p>
<blockquote><p><code>/tmp$ ln -sf /tmp/couldve_bin_bash /tmp/FLEXnet</code></p>
<p>/tmp$ ls -al /tmp<br />
total 616<br />
drwxrwxrwt  9 root  root    4096 2010-04-20 23:22 .<br />
drwxr-xr-x 23 root  root    4096 2009-08-05 07:00 ..<br />
-rw-r&#8211;r&#8211;  1 root  root       0 2010-04-20 23:21 couldve_bin_bash<br />
lrwxrwxrwx  1 marsh marsh     21 2010-04-20 23:22 FLEXnet -&gt; /tmp/couldve_bin_bash<br />
drwx&#8212;&#8212;  2 root  root   16384 2009-04-03 21:39 lost+found</p>
<p>/tmp$ cat | mail root<br />
Dear root,<br />
I think there&#8217;s a bug in the Intel debugger. Could you please check<br />
to see what version we have installed. It should print it on startup.<br />
K thx bye<br />
^D</p>
<p># . /opt/intel/Compiler/11.1/069/bin/iccvars.sh<br />
# idbc<br />
Intel(R) Debugger for applications running on Intel(R) 64, Version 11.1, Build [1.2097.2.333]<br />
(idb) q<br />
#</p>
<p>/tmp$ ls -al /tmp<br />
total 616<br />
drwxrwxrwt  9 root  root    4096 2010-04-20 23:22 .<br />
drwxr-xr-x 23 root  root    4096 2009-08-05 07:00 ..<br />
-rwxrwxrwx  1 root  root       0 2010-04-20 23:21 couldve_bin_bash<br />
lrwxrwxrwx  1 marsh marsh     21 2010-04-20 23:22 FLEXnet -&gt; /tmp/couldve_bin_bash<br />
drwx&#8212;&#8212;  2 root  root   16384 2009-04-03 21:39 lost+found</p></blockquote>
<p>OK, I didn&#8217;t actually send myself that email. But dude, 1996 called and said it wants its bug back!</p>
<p>A quick test showed this file handing operation to be exploitable, too:</p>
<blockquote><p><code>open("/usr/local/share/macrovision/storage/FLEXnet/INTEL_00211300_tsf.data", O_RDWR|O_CREAT, 0666) = 4<br />
chmod("/usr/local/share/macrovision/storage/FLEXnet/INTEL_00211300_tsf.data",  0666) = 0</code></p></blockquote>
<h3>Scope</h3>
<p>So it&#8217;s not hard to imagine that this local escalation vulnerability would affect other Linux/Unix/BSD software using FLEXlm. For example,  Looks like <a href="http://www.klocwork.com/">a tool</a> that is said to &#8220;find critical security vulnerabilities&#8221; for &#8220;over 650 organizations&#8221; might be <a href="http://developer.klocwork.com/forum/viewtopic.php?p=231&amp;sid=6918702a14a08755cd9e456ddebdbdcb">using this</a> &#8220;/usr/local/share/macrovision&#8221; directory for similar purposes. I&#8217;m told that many CAD and EDA systems use this DRM as well.</p>
<p>Examples of previous vulns in this DRM and products that use it:<br />
<a href="http://www.google.com/search?q=&quot;FLEXlm+vulnerabilities&quot;">http://www.google.com/search?q=&#8221;FLEXlm+vulnerabilities&#8221;</a><br />
<a href="http://www.google.com/search?q=FLEX+&quot;license+file&quot;">http://www.google.com/search?q=FLEX+&#8221;license+file&#8221;</a></p>
<h3>ICC Compiler</h3>
<p>Well that&#8217;s enough for the debugger. I wonder how secure the compiler is? IIRC, Gentoo Linux supports using icc as the system compiler, and runs it as root.</p>
<blockquote><p><code>open("/tmp/iccT0R3pl", O_RDWR|O_CREAT|O_EXCL, 0600) = 3<br />
close(3)                                = 0<br />
chmod("/tmp/iccT0R3pl", 01232)          = 0</code></p></blockquote>
<p>&#8220;01232&#8243; What&#8217;s up with those permissions??</p>
<p>Wait a minute 01232 in octal is &#8230; 666 in decimal. Satan fail.</p>
<p>The command did succeed, but what does it mean?</p>
<blockquote><p><code>$ touch test<br />
$ chmod 01232 test<br />
$ ls -al test<br />
--w--wx-wT 1 marsh marsh 0 2010-04-20 21:02 test</code></p></blockquote>
<p>Well clearly that&#8217;s not going to be good for much. I guess that&#8217;s why the program&#8217;s next action is to throw it out and try a different filename:</p>
<blockquote><p><code>unlink("/tmp/iccT0R3pl")                = 0<br />
open("/tmp/iccT0R3plarg", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3<br />
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0<br />
write(3, "-_g\n-mP3OPT_inline_alloca\n-D__HON"..., 1979) = 1979<br />
close(3)                                = 0</code></p></blockquote>
<p>Uh oh. This time the compiler actually succeeded in creating a tmp file with everybody=everything mode bits.  Even worse, he&#8217;s writing compiler arguments into it. It&#8217;s a response file.</p>
<p>How far could an attacker go with with control of a response file? Can it be used to invoke an arbitrary command? He could try the &#8220;-dynamic-linker&#8221; option. According to the docs it &#8220;Specifies a dynamic linker other than the default.&#8221; That would probably do it.</p>
<p>But perhaps more disturbing is the prospect of a bad guy subtly modifying the compiler settings to inject evilness into the build products (changes here might not end up on the build log).  With all the concern about APT these days (and I think it is quite legitimate), this is exactly what you don&#8217;t want to be possible on your engineer&#8217;s workstations.</p>
<p>So we have exploitable unsafe tmp file creation on the Intel icc complier as well.</p>
<h3>Searching</h3>
<p>Intel does not seem to document the creation of these directories and hidden files by their products:</p>
<blockquote><p>&#8220;<a href="http://www.google.com/search?q=macrovision+site%3Ahttp%3A%2F%2Fsoftware.intel.com%2Fen-us%2Farticles%2Fintel-software-technical-documentation%2F">Your search</a> - macrovision site:http://software.intel.com/en-us/articles/intel-software-technical-documentation/  - did not match any documents.&#8221;</p></blockquote>
<p>Looks like over a year ago a Linux distro&#8217;s automated security report noticed some badness, and it was reported:</p>
<p><a href="http://software.intel.com/en-us/articles/world-writable-files-in-the-icc-rpms/">http://software.intel.com/en-us/articles/world-writable-files-in-the-icc-rpms/</a><br />
But apparently it was ignored.</p>
<p>Even before that a user had pointed out the unsafe chmod:<br />
<a href="http://software.intel.com/en-us/forums/showthread.php?t=61712">http://software.intel.com/en-us/forums/showthread.php?t=61712</a></p>
<h3>Non-Linux</h3>
<p>I don&#8217;t know if this has been tested before, but my personal theory is that this class of unsafe tmp file handing bugs usually associated with unix can sometimes be exploitable on the Windows side as well. Although Windows has supported symlinks for some time, it restricts their creation to Administrators. However, NTFS junction points in publicly-writable directories can be created by an unprivileged user:</p>
<blockquote><p>c:\&gt;mklink /j test C:\users\marsh<br />
Junction created for test &lt;&lt;===&gt;&gt; C:\users\marsh</p>
<p>c:\&gt;dir<br />
Volume in drive C is drive-c<br />
Volume Serial Number is E458-1C9F</p>
<p>Directory of c:\</p>
<p>01/20/2008  10:03 PM    &lt;DIR&gt;          PerfLogs<br />
04/10/2010  12:18 PM    &lt;DIR&gt;          Program Files<br />
04/14/2010  08:40 PM    &lt;DIR&gt;          Program Files (x86)<br />
04/21/2010  01:13 AM    &lt;JUNCTION&gt;     test [C:\users\marsh]<br />
03/05/2010  09:00 AM    &lt;DIR&gt;          Users<br />
03/05/2010  04:43 PM    &lt;DIR&gt;          Virtual Machines<br />
04/09/2010  09:07 PM    &lt;DIR&gt;          Windows<br />
0 File(s)          0 bytes<br />
7 Dir(s)  23,012,346,880 bytes free</p></blockquote>
<p>Again, this part is educated speculation and not a proven exploit. (I am not planning on experimenting on my Windows box, it takes too long to reinstall!) But I would recommend that the same thorough investigation and remediation be done for potentially-affected Windows products where there is shared code or similar behavior.</p>
<p>Also, I don&#8217;t know much about Macs, but last I saw they looked a lot like BSD.</p>
<h3>Conclusions</h3>
<p>With Intel talking big about &#8220;<a href="http://software.intel.com/sites/oss/">What&#8217;s Hot and New in Open Source at Intel</a>&#8220;, I would have expected them to have behaved differently. They should behave like a guest on my machine and I really expect to be treated better than some poor <a href="http://www.extremetech.com/article2/0,3973,863408,00.asp">TurboTax user</a>.</p>
<p>You can debate the merits of invasive DRM schemes all you want for video games and entertainment media. But IMHO that monkey business has absolutely no place in the build infrastructure of a serious software development process. Such a critical tool as a compiler must produce 100% repeatable results with unquestionable reliability and the production build machines must be the most secure systems in the enterprise.</p>
<p>There are some legitimate issues here. Producing an industrial-strength C++ toolchain is one of the largest and most challenging software projects one could ever attempt and consequently only a few teams have ever pulled it off. It&#8217;s going to be a hard enough task for any vendor even without the added challenge of incorporating proprietary schemes in a futile attempt to turn the host system against its owner.</p>
<p>I may never track down every leftover file and undocumented modification this rude guest made to my system. But I do know that I would rather have been writing code on that Saturday afternoon.</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=30</wfw:commentRss>
		</item>
		<item>
		<title>After all, you don&#8217;t have to use it.</title>
		<link>http://extendedsubset.com/?p=28</link>
		<comments>http://extendedsubset.com/?p=28#comments</comments>
		<pubDate>Sat, 06 Mar 2010 17:39:14 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=28</guid>
		<description><![CDATA[Recently a leading expert was interviewed on topics involving data security and SSL. I feel that some of the statements made in that interview are misleading and need a little clarification (inline).
We&#8217;ve also seen Secure Sockets Layer (SSL) come under attack, and some experts are saying it is useless. Do you agree?
I&#8217;m not convinced that [...]]]></description>
			<content:encoded><![CDATA[<p>Recently a leading expert was <a href="http://www.v3.co.uk/v3/news/2258899/rsa-2010-q-bruce-schneier">interviewed</a> on topics involving data security and SSL. I feel that some of the statements made in that interview are misleading and need a little clarification (inline).</p>
<p style="padding-left: 30px;"><em>We&#8217;ve also seen Secure Sockets Layer (SSL) come under attack, and some experts are saying it is useless. Do you agree?</em></p>
<p style="padding-left: 30px;">I&#8217;m not convinced that SSL has a problem. After all, you don&#8217;t have to use it.</p>
<p>WTF? Maybe this is out of context.</p>
<p style="padding-left: 30px;">If I log-on to Amazon without SSL the company will still take my money.</p>
<p>No, I just tested it. Amazon will not let you log in without https. Good for them!</p>
<p style="padding-left: 30px;">The problem SSL solves is the man-in-the-middle attack with someone eavesdropping on the line.</p>
<p>A <a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">MitM attack</a> is different than passive eavesdropping. If you only needed to defend against a passive eavesdropper, that can be done with anonymous cryptography and you wouldn&#8217;t need the expense and complexity of maintaining PKI and the whole Certificate Authority industry. SSL/TLS is intended to provide protection from both kinds of attack.</p>
<p style="padding-left: 30px;">But I&#8217;m not convinced that&#8217;s the most serious problem. If someone wants your financial data they&#8217;ll hack the server holding it, rather than deal with SSL.</p>
<p>Just because something isn&#8217;t the most serious problem in one scenario doesn&#8217;t mean it&#8217;s not a critical factor in the security equation. It may even be the most serious problem in some other scenario. SSL generally does its job much better than other components of the system, but that doesn&#8217;t mean problems with it should be tolerated.</p>
<p style="padding-left: 30px;"><em>But doesn&#8217;t SSL give consumers confidence to shop online, and thus spur e-commerce?</em><br />
Well up to a point, but if you wanted to give consumers confidence you could just put a big red button on the site saying &#8216;You&#8217;re safe&#8217;. SSL doesn&#8217;t matter. It&#8217;s all in the database. We&#8217;ve got the threat the wrong way round. It&#8217;s not someone eavesdropping on Eve that&#8217;s the problem, it&#8217;s someone hacking Eve&#8217;s endpoint.</p>
<p>There&#8217;s the old joke about the two hunters running from a bear. (In case you haven&#8217;t heard it, one of them notes with irony that the race is between the two of them, rather than between them and the bear.) While this is an insightful analogy in many situations, <em>the analogy only holds when there is only one bear who will be satisfied after only one target</em>. This is certainly not the case in data security where there is likely more than one attacker who likely has more than one objective.</p>
<p>When are we going to get past this skewed view that data security only has to do with e-commerce web servers and their databases? Sure, it&#8217;s a common and important scenario, but it&#8217;s not the defining scenario for any core internet protocol. Without a solid library of primitive operations that deliver on their stated guarantees, it&#8217;s just not possible to build the larger and more complex systems securely.</p>
<p>What about how mail servers talk to each other? What about how B2B data exchange systems work? How do these endpoint systems receive their software patches and anti-malware updates? How do electronic voting machines transmit their results? All of these systems and many more can use SSL/TLS as a integral part of their security architecture.</p>
<p>We mustn&#8217;t dismiss the critical importance of SSL/TLS simply because web apps are prone to SQL injections and users don&#8217;t seem to be able to type &#8220;https&#8221; consistently. Some systems actually do have careful and competent designers and are deployed and managed by careful and competent admins. We need to hold the highest standards for core protocols like SSL/TLS, because if these people can&#8217;t build secure systems on top of them, what hope does anyone else have?</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=28</wfw:commentRss>
		</item>
		<item>
		<title>Endpoint Malware is not MitM, by definition</title>
		<link>http://extendedsubset.com/?p=27</link>
		<comments>http://extendedsubset.com/?p=27#comments</comments>
		<pubDate>Fri, 05 Mar 2010 16:46:54 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=27</guid>
		<description><![CDATA[Much is being made about somebody with an authenticator getting their World of Warcraft account hacked: Man in the middle attacks circumventing authenticators.
From the original poster:
I was online, got a memory access violation critical error. Not being all to savvy with this, I didn&#8217;t pay extra attention to it.
This doesn&#8217;t sound like a man-in-the-middle attack [...]]]></description>
			<content:encoded><![CDATA[<p>Much is being made about somebody with an authenticator getting their World of Warcraft account hacked: <a href="http://www.wow.com/2010/02/28/man-in-the-middle-attacks-circumventing-authenticators/">Man in the middle attacks circumventing authenticators</a>.</p>
<p>From the <a href="http://forums.wow-europe.com/thread.html?topicId=12730404058&amp;pageNo=1&amp;sid=1#3">original poster</a>:</p>
<blockquote><p>I was online, got a memory access violation critical error. Not being all to savvy with this, I didn&#8217;t pay extra attention to it.</p></blockquote>
<p>This doesn&#8217;t sound like a man-in-the-middle attack to me.  This sounds like a good old-fashioned compromised endpoint. An pwned box, if you will.</p>
<p>A MitM attack involves an active attacker who views and changes messages on the communications link between two endpoints. Any attack involving a compromise of the endpoint itself is, by definition, something else.</p>
<p>No <strong>login</strong> authentication scheme can help this. The legitimate user was, after all, logging in. The fact that his authentication keystrokes were being forwarded to the bad guys is just a technicality. It was effectively just a bandwidth-saver for the bad guys, who could have viewed his screen remotely and injected their own keystrokes and after he had logged in. Although one suspects that driving his character to the bank and mailing out all the valuable magic items might have prompted the user to turn off the PC!</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=27</wfw:commentRss>
		</item>
		<item>
		<title>Shmoocon 2010 presentation available</title>
		<link>http://extendedsubset.com/?p=25</link>
		<comments>http://extendedsubset.com/?p=25#comments</comments>
		<pubDate>Tue, 02 Mar 2010 15:12:25 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=25</guid>
		<description><![CDATA[Steve Dispensa and I gave the keynote presentation at Shmoocon this year. We spoke about our experiment in vulnerability disclosure, code named &#8216;Project Mogul&#8217;.
Video the talk is now avaliable at the Shmoocon site. (I suspect that link will break when they rework the site in preparation for 2011.)
Slides are at that site as well, but [...]]]></description>
			<content:encoded><![CDATA[<p>Steve Dispensa and I gave the keynote presentation at Shmoocon this year. We spoke about our experiment in vulnerability disclosure, code named &#8216;Project Mogul&#8217;.</p>
<p>Video the talk is now avaliable <a href="http://www.shmoocon.org/presentations-all.html#tls">at the Shmoocon site</a>. (I suspect that link will break when they rework the site in preparation for 2011.)</p>
<p>Slides are at that site as well, but you might prefer the PDF version <a href='http://extendedsubset.com/wp-uploads/2010/03/shmoo10-closing-the-tls-authentication-gap.pdf'>here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=25</wfw:commentRss>
		</item>
		<item>
		<title>Thunderbird - It&#8217;s All Yours</title>
		<link>http://extendedsubset.com/?p=22</link>
		<comments>http://extendedsubset.com/?p=22#comments</comments>
		<pubDate>Sat, 27 Feb 2010 19:41:15 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=22</guid>
		<description><![CDATA[Yesterday I read about the availability of a new version of Mozilla Thunderbird, which is all-around a pretty decent mail client. The new version is 3.0.x, and I&#8217;m currently using 2.0.x, so I figured it was due for an upgrade. I downloaded the new installer, uninstalled the previous version, and launched the installer. Everything appeared [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I read about the availability of a new version of Mozilla Thunderbird, which is all-around a pretty decent mail client. The new version is 3.0.x, and I&#8217;m currently using 2.0.x, so I figured it was due for an upgrade. I downloaded the new installer, uninstalled the previous version, and launched the installer. Everything appeared to be going fine.</p>
<p>Probably when the installer finished it offered to &#8220;Launch Thunderbird now&#8221;, and I took it up on the offer. For some reason, Thunderbird opened with an empty configuration, i.e., none of the mail accounts I had set up under 2.0.x were listed. I remembered having had previously been offered to &#8220;import settings&#8221; every other time I had installed a Mozilla product, so I launched that wizard. When it got to the step where I was supposed to select the application from which to import settings, the dialog box was blank and only the &#8216;Cancel&#8217; button was enabled.</p>
<p>Although I felt it was a little strange that Thunderbird would not be able to keep its settings across an upgrade, I decided to press on. After all, I switch operating systems often enough that I usually end up redoing all that config once in a while anyway. So I selected &#8216;File&#8217; -&gt; &#8216;New&#8217; -&gt; &#8216;Mail&#8217;. The resulting dialog asked me just three questions: name, email address, and password. I became slightly suspicious when I noticed that the font sizes on the buttons didn&#8217;t match, but little did that prepare me for what happened next&#8230;</p>
<p><a href="http://extendedsubset.com/wp-uploads/2010/02/thunderbird3_setup_2.png"><img class="alignnone size-medium wp-image-23" title="thunderbird3_setup" src="http://extendedsubset.com/wp-uploads/2010/02/thunderbird3_setup_2.png" alt="Thunderbird3 setup" /></a></p>
<p>I am dumbstruck to see the the dialog box enlarge and display changing hostnames and port numbers which have no basis in reality. They are simply variations on a theme: my email address&#8217; hostname with various mail-related prefixes and protocols attached. Essentially, it was doing a port scan against my domain. I knew that this port scan could have but one sinister purpose: to transmit my password to whomever was willing to pick up on the other end of the line!</p>
<p>Hostnames looked up:</p>
<pre>    imap.example.com
    smtp.example.com
    pop.example.com
    pop3.example.com
    mail.example.com
    example.com</pre>
<p>Ports probed:</p>
<pre>    tcp port 143 imap
    tcp port 993 imaps
    tcp port 587 submission?
    tcp port 465 smtps
    tcp port 25 smtp
    tcp port 110 pop3
    tcp port 995 pop3s</pre>
<p>Since not everyone is deeply familiar with the protocols involved here, I will point out the problem in case you haven&#8217;t guessed it. These are classic protocols used for transferring email. Like most older protocols, they were originally specified to transfer the password in-the-clear, and all of them have had some degree of protection for it added later. This has resulted in a situation where multiple versions of each protocol exist, sometimes simply wrapped in SSL/TLS and run on a different port number, and sometimes a negotiation is made to upgrade the security of a connection made to the original port. <em>If the attacker can simply disrupt access to the secure connection, the application is induced to transmit the credentials over the insecure one.</em> This is the crudest form of downgrade attack.</p>
<p>I also tried accounts for a couple of popular free email providers, Gmail and GMX. Interestingly, this detection process returned instantly even with a bad password and blocked connection. They both supported SSL/TLS unequivocally. Perhaps these providers have registered for special handling in Thunderbird (and in so doing increased the effective security for their users).</p>
<p>Admittedly, this auto-detection scheme probably looked dynamite to the user interface designers at Mozilla wanting to improve the experience. But (bless their hearts) it is quite the security bungle.</p>
<p style="padding-left: 30px;"><a href="http://www.mozillamessaging.com/en-US/thunderbird/#feature-setup">Thunderbird - It&#8217;s All Yours</a> [mozillamessaging.com]</p>
<p style="padding-left: 30px;">Easier to Get Started<br/>All you need to provide is your name, email address, and password and Thunderbird will find your email settings and set up your email accounts for you. It’s that easy.</p>
<p>The generous explanation is that security concerns were weighed against usability concerns, and after soul-searching deliberation it was felt that, on balance, this represented a net improvement for their users. (A common mistake in security design is modeling the user as an aggregate statistic.) Some other explanations are that they didn&#8217;t think of the security concerns, the concerns didn&#8217;t come from influential parts of the organization, or they dismissed them out-of-hand because they just don&#8217;t care that much. I have no idea.</p>
<p>Of course there was no way it was going to arrive at reasonable settings for my single-user domain, I tunnel all that stuff over SSH and don&#8217;t have the ports listening. But Thunderbird gave me no informed consent before it started poking around for insecure connections to make, and even if it had managed to auto-detect some usable set of connection parameters, I assume it wouldn&#8217;t have explained the risks of using them. Given the protocols involved,  it must have been willing to leak the credentials in order to determine if the parameters were usable.</p>
<p>It may be that the auto-detection logic doesn&#8217;t actually use your password. I didn&#8217;t actually set up insecure servers to verify that either way. Regardless, it is not a difference in practice since the password must obviously be transmitted the first time it is used.</p>
<p>I find this somewhat non-intuitive, but really the only secure way to configure these email settings is to have them conveyed from your email admin all the way to your mail client via a trusted channels of communication. The actual admin is able to tell you &#8220;this is the name to use for the mail server and be sure to check the box that says &#8216;require SSL/TLS&#8217;&#8221;. But no auto-detection scheme can know to check that box.</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=22</wfw:commentRss>
		</item>
		<item>
		<title>Dear Dr. McGinley</title>
		<link>http://extendedsubset.com/?p=20</link>
		<comments>http://extendedsubset.com/?p=20#comments</comments>
		<pubDate>Fri, 19 Feb 2010 22:02:02 +0000</pubDate>
		<dc:creator>marsh</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://extendedsubset.com/?p=20</guid>
		<description><![CDATA[http://www.wired.com/threatlevel/2010/02/school-district-halts-webcam-surveillance/
http://lmsd.org/sections/news/default.php?m=0&#38;t=today&#38;p=lmsd_anno&#38;id=1138
Dear Dr. McGinley,
I am very curious to find the answer to this question: what kind of diseased mind comes up with a scheme involving sending remote-controlled cameras into the homes of schoolchildren?
Is audio transmission or recording (e.g. microphones) part of this system&#8217;s capabilities too?
In your letter, you write:
This feature was only used for the narrow purpose of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wired.com/threatlevel/2010/02/school-district-halts-webcam-surveillance/">http://www.wired.com/threatlevel/2010/02/school-district-halts-webcam-surveillance/</a></p>
<p><a href="http://www.wired.com/threatlevel/2010/02/school-district-halts-webcam-surveillance/"></a><a href="http://lmsd.org/sections/news/default.php?m=0&amp;t=today&amp;p=lmsd_anno&amp;id=1138">http://lmsd.org/sections/news/default.php?m=0&amp;t=today&amp;p=lmsd_anno&amp;id=1138</a></p>
<p>Dear Dr. McGinley,</p>
<p>I am very curious to find the answer to this question: what kind of diseased mind comes up with a scheme involving sending remote-controlled cameras into the homes of schoolchildren?</p>
<p>Is audio transmission or recording (e.g. microphones) part of this system&#8217;s capabilities too?</p>
<p>In your letter, you write:</p>
<p style="padding-left: 30px;">This feature was only used for the narrow purpose of locating a lost, stolen or missing laptop.</p>
<p>What kind of ethical system were you able to construct in which those trivial ends could be used justify such sinister means?</p>
<p>Did you personally endorse this, or just assent in silence?</p>
<p>Sincerely,</p>
<p>Marsh Ray</p>
]]></content:encoded>
			<wfw:commentRss>http://extendedsubset.com/?feed=rss2&amp;p=20</wfw:commentRss>
		</item>
	</channel>
</rss>
