<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Observations from Uppsala &#187; security</title>
	<atom:link href="http://jakob.engbloms.se/archives/category/security/feed" rel="self" type="application/rss+xml" />
	<link>http://jakob.engbloms.se</link>
	<description>Computer Technology: Simulation, Virtualization, Virtual Platforms, Embedded, Multicore and Multiprocessing (by Jakob Engblom)</description>
	<lastBuildDate>Tue, 27 Jul 2010 19:57:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<image>
    <title>Observations from Uppsala</title>
    <url>http://jakob.engbloms.se/favicon.png</url>
    <link>http://jakob.engbloms.se</link>
    <width>32</width>
    <height>32</height>
    <description>Observations from Uppsala - http://jakob.engbloms.se</description>
    </image>		<item>
		<title>Worm Attacking Industrial Control Systems</title>
		<link>http://jakob.engbloms.se/archives/1200?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1200#comments</comments>
		<pubDate>Wed, 21 Jul 2010 19:18:13 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[embedded software]]></category>
		<category><![CDATA[embedded systeme]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SCADA]]></category>
		<category><![CDATA[Siemens]]></category>
		<category><![CDATA[USB]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[worm]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1200</guid>
		<description><![CDATA[There is a very interesting worm going around the world right now which is specifically targeting industrial control systems. According to Business Week, the worm is targeting a Siemens plant control system, probably with the intent to steal production secrets and maybe even information useful to create counterfeit products. This is the first instance I [...]]]></description>
			<content:encoded><![CDATA[<p>There is a very interesting worm going around the world right now which is specifically targeting industrial control systems. According to <a href="http://www.businessweek.com/idg/2010-07-17/new-virus-targets-industrial-secrets.html">Business Week, </a>the worm is targeting a <a href="http://en.wikipedia.org/wiki/SCADA">Siemens plant control system</a>, probably with the intent to steal production secrets and maybe even information useful to create counterfeit products. This is the first instance I have seen of malware targeting the area of embedded systems. However, the actual systems targeted are not really embedded systems, but rather regular PCs running supervision and control software.</p>
<p><span id="more-1200"></span>There are two important aspects to this worm, as I see it.</p>
<p>First, it only works due to the fact that the software in question is running on regular Windows PCs.  An  attack on a real embedded OS like Wind River VxWorks or Enea OSE would  be more interesting, and much scarier since that would mean a much more devoted enemy. In this case, the attackers are opportunistic, using the window of vulnerability of a <a href="http://www.microsoft.com/technet/security/advisory/2286198.mspx">new Windows flaw </a>to attack Windows-based plant control systems. They also use <a href="http://blogs.technet.com/b/mmpc/archive/2010/07/16/the-stuxnet-sting.aspx">signed Windows drivers</a>, which is apparently a new development in malware. All quite interesting in its own right, and worth reading about for those interested in security.</p>
<p>Second, the malware spreads using physical movement of USB memory sticks rather than attacks over the Internet or other networks. This makes the very important point that even if systems are not connected to the Internet, they can still be attacked if something crosses the &#8220;<a href="http://en.wikipedia.org/wiki/Air_gap_%28computing%29">air gap</a>&#8221; that separates them from the outside world. In this case, a plant would be infected by using <a href="http://technet.microsoft.com/en-us/magazine/2008.01.securitywatch.aspx">social engineering to make some employee carry an infected USB stick </a>into the plant and putting it into some internal PC. Once the infection is inside the plant, it might spread over networks or by USB sticks moving around inside the presumably protected perimeter.</p>
<p>The lesson I think we can draw from this is that using general-purpose desktop operating systems for critical systems is a bad idea. Using a more obscure real-time OS (or even Linux) would probably reduce the number of vulnerabilities &#8211; but more importantly, it would make it much more difficult to make an infection hop from computer to computer until it reaches its target.</p>
<p>In this particular case, all Windows machines are potential bearers and spreaders of the infection. An attacker can rely on that fact to seed the Windows ecosystems at some place, hoping to get the infection hopping from machine to machine until it reaches something interesting. There is no real need to seed the infection directly into the target plant. If the target systems had been running a different OS, the attackers would have had to get really close to the target, making them easier to stop.</p>
<p>Overall, embedded systems security is something that we need to take much more seriously going forward. As we rely on embedded control systems to run much of the modern infrastructure and economy, we really need to be concerned about how to secure these systems. Security needs to be part of the architecture of embedded systems, including their operating systems (please make them as robust as possible), application designs, and networking systems. Unfortunately, current embedded technology tends to be designed to work, with little care for how they could be broken by an intentional attack. One scary example of this was provided in the <a href="http://www.grc.com/sn/sn-251.htm">SecurityNow podcast episode #251</a>, where a listener shows how easy it could be to take remote control over a car due to carelessly designed fleet management units.</p>
<p><em>Updated information</em></p>
<p>I found some more in-depth information on the issue at <a href="http://www.infoworld.com/d/security-central/siemens-warns-users-dont-change-passwords-after-worm-attack-915?page=0,0&amp;source=rss_security_central">Infoworld</a>. It notes that the software that is attacked is vulnerable since all installations use the same password to login &#8211; changing it is likely to break it. That is totally ridiculous as a security solution, period.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1200/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>True Concurrency is Different (at Wind River Blog)</title>
		<link>http://jakob.engbloms.se/archives/1151?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1151#comments</comments>
		<pubDate>Fri, 18 Jun 2010 20:24:04 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[multicore computer architecture]]></category>
		<category><![CDATA[multicore debug]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Simics]]></category>
		<category><![CDATA[Wind River]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1151</guid>
		<description><![CDATA[I have another blog up at Wind River. This one is about multicore bugs that cannot happen on multithreaded systems, and is called True Concurrency is Truly Different (Again). It bounces from a recent interesting Windows security flaw into how Simics works with multicore systems.]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/04/button-quicklink-blogs.png"><img class="alignleft size-full wp-image-1122" style="margin: 5px 10px;" title="button-quicklink-blogs" src="http://jakob.engbloms.se/wp-content/uploads/2010/04/button-quicklink-blogs.png" alt="" width="46" height="46" /></a>I have another blog up at Wind River. This one is about multicore bugs that cannot happen on multithreaded systems, and is called <a href="http://blogs.windriver.com/engblom/2010/06/true-concurrency-is-truly-different-again.html#more">True Concurrency is Truly Different (Again). </a>It bounces from a recent interesting Windows security flaw into how Simics works with multicore systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1151/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>C in Danger &#8211; and thus Higher-Level Languages (?)</title>
		<link>http://jakob.engbloms.se/archives/1131?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1131#comments</comments>
		<pubDate>Sun, 09 May 2010 20:00:20 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Erlang]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Nokia]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[Windows phone]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1131</guid>
		<description><![CDATA[Some recent developments among development environments for mobile phones have made me consider the hereto unthinkable: that C might be on a decline as the universal programming language. Indeed, maybe there is even a chance that we will not have a universal low-level language in the future at all. What is happening is that the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jakob.engbloms.se/wp-content/uploads/2010/05/C-dino.png"><img class="alignleft size-full wp-image-1132" title="C dino" src="http://jakob.engbloms.se/wp-content/uploads/2010/05/C-dino.png" alt="" width="105" height="94" /></a>Some recent developments among development environments for mobile phones have made me consider the hereto unthinkable: that C might be on a decline as the universal programming language. Indeed, maybe there is even a chance that we will not have a universal low-level language in the future at all. What is happening is that the hitherto &#8220;given&#8221; role of C as the base language for a platform is being questioned. The reason appears to be security, which cannot be said to be a bad thing. However, a large-scale move away from C might hurt many of today&#8217;s higher-level languages and even model-based engineering.<br />
<span id="more-1131"></span><br />
So what is going on? For the past decade or two, and even longer back than that on Unix platforms, it has been a truth that a (well-written) C program can be made to run on any platform. All platforms have had C compilers available (even Windows), and C programs with a dash of platform-dependent code in file operations could be easily made portable.  This has been used by common cross-platform application programs like Firefox, the Gimp, MySQL, and Wireshark, as well as by technical products like MatLab, the Diab and IAR C compilers (which I once worked on), and Simics (which I currently work on). It is a way of creating software that in my experience works very well. Especially since pretty much anything higher-level can be made to link with a basic C code base.</p>
<p>Ever since Unix became the role model for operating systems, C has been the &#8220;base&#8221; language. In desktop operating systems like Windows and Linux the platform API is expressed as C function calls, and the ABI (the binary calling conventions) for linking code from different compilation units and binary distribution units is also expressed in terms of the code that a C compiler would generate. A C compiler is the first thing you need to get the platform going, and C is a language that allows arbitrary applications to be developed and run on the platform. The semantics of dynamically loadable and shared objects are expressed in C, not C++, as the C++ ABI is too variable.</p>
<p>This ubiquitousness of C has also proven to  be a key enabler for higher-level languages. C is the language of choice to implement the basic virtual machines used by languages and programming systems like Perl, Python, Erlang, and Java. C (or C++) is also used as the target language of many modeling tools with code generation, such as MatLab/Simulink, Rational Rose, Rhapsody, and Labview. A single generator of C code can be reused to target many platforms. Sometimes C++ is the generated language (in particular for UML-based object-oriented tools), but C++ essentially falls back on the ubiquitousness of C to be able to call platform APIs and connect to other tools.</p>
<p>That is the state of things as we know them today. What seems to be happening is that this is slowly being deprecated&#8230; platforms are coming out where user code might not be possible to write in C at all, or where C programs cannot access the real platform API. For these platforms, it is quite difficult  port in an existing C/C++ portable program.</p>
<p>The first example is Google&#8217;s mobile phone operating system Android,where  Java was the only supported language at launch. Google have since made it possible to use C and C++ for some parts of an application, <a href="http://arstechnica.com/open-source/news/2009/06/android-goes-beyond-java-gains-native-cc-dev-kit.ars ">but it does not seem to be a full platform API allowing a whole program to be written only in C or C++: </a></p>
<blockquote><p>&#8220;The NDK will not benefit most applications. As a developer, you will need to balance its benefits against its drawbacks; notably, using native code does not result in an automatic performance increase, but does always increase application complexity,&#8221; the documentation says. &#8220;Typical good candidates for the NDK are self-contained, CPU-intensive operations that don&#8217;t allocate much memory, such as signal processing, physics simulation, and so on.&#8221;</p></blockquote>
<p>To port an application written in C/C++ such as Firefox to the Android platform, the app has to be modified to work as a backend to the Java interface.  <a href="http://arstechnica.com/open-source/reviews/2010/02/hands-on-and-under-the-hood-ars-tests-firefox-on-android.ars  ">ArsTechnica has a write-up on how Firefox was brought to Android through just such a modification</a>. Note that this does mean that ports are not as straight-forward as they would be to other platforms with a directly accesible C API. Interestingly, the Android approach essentially inverts the traditional relationship between C and other languages, where it was common to have a C adapter layer around other languages (like Java) in order to access the platform.</p>
<p>Note that the NDK quote does not mention language run-times. One of my favorite languages, Python, has had to be completely reimplented to run on Android. <a href="http://stackoverflow.com/questions/101754/is-there-any-way-to-run-python-on-android">Either using a &#8220;Jython&#8221; approach of compiling Python to Java byte codes, or using the Android Scripting Environment</a>.</p>
<p>Other languages that you would ordinarily just port using a simple recompile of the its C code base are not helped by this at all. One interesting example is the <a href="http://erlang.2086793.n4.nabble.com/Running-Erlang-on-Android-td2107544.html#a2107544">Erlang runtime</a>, which is basis for CouchDB. According to an interview on <a href="http://twit.tv/floss99">FLOSS weekly show 99, about Ubuntu One</a>, this fact prevents Ubuntu One from synching data from your desktop to your phone.  This demonstrates that the assumption that you can run a C program on &#8220;any Unix-like system&#8221; is no longer true for a large numbers of smartphones&#8230; and that is already affecting how you have to develop products.</p>
<p>Microsoft is also moving in the &#8220;no C for you&#8221; direction with Windows Mobile 7, where C# is the default language. This also prevents easy reuse of existing C programs on smartphones. <a href="http://arstechnica.com/microsoft/news/2010/03/winphones-first-big-native-code-casualty-firefox-on-winmob.ars">Ars Technica notes how this killed Firefox on Microsoft-based mobiles</a>.</p>
<p>Finally, we have Apples downright weird approach to languages and programming. Their recent banning of <a href="http://arstechnica.com/apple/news/2010/04/apple-takes-aim-at-adobe-or-android.ars">anything except Objective C and their own compilers </a>for iPhones (and iPods and iPads) is downright bizarre. They explicitly forbid code-generating tools to be used with their platform, as well as kicking out any alternative language runtimes (which is a move aimed at Adobe Flash that also hits Erlang, Python, et al.). This might make some sense from a security perspective, as it prevents programs from loading executable code at run-time on the phone&#8230; but it also makes for a much more restricted set of programming tools.</p>
<p>The only mobile platform that seems honest to old traditions is really Nokia&#8217;s Maemo. And Symbian. Suddenly, what used to be considered &#8220;closed&#8221; platforms have become the most open and most desktop-like of all the mobile operating systems. Really, that is a very important reason to get a Nokia N900 rather than an Android or Apple device.</p>
<p>I think this points to a somewhat more complicated future, where mobile applications will cannot be cross-platform, as you have to use Android-Java, Windows-C#, iPhone-ObjC, and Maemo-C/C++/anything to code. It could also point to a move even in the desktop and server space away from C and to more sandboxed, controlled, and not-as-common programming platforms. That would be really bad from a programmer productivity and language innovation perspective, as so much of the innovations today are actually based on the ubiquitousness of C and the use of C as a good implementation language and code-generation target language.</p>
<h3>Updates and clarifications</h3>
<p>Given the comments below, it seems that I need to make some things clearer&#8230;</p>
<p>First, the iPhone. It is really a special case, in that you do have C/objective-C access to the API. So in principle, you could port any C program including language virtual machines to the iPhone. Firefox, for example, would work. However, Apple for commercial (and maybe security) reasons does not allow programs that implement virtual machines to be distributed across their controlled application store. That you can implement a VM there does not really help you, as it is the first openly programmable platform that I have seen where a control body actually forbids certain classes of programs. The Apple approach is apparently even more idiotic than I first believed.  According to some more reports I read and heard, they do not enforce a technical limitation on the final program (such as running in a JVM or .net VM), but rather require all software to be originally and directly written in C, C#, or C++.  All just a swipe at Adobe and flash&#8230; so even Flash compiled to native code is disallowed.  And with it goes all other higher-level languages.</p>
<p>Second, on security. I do think that running programs on top of a VM like done with Java and .net does have security benefits. It gives you a level of indirection which can be used to check what applications does. Obviously not perfect since there will always be bugs and mistakes, but still it is a better architecture than raw access to the underlying machine. The  iPhone controlled mode of distribution could also be beneficial here. The <a href="http://www.twit.tv/sn245">SecurityNow podcast episode 245 </a>discusses this topic.</p>
<p>Third, on appropriate programming languages for different tasks. I totally agree with some comments that C is not a very nice language for GUI programming. No doubt about that. However, that was not really the point I was trying to make. I want to use higher level languages! But not having C available might make that harder and with limited choice&#8230; leading up to point four.</p>
<p>Fourth, my core point. <strong>Having platform-level access in C is a basic technology used today to implement the higher-level environments</strong>. Languages like Python, Perl, Erlang, Lua, and even the basic Java and .net virtual machines, all depend on having C available to bootstrap the process of getting the core virtual machine going. If we take this away, we limit choice in language and might stifle innovation, as well as the attractiveness of cross-platform environments.</p>
<p>Fifth, I agree with the comments C is definitely not going anywhere in terms of being used to develop operating systems and embedded systems (that&#8217;s where I spend most of my time, by the way). My observation is about what is happening to user-level programming for certain systems, not the systems programming which is intentionally made separate from user-level programming.</p>
<p><strong>Another Update:</strong></p>
<p>The Inquirer just pointed out that <a href="http://www.theregister.co.uk/2010/06/11/steve_jobs_lifts_interpreted_code_ban_for_chosen_few/">Apple is explicitly forbidding interpreters </a>to run on their phones, unless it is an interpreter they created or one explicitly allowed. That&#8217;s making the above very clear, Apple is consciously denying iPhone users all modern programming languages. And that&#8217;s just to make sure Adobe can&#8217;t weasel Flash in there. Politics sometimes make no sense at all. The Inq quote is worth quoting:</p>
<blockquote><p><em>Famously, when Apple released its iPhone SDK in spring of 2008, the  end user licensing agreement barred applications from downloading and  running any interpreted code. &#8220;No interpreted code may be downloaded or  used in an Application except for code that is interpreted and run by  Apple’s Documented APIs and built-in interpreter(s),&#8221; it said.</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1131/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>500K Spam</title>
		<link>http://jakob.engbloms.se/archives/1076?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/1076#comments</comments>
		<pubDate>Wed, 03 Feb 2010 20:11:39 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=1076</guid>
		<description><![CDATA[We recently had a malfunction in our spam filters at work, so I had to go back and review the catch for possible false positives. I sort things into two bins using spamassassin, one for most likely spam, and one for probable spam.  When things started to go bad, the most likely folder had reached [...]]]></description>
			<content:encoded><![CDATA[<p>We recently had a malfunction in our spam filters at work, so I had to go back and review the catch for possible false positives. I sort things into two bins using spamassassin, one for most likely spam, and one for probable spam.  When things started to go bad, the most likely folder had reached more than 2 GB, and the probable some 500 MB.</p>
<p><span id="more-1076"></span>As you can see from the webmail screenshot below, the probable folder contained almost 100 thousand spam email. These were collected since May of 2008, or in a space of roughly 21 months.</p>
<p><img class="aligncenter size-full wp-image-1077" title="spamassassin 98322 messages caught" src="http://jakob.engbloms.se/wp-content/uploads/2010/02/spamassassin-98322-messages-caught.png" alt="spamassassin 98322 messages caught" width="715" height="400" /></p>
<p>If I guesstimate that the other folder has about the same average size, that adds in another 400 thousand spam. Bringing the total caught by these filters to about half a million overall. If you divide it down to days, it is &#8220;only&#8221; about 630 per day, plus some more that secondary spam filters catch, plus the ones that get through and I manually have to delete. But these other ones won&#8217;t add up to much more than a few tens of thousands in the same time spa<del datetime="2010-02-03T20:02:13+00:00">m</del>n.</p>
<p>It is amazing just how voluminous this infestation is&#8230;</p>
<p>Legit business emails can&#8217;t be much more than fifty per day, plus various general mailing lists. Still, that means that probably no more than 75% of all email I receive is spam. Maybe I should consider myself lucky, I have seen analysis talking about 99% of all email on the Internet being spam&#8230;</p>
<p>Interesting it was.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/1076/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yubikey Follow-Up</title>
		<link>http://jakob.engbloms.se/archives/678?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/678#comments</comments>
		<pubDate>Sat, 07 Mar 2009 21:11:37 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[gadgets]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ICA]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[online banking]]></category>
		<category><![CDATA[Yubikey]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=678</guid>
		<description><![CDATA[Now I have had my yubikey for about a week, and I have put it on my keychain. It really works extremely well! The only small issue is that I tend not to have my keys immediately within reach while at home in the house or on travel, so there is a step of &#8220;go [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-670" style="margin: 5px;" title="yubico-image" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/yubico-image.jpg" alt="yubico-image" width="98" height="98" />Now I have had my yubikey for about a week, and I have put it on my keychain. It really works extremely well! The only small issue is that I tend not to have my keys immediately within reach while at home in the house or on travel, so there is a step of &#8220;go retrieve the keys&#8221; before I can use it for login.</p>
<p><span id="more-678"></span><img class="alignleft size-full wp-image-679" style="margin: 5px;" title="keys" src="http://jakob.engbloms.se/wp-content/uploads/2009/03/keys.png" alt="keys" width="61" height="63" />However, that small inconvenience is not really something to be bothered by. Any hardware-based login solution will have that, and the yubikey&#8217;s fitting into something you have anyway for getting in to places (you keys) makes it very logical. What could have made it even better had been if you would have activated it using a key-like turn rather than the somewhat bland keypress that does not produce any kind of haptic feedback. But I can understand that a twisting design like that would be an order of magnitude more expensive to produce, and probably another order of magnitude less durable&#8230;</p>
<p>It is also striking how well this system works compared the incredibly clunky login and signing facilities used by ICA Banken. There, you have a piece of hardware which is way larger than a key, into which you slide your credit card. Then, to log into the bank and effect a payment of a bill, you do:</p>
<ul>
<li>Type in customer number</li>
<li>Type in PIN code</li>
<li>Put your card into the signing device</li>
<li>Press &#8220;login&#8221;</li>
<li>Copy 8 digit code from web page to device</li>
<li>Type card PIN code into device</li>
<li>Copy 9 digit code from device to web page</li>
<li>&#8230; enter data for bills &#8230;</li>
<li>Bring out the signing device again</li>
<li>Insert card</li>
<li>Press &#8220;sign&#8221;</li>
<li>Copy 8 digit code from web page to device</li>
<li>Type card PIN code into device</li>
<li>Copy 9 digit code from device to web page</li>
</ul>
<p>I really think the &#8220;sign&#8221; step adds no security in practice, and most other bank systems I use seem to agree with this: once past login, no need for additional confirmation. I think that makes sense, and that the sign stage is here more as a warm fuzzy feeling kind of thing.</p>
<p>If it wasn&#8217;t for the possible constraint that the ICA solution has to work on public computers where you have no access to USB ports, I think a yubikey-based solution would make all of the above so much easier. The genius of the yubikey is really that it removes the &#8220;type in numbers from hardware device&#8221; from the login steps, which really is something that there is little value to having each user do every time they effect some kind of secure operation. If all banks used a yubikey, I think the world would save many thousands of people hours that could be used to have fun, be with the family, and other more beneficial uses.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/678/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Got a Yubikey!</title>
		<link>http://jakob.engbloms.se/archives/669?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/669#comments</comments>
		<pubDate>Fri, 27 Feb 2009 09:13:09 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[gadgets]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[ICA]]></category>
		<category><![CDATA[SecurityNow]]></category>
		<category><![CDATA[Yubico]]></category>
		<category><![CDATA[Yubikey]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=669</guid>
		<description><![CDATA[I been listening to the SecurityNow! podcast raving about the coolness of the Yubikey, created by Swedish startup Yubico. It seems like the device has captured the imagination of quite a few people, and I have been kind of curious about it. So I was quite pleasantly surprised when I got one a few days [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-670" style="margin: 5px;" title="yubico-image" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/yubico-image.jpg" alt="yubico-image" width="98" height="98" />I been listening to the <a href="http://www.twit.tv/sn">SecurityNow! podcast </a>raving about the coolness of the <a href="http://www.yubico.com/products/yubikey/">Yubikey</a>, created by Swedish startup <a href="http://www.yubico.com/home/index/">Yubico</a>. It seems like the device has captured the imagination of quite a few people, and I have been kind of curious about it. So I was quite pleasantly surprised when I got one a few days ago, since we are testing it as a new way to authenticate to our VPN at work.</p>
<p><span id="more-669"></span>The immediate impression is that is impressively small!  Compared to a standard USB memory stick, it is significantly smaller, and most importantly, very thin. This means that they can be sent in a regular envelope in the mail, since it is about as think as some folded papers. It also helps when you put it on your key chain, I guess. I don&#8217;t know if I dare do that yet, since my pocket tends to be fairly crowded with heavy sharp keys that could well scratch the innocent little  Yubikey. Here is a picture of the key along side a Sandisk Cruzer USB memory stick:</p>
<p><img class="aligncenter size-full wp-image-671" title="yubuj_1" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/yubuj_1.jpg" alt="yubuj_1" width="400" height="239" /></p>
<p>When it is attached to a computer, the little button ring lights up. When the computer is asleep, it pulsates nicely too.</p>
<p><img class="aligncenter size-full wp-image-672" title="yubikey-connected_1" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/yubikey-connected_1.jpg" alt="yubikey-connected_1" width="400" height="350" /></p>
<p>Driver installation was automatic on my Vista machine, showing up as a human-interface device with no particular characteristics. That is the very idea of the Yubikey: it is a USB keyboard as far as the computer is concerned, which is amazingly simple and clever. Here is what Vista says about it:</p>
<p><img class="aligncenter size-full wp-image-674" title="yubikey-driver" src="http://jakob.engbloms.se/wp-content/uploads/2009/02/yubikey-driver.png" alt="yubikey-driver" width="536" height="245" /></p>
<p>In use, the Yubikey is still a bit of challenge to me, for one simple reason: the button feels hard to get pressed in the right way. It seems that I have to push pretty hard and for a long time to activate, and then I want to hold the key with my other hand too so that I do not break it at the point where it is connected to the computer.</p>
<p>Apart from that, it is a beautiful device, and compared to the security solutions I have with my various internet-based banks, it is much easier to use. No codes to type in, no 9-digit numbers to type into online forms (that is what ICA Banken currently requires you to do, <a href="http://www.ica.se/FrontServlet?s=ikk&amp;state=ikk_dynamic&amp;viewid=1131912">copy a nine-digit number from a security device into which you insert your bank card&#8230;</a>).</p>
<p>So overall, I really like the Yubikey, and it will be interesting to see how it lasts, physically, as I start taking it with me everywhere.</p>
<p><em>Update: </em>The Yubikey does work to have on a key chain, I have started doing that and so far it works in the sense that it does not affect the physical size of the chain much. There is also some logic to the use mode of inserting the key from the key chain into my computer to &#8220;unlock&#8221; secure functions.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/669/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cool Obscure Hardware: Sun SCC and Software License Protection</title>
		<link>http://jakob.engbloms.se/archives/619?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/619#comments</comments>
		<pubDate>Wed, 28 Jan 2009 20:12:27 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[business issues]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SCC]]></category>
		<category><![CDATA[smart card]]></category>
		<category><![CDATA[software licensing]]></category>
		<category><![CDATA[Sun]]></category>
		<category><![CDATA[System Configuration Card]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=619</guid>
		<description><![CDATA[In a very roundabout way, I recently got to hear about a cool Sun server feature introduced sometime back in 2003 or 2004: the SCC System Configuration Card. This is a smart card that stores the system hostid and Ethernet MACs, along with other info, and which can be transferred from one server to another. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-620" style="margin: 5px;" title="sunlogo" src="http://jakob.engbloms.se/wp-content/uploads/2009/01/sunlogo.png" alt="sunlogo" width="97" height="60" />In a very roundabout way, I recently got to hear about a cool Sun server feature introduced sometime back in 2003 or 2004: the SCC System Configuration Card. This is a smart card that stores the system hostid and Ethernet MACs, along with other info, and which can be transferred from one server to another.</p>
<p><span id="more-619"></span></p>
<p>Finding information on this card was very hard, and here is the best that I could find:</p>
<blockquote><p>With front and back LEDs and a removable system configuration card, the Sun Fire V120 server maximizes system availability by allowing system administrators to concentrate on scheduled service through easy installation and management. The removable system configuration card allows you to store a system&#8217;s host ID, MAC address, and NVRAM settings to another server while you perform routine maintenance. As a result, system downtime is minimized.</p></blockquote>
<p>Why I find this interesting is that it is also a nod to commercial software companies relying on hostids for licensing. In this way, you can maintain the same hostid even when a server has issues, and without compromising the integrity of licensing. Sun&#8217;s hostids are unusually safe and reliable, unlike the common x86 anchors like Ethernet MAC addresses (which are easy to change) and disk IDs (which are not available on Linux typically).</p>
<p>Making the ID physical in this way is usually the best way to handle identity in general. A GSM/UMTS SIM card is another example of a physically represented identity, which is way preferable to virtual identies that are just software. Much easier to handle, and safer for all involved.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/619/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Off-topic: Crime Medicine</title>
		<link>http://jakob.engbloms.se/archives/327?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/327#comments</comments>
		<pubDate>Sat, 01 Nov 2008 13:21:17 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[business issues]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[websites]]></category>
		<category><![CDATA[fraud]]></category>
		<category><![CDATA[medicine]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=327</guid>
		<description><![CDATA[The Swedish national medical products agency is running a very cleverly marketed campaign right now to inform people about the perils of buying medicine over the Internet. They are running fake advertisement spots on television, mimicking the typical medical adverts found in the US (and the few other countries where such advertising is allowed for [...]]]></description>
			<content:encoded><![CDATA[<p>The Swedish national medical products agency is running a very cleverly marketed campaign right now to inform people about the perils of buying medicine over the Internet. They are running fake advertisement spots on television, mimicking the typical medical adverts found in the US (and the few other countries where such advertising is allowed for prescription medicine), with a trustworthy doctor talking about the benefits of this and that&#8230; and slowly going into weird land about how the products might not be want you think and maybe don&#8217;t contain the right stuff, etc.Finally, you are pointed to <a href="http://www.crimemedicine.com/">www.crimemedicine.com</a>, a site setup for this campaign. All very clever. In fact, so clever that some people reported the spots to the consumer watchdog as being illegal advertisements&#8230; brilliant!</p>
<p><span id="more-327"></span></p>
<p>It is mostly in Swedish, though, but they have some English-language information at <a href="http://www.crimemedicine.com/lib/html/english.html">http://www.crimemedicine.com/lib/html/english.html</a>.</p>
<p>I think this is pretty important stuff, way too many people are buying counterfeit and illegal and usually dangerous medical stuff over the Internet. That is not how you deal with your health: if you have a problem, go to a doctor or at least a physical pharmacy and talk to someone with proper credentials. Never ever self-medicate with stuff you find of the net. Or even sometimes buy in physical pharmacy in less well-policied countries. Real medications can be expensive &#8212; but most of the time, you are getting what you pay for. As always.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/327/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SiCS Multicore Days: The Debate Points</title>
		<link>http://jakob.engbloms.se/archives/283?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/283#comments</comments>
		<pubDate>Fri, 19 Sep 2008 20:14:24 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[multicore computer architecture]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[heterogeneous]]></category>
		<category><![CDATA[homogeneous]]></category>
		<category><![CDATA[memory bandwidth]]></category>
		<category><![CDATA[multicore]]></category>
		<category><![CDATA[panel discussion]]></category>
		<category><![CDATA[SiCS Multicore days]]></category>
		<category><![CDATA[software tools]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=283</guid>
		<description><![CDATA[It is a week ago now, and sometimes it is good to let impressions sink in and get processed a bit before writing about an event like the SiCS Multicore Days. Overall, the event was serious fun, and I found the speakers very insightful and the panel discussion and audience questions added even more information. [...]]]></description>
			<content:encoded><![CDATA[<p>It is a week ago now, and sometimes it is good to let impressions sink in and get processed a bit before writing about an event like the SiCS Multicore Days. Overall, the event was serious fun, and I found the speakers very insightful and the panel discussion and audience questions added even more information.</p>
<p><span id="more-283"></span></p>
<p>What was quite striking this year was the greater difference of opinion between the speakers. I guess that in 2007, most of the discussion was on the level of &#8220;ouch, here comes multicore and what are we going to do about it&#8221;. This year, we got a bit deeper and with one more year of experience and massive research work, the collective world of multicore have made some progress and gained insights. And that&#8217;s when the differences start to show up; the fact that we have differences of opinion tells us that we are starting to dig into details and turning up different answers due to different viewpoints and user experiences.</p>
<p>So where were the differences this time?</p>
<ul>
<li>Heterogeneous vs homogeneous cores (on a single chip). Kunle Olukotun clearly supported the heterogeneous style (which is what you with Sun&#8217;s Niagara that he designed the basis for). Erik Hagersten was more interested in the difference between thin and fat cores of the same basic ISA, and Anant Agarwal was strongly in favor of completely homogeneous systems (which is what they build at Tilera). In my biased view, I think the argument for heterogeneous in pure energy efficiency is always going to prevail. See some of my previous blog posts on this topic, for some background:
<ul>
<li><a href="http://jakob.engbloms.se/archives/222">DNS Hardware Acceleration</a>.</li>
<li><a href="http://jakob.engbloms.se/archives/157">Interview with Kunle Olukotun at the Register</a>.</li>
<li><a href="http://jakob.engbloms.se/archives/44">Homogeneous vs heterogenous</a>.</li>
<li><a href="http://jakob.engbloms.se/archives/90">Homogeneous vs heterogeneous, continued</a>.</li>
<li><a href="http://jakob.engbloms.se/archives/80">IBM Z6 accelerators</a>.</li>
<li><a href="http://jakob.engbloms.se/archives/77">Montalvo and heterogeneous x86</a>.</li>
</ul>
</li>
<li>Domain-specific vs general-purpose programming languages. The same sides here, with Kunle advocating domain-specific languages, and Anant and David Padua more in the general-purpose camp. I like domain-specific better, it seems to rhyme more with what I see people actually doing today to increase programming productivity overall.</li>
<li>Memory bottleneck or not? The most interesting discussion came when memory bandwidth and cache sizes were discussed. One quite common school of thought over the past few years teach that caches per core will shrink, and bandwidth to get data into and out of a chip is going to be a severe restriction on what can be done. Not all in the panel agreed with this, there was the idea (mostly from Kunle) that in some way the massive bandwidths and low latencies achievable within a chip (compared to between chip in a classic discrete-processors multiprocessor) could make this less of a problem. Personally, I think this is going to be some kind of problem, but maybe not as much as passing data around faster might reduce the need to store it temporarily. Despite the need for more bandwidth, nobody really agreed with Erik&#8217;s thought that maybe it makes sense to build chips that do not max out on the number of cores they contain, but rather try to balance core count with achievable IO bandwidth. That idea has some merit.</li>
<li>Core counts. Moore&#8217;s law tells us there are going to be thousands of cores on a chip fairly soon&#8230; but if we do not manage to make good use of them, maybe the growth in core counts will slow soon. Putting four or six or eight cores into a general-purpose system makes sense today, but more than that might turn out to be a waste for the vast majority of users that do not have problems to solve and programs to run that can make of more than that. In the same sense, maybe it is better with slightly fewer more powerful cores than a maximum amount of minimalistic cores, considering the state of software available today. So it sounds like a fairly divergent future here.</li>
<li>Shared memory or local memories? Most of the seemed to be in the camp proposing that shared memory is too convenient not to have, even when it really is bad for you. Several bad jokes comparing shared memory to alcohol, and the moderator of the panel suggesting that a good way to avoid the hangover of shared memory is to stay drunk&#8230; whatever that means in practice.</li>
</ul>
<p>Somethings were generally agreed upon, though.</p>
<ul>
<li>Programming is an issue, shared-memory or local-memory or whatever. the idea for the solution varied, however, as discussed above.</li>
<li>Cores will still be plentiful and that operating-systems focusing on sharing time on a single very valuable core is an idea of the past. The keyword for the future is spatial sharing and reducing the overhead of management (I have some previous blog posts on this topic, especially on the <a href="http://jakob.engbloms.se/archives/58">subject of IMA</a> and <a href="http://jakob.engbloms.se/archives/123">real-time control when cores are free</a>).</li>
<li>Virtualization and isolating partitions of a multicore chip from each are necessary mechanisms. Running multiple different operating systems on a single chip will be quite normal, probably under the control of some global hypervisor.</li>
</ul>
<p>Any comments on this from my small audience? I think the topics under discussion are quite fascinating and the kind of issues on which the success of major chip design projects will be decided. A good architecture with a good programming model has a great chance of success (as long as it looks like a continuation of something existing <img src='http://jakob.engbloms.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/283/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Google Chrome and Parallel Browsing</title>
		<link>http://jakob.engbloms.se/archives/258?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/258#comments</comments>
		<pubDate>Fri, 12 Sep 2008 07:54:54 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[desktop software]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[Google chrome]]></category>
		<category><![CDATA[Internet explorer]]></category>
		<category><![CDATA[web browsing]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=258</guid>
		<description><![CDATA[Everybody seems to think the launch of the Google Chrome browser is very important and cool. Probably because Google itself is considered important and cool. I am a bit more skeptical about the whole Google thing, they seem to building themselves into a pretty dangerous monopoly company&#8230; but there are some interesting architectural and parallel [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-259" style="margin: 10px 5px;" title="gglchrome" src="http://jakob.engbloms.se/wp-content/uploads/2008/09/gglchrome.jpg" alt="" width="103" height="98" /> Everybody seems to think the launch of the <a href="http://www.google.com/googlebooks/chrome/">Google Chrome browser </a>is very important and cool. Probably because Google itself is considered important and cool. I am a bit more skeptical about the whole Google thing, they seem to building themselves into a pretty dangerous monopoly company&#8230; but there are some interesting architectural and parallel computing aspects to Chrome &#8212; and Internet Explorer 8, it turns out.</p>
<p><span id="more-258"></span></p>
<p>Both IE8 and Chrome have taken to running each tab of a multi-tab browser as its own protected process, to make it both parallel processing and to increase robustness. I think that is a very good idea, and I am waiting for Firefox to catch up.</p>
<p>Why does running a browser as a parallel program make sense? If you look at the tradition, when the web started, you would load a page, render it, and read it for a long time. With multiple tabs and windows, each such display was really also just a set of static prints of pages that you flipped between. No point in being parallel there. However, in recent years, the web page model is changing. Pages are becoming far more active, starting a long time ago with Java applets, Active-X controls, and similar, and today the main drivers seem to be Javascript/AJAX/Web 2.0 pages and media players like Flash and Silverlight.</p>
<p>Basically, we see another example of a domain change enabling parallel processing to be applied. The domain of web pages has changed from single-shot renderings of single pages at a time, which is essentially serial, to lots of active programs running at the same time.</p>
<p>I think we are going to see more of parallel processing being used to enable richer user experience. This is one way that the world is making use of the increase in computing power and communications bandwidth, just because it is there. It gives us a nice sea of threads to run in parallel &#8212; the only issue probably being IO bandwidth and cache restrictions of single chips.</p>
<p>The use of processes for robustness is kind of an application-level virutalization. The OS provides isolation between processes, just like virtualization provide isolation between operating systems.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/258/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>DNS: Hardware Accelerator Time!</title>
		<link>http://jakob.engbloms.se/archives/222?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/222#comments</comments>
		<pubDate>Sat, 16 Aug 2008 21:21:50 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[multicore computer architecture]]></category>
		<category><![CDATA[multicore software]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[podcast commentary]]></category>
		<category><![CDATA[SecurityNow]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=222</guid>
		<description><![CDATA[In Episode 157 of Security Now,Steve Gibson and Leo Laporte discuss the recently discovered security issues with DNS. In particular, the cost of making a good fix in terms of bandwidth and computation capacity. Fundamentally, according to Steve, today&#8217;s DNS servers are running at a fairly high load, and there is no room to improve [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.twit.tv/sn157"><img class="size-medium wp-image-225 alignleft" style="margin: 5px 10px;" title="Security Now smaller" src="http://jakob.engbloms.se/wp-content/uploads/2008/08/podcast_2_31.jpg" alt="" width="70" height="70" /></a> In <a href="http://www.twit.tv/sn157">Episode 157 of Security Now</a>,Steve Gibson and Leo Laporte discuss the recently discovered security issues with DNS. In particular, the cost of making a good fix in terms of bandwidth and computation capacity. Fundamentally, according to Steve, today&#8217;s DNS servers are running at a fairly high load, and there is no room to improve the security of DNS updates by for example sending extra UDP packets or switching to TCP/IP. As this theoretically means a doubling or tripling of the number of packets per query, I can believe that. The &#8220;real solutions&#8221; to DNS problems should lie in the adoption of a truly secured protocol like <a href="http://en.wikipedia.org/wiki/DNSSEC">DNSSEC</a>. As this uses public key crypto (PKC), it would add a processing load to the servers that would kill the DNS servers on the CPU side instead&#8230;</p>
<p><span id="more-222"></span></p>
<p>Since Steve is a general PC guy, he seems to have a hard time acknowledging that you need anything but an x86 processor (or a few). However, in this episode he did note that this would greatly benefit from special-purpose acceleration hardware for PKC. So here is a clear-cut case where the addition of specialized accelerators make sense even in what is considered &#8220;general&#8221; computing. This is a favorite theme of mine, see previous blog posts like the <a href="http://jakob.engbloms.se/archives/157">Kunle Olukotun Interview</a>, <a href="http://jakob.engbloms.se/archives/80">IBM z10 accelerators</a>, and my <a href="http://jakob.engbloms.se/archives/44">Niagara 2 writeup</a>.</p>
<p>So here we have it: special-purpose acceleration will save the Internet, and the only architecture missing processors with good crypto accelerators seems to be x86. SPARC, Power Arch, and zSeries all have chips with accelerators on them. One would presume that either AMD or Intel &#8212; maybe more likely AMD who are now working hard on integrating things like GPUs on their chips &#8212; will soon release an x86 with this kind of support. It is also a case where general multicore use does not really make much sense, as using an additional general-purpose core is going to have much worse performance per energy or per area than a dedicated accelerator.</p>
<p>The future is heterogeneous and full of accelerators, I still believe that is the case.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/222/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMM Detection Myths and Realities from a Simics and Embedded Perspective</title>
		<link>http://jakob.engbloms.se/archives/97?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/97#comments</comments>
		<pubDate>Sun, 20 Apr 2008 00:02:21 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[computer simulation technology]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[virtual machines]]></category>
		<category><![CDATA[virtualization]]></category>
		<category><![CDATA[Andrew Warfield]]></category>
		<category><![CDATA[HOTOS]]></category>
		<category><![CDATA[Jason Franklin]]></category>
		<category><![CDATA[Keith Adams]]></category>
		<category><![CDATA[Simics]]></category>
		<category><![CDATA[Tal Garfinkel]]></category>
		<category><![CDATA[Temporal decoupling]]></category>
		<category><![CDATA[Timing attack]]></category>
		<category><![CDATA[Virtual machine detection]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=97</guid>
		<description><![CDATA[It must have been Google Alerts that send me a link to the HOTOS 2007 (Hot Topics in Operating Systems) paper by Tal Garfinkel, Keith Adams, Andrew Warfield, and Jason Franklin called Compatibility is not Transparency: VMM Detection Myths and Realities. This paper is slightly less than a year old today, so it is old [...]]]></description>
			<content:encoded><![CDATA[<p>It must have been Google Alerts that send me a link to the <a href="http://www.usenix.org/events/hotos07/">HOTOS 2007</a> (Hot Topics in Operating Systems) paper by Tal Garfinkel, Keith Adams, Andrew Warfield, and Jason Franklin called <a href="http://www.usenix.org/events/hotos07/tech/full_papers/garfinkel/garfinkel_html/">Compatibility is not Transparency: VMM Detection Myths and Realities</a>. This paper is slightly less than a year old today, so it is old by blog standards and quite recent by research paper standards. It deals with the interesting problem of whether a virtual machine can be made undetectable by software running on it &#8212; and software that is trying to detect it. Their conclusion is that it is not feasible, and I agree with that. The reason WHY that is the case can use some more discussion, though&#8230; and here is my take on that issue from a Simics/embedded systems virtualization perspective.</p>
<p><span id="more-97"></span></p>
<p>Their main important assumption is that the VMM cannot be tailored to avoid detection by any particular piece of software, but has to be sufficiently like the real thing to fool something the first time it appears. They discuss from the perspective of virtualization solutions like VmWare that aim at high performance before all else. The virtual PCs generated by VmWare, Parallels, KQemu, and others are all compatible with physical PCs &#8212; run the same software &#8212; but are not at all identical in detail. So they are not transparent in the words of the paper. This means that they are quite easy to spot.</p>
<p>There are some holes in functional differences that VMMs can quite easily plug. The paper shows how you can get a different-sized TLB (compared to the physical hardware), for example, from interference from the VMM. This can obviously be fixed in the VMM, at a cost in performance. The reason such differences are there is that VMMs are optimized for performance at almost any cost. As long as the requisite operating systems run as they should, the VMM is fine even if it is does actually correspond to any particular existing physical machine. This is a testament to the tolerance of modern operating systems towards their hardware. Basically, any OS that probes hardware and discovers what is there will work fine as long as the (virtual) hardware exposes devices that it can recognize. This is quite different from the 1970s or 1980s where an OS would definitely expect a very particular hardware setup with very peculiar timing to run at all. Thus, making a VMM totally identical to some physical machine is a waste of effort and performance.</p>
<p>Paravirtual approaches like Xen and what Sun has with Niagara and IBM on their Power servers, where the OS is rewritten by having drivers for a purely virtual hardware/software interface is an obvious generalization from the VmWare compatibility approach. Compatible versus transparent/invisible  virtualization is really only an issue in the x86 PC world, since all other datacenter architectures are virtual by definition and all operating systems work towards a standard virtual layer. In such an environment, I have hard time seeing that the question posed in the paper does even make sense. You are always virtualized, period.</p>
<p><strong>Embedded Virtual Platforms</strong></p>
<p>Anyhow, back to the main thread. There is still a large set of targets where transparency and compatibility are of interest. x86 PCs is one such target, it is an interesting question for older architectures (Alpha, Vax, Sun and IBM in older generations). In particular,  it is an important topic for embedded systems where you want to use virtual or simulated approaches to develop and test software. As part of that software development process on a virtual machine, you could potentially be examining malware of various kinds. A good not-too-hypothetical example are mobile phone viruses.</p>
<p>If we look at embedded system virtual platforms, the functionality of the simulator is usually more complete and more like a particular physical machine than what a VmWare-style datacenter VMM. This is partially due to embedded software stacks tending to be a bit pickier about what they run on, and partially due to the simple fact that the goal really IS to expose the hardware/software interface of a particular piece of hardware as closely as possible. Also, since this is usually cross-targets (Power Arch on x86, for example), there is no performance gain from using features of the host directly. So items like TLB counts, memory layout, memory content, flash memory programming, etc. are all going to be functionally identical to the physical machine.</p>
<p><strong>Timing is Key</strong></p>
<p>Thus, just like for a patched VmWare-style VMM as discussed in the article, the main attack vector remains <em>timing</em>.</p>
<p>The best way, according to the authors, to spot a VMM is to look for timing differences compared to the behavior on normal hardware. Despite the inherent variability of typical hardware, there are cases where VMMs by necessity vary detectable amounts. I would say this means a factor five or more over many tests of a case.</p>
<p>The authors discuss whether tools like Virtutech Simics could be used to overcome this problem in the context of x86 PCs.  I think the main argument for something like Simics for this purpose is that by simulating the entire hardware platform and providing all timing measurements from a strong virtual time base, you do not see the types of time differences that can be used to detect a &#8220;normal&#8221; VMM. However, since the paper considers Simics and SimNow (from AMD) to be about ten times slower than native hardware, you can always detect them using a non-local time source. That is likely true. But it less obviously true for an embedded target where the simulator running on a fast PC might well be just as fast as the target.</p>
<p><strong>The Multicore Timing Attack</strong></p>
<p>A more intriguing aspect of embedded virtual platforms that could be used to detect virtual platforms is how simulation of multicore machines is handled. For performance reasons, simulators use <em>temporal decoupling</em>,  where each virtual processors is run for a &#8220;long&#8221; time slice before switching to the next. We discussed the effect of this in a recent presentation at the multicore expo (<a href="http://jakob.engbloms.se/archives/89">link to previous blog post</a>), and some of that data is worth repeating.</p>
<p>Here is a slide explaining how temporal decoupling works:</p>
<p><img class="aligncenter size-full wp-image-105" style="vertical-align: middle;" title="temporaldecoupling-what-it-is" src="http://jakob.engbloms.se/wp-content/uploads/2008/04/temporaldecoupling-what-it-is.png" alt="Illustration of temporal decoupling" width="500" height="375" /></p>
<p>So what does this mean in practice for detecting that you are running in a virtual machine?</p>
<p>It means that the communication latency between parallel threads is proportional to the size of the time slicing. If you have two threads progressing in parallel doing spinlocks, on a real machine they will be stealing the lock from each other all the time. On a temporally decoupled simulator, you will rather see a behavior where you can take the lock and then recapture it a few times before missing it. This effect was captured by a simple test program that we wrote, and the data is shown in the slide below:</p>
<p><img class="aligncenter size-full wp-image-106" title="temporaldecoupling-visible-disturbance" src="http://jakob.engbloms.se/wp-content/uploads/2008/04/temporaldecoupling-visible-disturbance.png" alt="Visible disturbance from temporal decoupling" width="500" height="375" /></p>
<p>The program here is running two threads in parallel, updating a shared variable, with three types of locking for the accesses:</p>
<ul>
<li>No locking at all</li>
<li>A local lock to each thread being used (&#8220;fake locking&#8221;)</li>
<li>A proper lock</li>
</ul>
<p>The interesting behavior is the execution time of the program for each of these locking styles. Obviously, running with no lock is the fastest, and with proper locking the slowest. The relative speed of these is the factor to consider. On real hardware, this program observes a very steep increase in execution time when using proper locking. On the simulator, as seen above, the difference in execution time between fake locking and proper locking is significantly smaller when using a long time slice compared to when using a short time slice. The behavior on physical machines is much more like that observed at time slice lengths of ten than that at time slices of 10000.</p>
<p>Normally, a multiprocessor simulator with any ambition to be fast has to use a time slice of 1000 or more. Thus, detecting that you are running inside a simulator is quite simple. If the outside world time seems right, check if you can see strange timing behavior when using locks. Since high speed requires a long time slice, you cannot have both correct real-world timing and a large performance difference. And on the other hand, if the behavior with locking seems reasonable, you should check the real-world time &#8212; as a simulator with a short time slice will be way slower than the real world.</p>
<p>The paper authors note a similar aspect in desktop/server x86 VMM detection. They discuss &#8220;performance cliffs&#8221; that appear when doing &#8220;unusual&#8221; things. For example, VmWare is engineered assuming a minimum use of self-modifying code. Performance is much worse if you use it extensively, and this can be used to detect VmWare quite effectively. This effect is quite similar to the time slice effect in embedded virtual platforms.</p>
<p>Hope you enjoyed this fairly long rant. And we have not even begun exhausting the contents of this topic&#8230; luckily, these discrepancies only very rarely impact the usefulness of virtual platforms. Since most software even on an embedded system does not care about detailed timing like this. In the example above, we still see the lock contention. So we know that we are getting an increase in execution time from the lock. Only not a complete picture of what it means in absolute terms. We will still find missing locks and overused locks.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/97/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BBC Documentary: On the Trail of Spammers</title>
		<link>http://jakob.engbloms.se/archives/69?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/69#comments</comments>
		<pubDate>Sun, 20 Jan 2008 21:00:50 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[business issues]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[podcast commentary]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/69</guid>
		<description><![CDATA[If you are looking for a good popular introduction to what spam is and how it works, the BBC World Service Documentary Podcast has a very good documentary up right now. I cannot find a direct link, but go to the overview page and then download &#8220;Doc: Assignment &#8211; On the trail of spammers 17 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bbc.co.uk/radio/podcasts/docarchive/assets/_170x170.jpg" align="left" height="100" hspace="10" width="100" />If you are looking for a good popular introduction to what spam is and how it works, the <a href="http://www.bbc.co.uk/radio/podcasts/docarchive/">BBC World Service Documentary Podcas</a>t has a very good documentary up right now. I cannot find a direct link, but go to the overview page and then download &#8220;Doc: Assignment &#8211; On the trail of spammers 17 Jan 2007&#8243;. Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/69/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Customer is not always Right</title>
		<link>http://jakob.engbloms.se/archives/6?&amp;owa_from=feed&amp;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/6#comments</comments>
		<pubDate>Tue, 07 Aug 2007 08:58:42 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[business issues]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[customer service]]></category>
		<category><![CDATA[Leo Laporte]]></category>
		<category><![CDATA[online banking]]></category>
		<category><![CDATA[SecurityNow]]></category>
		<category><![CDATA[Steve Gibson]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/archives/6</guid>
		<description><![CDATA[I just listened to Episode 103 of the Security Now podcast, where Leo Laporte and Steve Gibson talk to the head of security at PayPal. PayPal is doing the right thing right now, issuing their customers with RSA security keys. Which gives them two-factor authentication (password and security key passnumber). But for some reason, they [...]]]></description>
			<content:encoded><![CDATA[<p>I just listened to <a href="http://www.twit.tv/sn103">Episode 103 of the Security Now podcast</a>, where Leo Laporte and Steve Gibson talk to the head of security at PayPal. PayPal is doing the right thing right now, issuing their customers with <a href="https://www.paypal.com/securitykey">RSA security keys</a>. Which gives them two-factor authentication (password and security key passnumber).</p>
<p>But for some reason, they do not enforce the use of security keys on their customers. Even when you have obtained a security key (which is optional, weirdly enough) and said you are using it, you can still login without it doing some additional security questions. For the reason of convenience! Which basically reduces the security added to nothing, since you can still login in a traditional fashion.</p>
<p><span id="more-6"></span>I am all for listening to the needs of customers, but sometimes you have to assume that you know better than your customer. And security for financial  institutions is one area where the financial institution does know better than their customers. The very idea of letting someone get around two-factor authentication for convenience is just amazing to me. Even more amazing is the Bank-of-America login that apparently (from Leos comments in the podcast) do not even use any kind of hardware token for login. This is akin to having safety deposit boxes put in the waiting area in a bank and asking customers to just put their own padlock on them.</p>
<p>Every Internet-based bank where I have  been a customer have done SOMETHING more than just a password. There have been little crypto dongles where you enter a challenge number and get a response, a card with one-time passwords, or a smart card reader that gets a one-time number from the chip on the smart card itself. Or a one-time password sent over SMS to register a certificate on a computer. Not all perfect solutions, but in all cases security has at least been considered and not just customer convenience.</p>
<p>For banks, you do not want access to be too simple. You want your money to be safe. And it is OK to make access a bit more complex than just user name and password.</p>
<p>I hope the argument is not cost-based. The cost of giving out hardware tokens should be minor compared to the cost of lost customer money. It is just part of what it means to be in business as a bank, you do have to pay for offices (or at least server rooms for an internet-only bank) and customer service.</p>
<p>I guess this is one more thing that falls in the category of &#8220;the US is a strange land&#8221;.   Because I hear an undercurrent of &#8220;convenience is more important than anything&#8221; and a fear of losing customers if login is too complex. Which in this case has to be considered the wrong priority.</p>
]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/6/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
