<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"><id>tag:blogger.com,1999:blog-24586388</id><updated>2012-02-09T07:17:42.920+01:00</updated><category term="bad guys attacking joanna" /><category term="formal verification" /><category term="tpm" /><category term="philosophical" /><category term="attack" /><category term="trusted execution technology" /><category term="virtualization based rootkits" /><category term="personal" /><category term="saving-the-world-afterhours" /><category term="usb" /><category term="fighting for a better world" /><category term="chipset" /><category term="nested virtualization" /><category term="challanges" /><category term="disk encryption" /><category term="cloud" /><category term="bitlocker" /><category term="general" /><category term="xen heap exploiting" /><category term="hypervisor rootkits" /><category term="xen hacking" /><category term="company news" /><category term="trusted computing" /><category term="qubes" /><category term="os security" /><category term="backdoors" /><category term="BIOS" /><category term="exploit" /><category term="rootkits" /><category term="secure architecture" /><category term="conferences" /><category term="smm" /><title type="text">The Invisible Things Lab's blog</title><subtitle type="html">Kernel, Hypervisor, Virtualization, Trusted Computing and other system-level security stuff</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default?start-index=26&amp;max-results=25" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>93</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/invisiblethings" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="invisiblethings" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry><id>tag:blogger.com,1999:blog-24586388.post-7272088205765369134</id><published>2012-02-06T11:45:00.002+01:00</published><updated>2012-02-06T11:45:48.671+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Qubes Beta 3!</title><content type="html">&lt;style type="text/css"&gt; &lt;!--  @page { margin: 0.79in }  P { margin-bottom: 0.08in }  A:link { so-language: zxx } --&gt; &lt;/style&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;A new ISO with the just released QubesBeta 3 is now available for download &lt;a href="http://wiki.qubes-os.org/trac/wiki/InstallationGuide"&gt;here&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Beta 3 fixes lots of annoying problemsdiscovered in Beta 2 and earlier releases, and also implements abunch of useful feature:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;This includes the &lt;a href="http://wiki.qubes-os.org/trac/wiki/StickMounting"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;qvm-block&lt;/span&gt; tool&lt;/a&gt; and infrastructure for easy attachment of block devices to any AppVM,no matter which system VM is handling the actual USB controller. So,this allows to have untrusted USB domain(s), almost seamlesslyintegrated in the desktop system. One can consider to use it in orderto prevent &lt;a href="http://theinvisiblethings.blogspot.com/2011/06/usb-security-challenges.html"&gt;various USB attacks&lt;/a&gt;. Thenext release (the 1.0) will bring this feature to the Qubes GUImanager as well, making it easy to use for non-command-line userstoo.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Also, we have now introduced fullyautomatic Qubes build system, that allows to build all the Qubespackages, and also create the installation ISO, with just onecommand. More information on this system and on how to use it can be found inthe &lt;a href="http://wiki.qubes-os.org/trac/wiki/QubesBuilder"&gt;wiki&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;We have also updated to Fedora 15-basedtemplate as a default. Unfortunately F16-based template would requiretoo much work to get all the Gnome 3 stuff working correctly. (The challenge here, is that we don't run a normal Windows and Desktop manager in every domain, in order to make the VMs light weight, and so we need to sometimes work around various problems this causes...).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Finally, we have added two newQubes-specific applications:&lt;/div&gt;&lt;ul&gt;&lt;li&gt;A plugin for Thunderbird (it isautomatically installed in the template), that allows for one clickopening of attachments in Disposable VMs, as well as one-click savingof the attachment to select VM.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;And something we call “splitGPG”, that I will describe in a separate article later.&lt;/li&gt;&lt;/ul&gt;ThoseQubes-specific applications are based on our &lt;a href="http://wiki.qubes-os.org/trac/wiki/Qrexec"&gt;Qubes RPC&lt;/a&gt;, introduced in Beta 2.&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;This is likely the last release beforethe “final 1.0”, that is scheduled to follow &lt;i&gt;soon&lt;/i&gt;&lt;span style="font-style: normal;"&gt;(TM). The only major work for 1.0 is GUI manager improvements toexpose most of the Qubes functionality via clickable GUI, and commandline tools cleanup and documentation. Plus testing and bugfixing :)&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Andthen, the next thing we will be working on will be support for HVMdomains, e.g. Windows. This work is starting actually just about now, but code will be released only after Qubes 1.0.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-7272088205765369134?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/7272088205765369134/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=7272088205765369134" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7272088205765369134" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7272088205765369134" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2012/02/qubes-beta-3.html" title="Qubes Beta 3!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-6804689402512253967</id><published>2012-01-21T18:01:00.002+01:00</published><updated>2012-02-06T11:46:21.220+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="rootkits" /><category scheme="http://www.blogger.com/atom/ns#" term="chipset" /><category scheme="http://www.blogger.com/atom/ns#" term="attack" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><title type="text">Thoughts on DeepSafe</title><content type="html">&lt;style type="text/css"&gt; &lt;!--  @page { margin: 0.79in }  P { margin-bottom: 0.08in }  A:link { so-language: zxx } --&gt; &lt;/style&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;Several people asked me recently what Ithough about &lt;a href="http://www.mcafee.com/us/solutions/mcafee-deepsafe.aspx"&gt;DeepSafe&lt;/a&gt;.So, below I present my opinion...&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;First, for any AV system (or Host IPS,or Personal Firewall, etc) to work effectively, there are three problems that must be addressed:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;How to protect the AV agent (code and data) from tampering (from the rest of the OS)?&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;How can the AV agent get reliable access to (sensitive pieces of) the system memory and registers, and/or provide reliable memory protection for the (sensitive pieces of) the OS.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;What are those "sensitive pieces of” memory that should be monitored or protected?&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;From reading various PR materials, itseems like the #1 above is the primary differentiation factor forDeepSafe (DS). So, let's consider this problem in the context of e.g.a Windows OS. In order to protect its code and data, DS uses, as itis heavily advertised, Intel VT-x virtualization technology. Now,that sounds really secure -- after all what can be more secure than ahardware virtualization, right? ;)&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;But VT-x (including EPT) is only aboutCPU virtualization, which in our case translates to protecting the DSmemory and registers from CPU-originating accesses. But, as everyregular to this blog knows, there is also another method of accessingmemory on any PC system, and this is through DMA transactions fromdevices. The OS (so also the kernel malware) is free to program oneof the many devices in the system to issue DMA reads or writes to &lt;i&gt;any&lt;/i&gt;&lt;span style="font-style: normal;"&gt;physical &lt;/span&gt;memory itwants...&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Now, in order to protect some portionof the system memory (DRAM, cache) against DMA accesses, we have theIntel VT-d technology... So, one would think that DS must be alsousing VT-d in order to protect itself.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Very well, let's assume then that theDeepSafe is not a &lt;span style="font-style: normal;"&gt;total &lt;/span&gt;ripoff,and that it implements also VT-d protection for its agent, although Ihaven't found this mentioned in any of the public papers or pressmaterials I found on the web...&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;This, however, would be a bit complexto do correctly, because the OS (so, also the kernel malware) stillhas a full control over the chipset (MCH), which is the entity...that controls the VT-d.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Now, in order toprevent the OS (or the kernel malware) from playing with the chipsetfor fun and profit, and e.g. disabling VT-d protection, DS would haveto virtualize the chipset.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;If you look at some consumer VMMs, suchas VMware or Xen/Qemu, you would see that they all virtualize thechipset for their guests (of course), but that the chipset theyprovide this way is some kind of an ancient Pentium MCH. I don'tthink any of the consumers would be especially happy if they foundout that after installing DS on their brand new 2012 laptop, Windowssuddenly see a Pentium-era chipset... And this is not without areason – chipsets, specifically MCHs, are one of the most complexdevices, perhaps only beaten by GPUs in this category. There arevirtually hundreds of configuration registers exposed by the chipset,some of them control the VT-d, some other control system memory mapsand permissions, PCIe configuration, and many other things that Ieven have no idea about, and this all makes virtualizing the chipseta very challenging task.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;So, it's either that McAfee and Intelfound some interesting way of how to securely virtualize the chipsetwhile preserving all of its (very rich) functionality, or thatthey... don't bother with VT-d protection and chipset virtualizationat all, assuming that even without VT-d, DeepSafe is good enough and“rises the bar” anyway (sarcasm intended).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;(Can somebody from McAfee or Intelconfirm in the comments below what does DP really do?)&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Anyway, let's assume they &lt;i&gt;do&lt;/i&gt;have VT-d protection and they &lt;i&gt;do &lt;/i&gt;virtualize the chipsetsomehow...&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Now, we're moving on to the #2 pointfrom the list of tasks above -- about the reliable&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;memory access or reliable protection.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;So, let say that the DS agent decidedthat some part of the system memory, e.g. the IDT table, is &lt;i&gt;sensitive&lt;/i&gt;and should be monitored/protected. So it sets up EPT traps to triggeran VT-x/EPT intercept on any access to that memory (or IDT baseregister), in order to find kernel malware that tried to modify IDT.That sounds really nice, but what if the malware uses DMA to modifyIDT? DS would not be able to catch such access! (So far we consideredthe, hypothetical, use of VT-d only to protect the DS agent code).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;One might think that DS is programmingVT-d to sandbox each and every device in the system (so includingGPU, USB controllers, NICs, SATA, etc) so they &lt;i&gt;never &lt;/i&gt;beallowed to touch any of those sensitive parts of the system, such asIDT. Let's assume they do it this way...&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;And here we've arrived to the lastpoint from the list at the beginning: which of the system memoryconstitutes those "sensitive pieces" that should beprotected/monitored? IDT? Sure. What about all the code sections ofthe all the kernel modules? Yes. Are we fine now? Well, no, becausethe malware can hook some pointers other than the well known IDT.Some public NDIS data structure? Ok, we can add those to theprotected areas. But, what about some &lt;a href="https://www.blackhat.com/presentations/bh-usa-06/BH-US-06-Tereshkin.pdf"&gt;undocumented NDIS structures&lt;/a&gt;?And this is just NDIS subsystem, one of the many subsystems in theWindows kernel... When we think about it, it should be intuitivelyobvious that in a general purpose Operating System like Windows, itis not possible (at least for 3&lt;sup&gt;rd&lt;/sup&gt; party) to make asatisfactory list of all the sensitive pieces of memory that shouldbe monitored/protected, in order to detect all the systemcompromises.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Greg Hoglund, Jamie Butler, AlexTereshkin, and myself, have been researching this area actively inthe early years of this millennium. In addition to the Alex's paperlinked above, you might also check out one of my &lt;a href="https://www.blackhat.com/presentations/bh-europe-06/bh-eu-06-Rutkowska.pdf"&gt;last slides&lt;/a&gt; fromthisperiod.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;I don't think anything has changedsince that time. It was also the reason why I gave up on writingWindows compromise detectors, or forensic tools, and moved on toresearching other ways to secure OSes, which finally gave birth toQubes OS, many years later.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;So, back to DS -- in order to provide asomehow satisfactory protection level for your general purpose OS,such as Windows, it would need to:&lt;/div&gt;&lt;ol&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Use VT-d to protect its own memory,&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol start="2"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Virtualize the chipset, at least some (sensitive) parts of it,&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol start="3"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Program VT-d permissions for each device to exclude all the sensitive areas in the system that should be protected, and also protect one device from DMAing into/from another device memory (e.g. NIC stealing GPU framebuffer, or inserting instructions to the GPU instruction buffer, or keystrokes to USB controller buffer). Ideally, this could be done by programming VT-d to grant each device only access to its own DMA buffer, but as far as I know, this would be very hard to implement, if not impossible for a 3rd party, on a Windows OS (in contrast to Linux, which mostly support this model). Please correct me, if the recent Windows version allows for such use of VT-d.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ol start="4"&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Finally, and the most hard thing to solve, how to define all the "sensitive pieces of memory" in the system that should be protected and/or monitored? Although this is a somehow more generic problem, not specific to DS, but applying to any A/V, HIPS, or forensic tool.&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="margin-bottom: 0in;"&gt;So, is DeepSafe another piece of crap not worth any special attention, or has McAfeeand Intel came up with some novel methods, e.g. for chipsetvirtualization, and other problems? Unless I see some technical info to backup the latter, I would have to assume,unfortunately, the former. But I would like to be mistaken – afterall DeepSafe seems to be just a new incarnation of my Bluepill ;)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-6804689402512253967?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/6804689402512253967/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=6804689402512253967" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6804689402512253967" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6804689402512253967" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2012/01/thoughts-on-deepsafe.html" title="Thoughts on DeepSafe" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-6975144072797589166</id><published>2011-12-13T20:25:00.000+01:00</published><updated>2011-12-13T20:27:43.043+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted execution technology" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><title type="text">Trusted Execution In Untrusted Cloud</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;Wouldn't it be nice if we couldactually own our data and programs in the cloud? By “owning” hereI mean to have control over their confidentiality and integrity. Whenit comes to confidentiality and integrity for the &lt;i&gt;data,&lt;/i&gt;&lt;span style="font-style: normal;"&gt;it's&lt;/span&gt; not much of a rocket since, as the classic crypto (andsecure client systems) is all that we need. &lt;span style="font-style: normal;"&gt;Ihave already wrote about it in an &lt;a href="http://theinvisiblethings.blogspot.com/2011/05/untrusting-cloud.html"&gt;earlier post&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;But itwould also be nice, if we could somehow get the same confidentialityand integrity assurance for our &lt;/span&gt;&lt;i&gt;programs&lt;/i&gt;&lt;span style="font-style: normal;"&gt;that we upload for the execution in the cloud...&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Forexample, a company might want take theirdatabase application, that deal with all sorts of corporate criticalsensitive data, and then upload and &lt;i&gt;safely &lt;/i&gt;run this application on e.g.Amazon's EC2, or maybe even to some China-based EC2-clone. Currently t&lt;/span&gt;here is really nothingthat could stop the provider, who has a full control over the kernelor the hypervisor under which our application (or our VM) executes, from reading the contents of our process' memory and stealingthe secrets from there. This is all easy stuff to do from the technical point ofview, and this is also &lt;a href="http://www.schneier.com/blog/archives/2011/12/security_proble_2.html"&gt;not just my own paranoia&lt;/a&gt;... &lt;/div&gt;&lt;span style="font-style: normal;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Plus,there are the usual concerns, such as: is the infrastructure of thecloud provider really that safe and secure, as it is advertised? Howdo we know nobody found an exploitable bug in the hypervisor  and wasnot able to compromise other customer's VMs from within theattacker-hired VM? Perhaps the same question applies if we didn't decided to outsource the apps to a 3&lt;/span&gt;&lt;sup&gt;&lt;span style="font-style: normal;"&gt;rd&lt;/span&gt;&lt;/sup&gt;&lt;span style="font-style: normal;"&gt;party cloud, but in case of a 3&lt;/span&gt;&lt;sup&gt;&lt;span style="font-style: normal;"&gt;rd&lt;/span&gt;&lt;/sup&gt;&lt;span style="font-style: normal;"&gt;party clouds we really don't know about what measures have beenapplied. E.g. does the physical server on which my VMs are hosted also used to host some foreign customers? From China maybe? Youget the point.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Sometimesall we really need is just integrity, e.g. if we wanted to host anopen source code revision system, e.g. a git repository or a fileserver. Remember the &lt;a href="http://www.linuxfoundation.org/news-media/blogs/browse/2011/08/cracking-kernelorg"&gt;kernel.org incident&lt;/a&gt;?On a side note, I find the Jonathan Corbet's self-comforting remarkson how there was really nothing to worry about, to be strikinglynaive... I could easily think of a few examples of how theattacker(s) could have exploited this incident, so that Linus &amp;amp;co. would never (not soon) find out. But that's another story...&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;But, h&lt;/span&gt;&lt;span style="font-style: normal;"&gt;ow can one protect a &lt;i&gt;running&lt;/i&gt; process, or a VM, from apotentially compromised OS, or a hypervisor/VMM?&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Tosome extent, at least theoretically, Intel Trusted ExecutionTechnology (TXT), could be used to implement such protection.Intel TXT can attest to a remote entity, in that case this would bethe cloud customer, about the hash of the hypervisor (or kernel) that has beenloaded on the platform. This means it should be possible for the userto know that the cloud provider uses the unmodified Xen 4.1.1 binaryas the hypervisor and not some modified version, with a built-in FBI backdoor formemory inspection. Ok, it's a poor example, because the Xenarchitecture (and any other commercially used VMM) allow the administrator who controls Dom0 (or equivalent) to essentiallyinspect and modify all the memory in the system, also that belongingto other VMs, and no special backdoors in the hypervisor are needed for this.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;But let's assume hypothetically that Xen 5.0 would change thatarchitecture, and so theDom0 would not be able to access any other VM's memory anymore. Additionally,if we also assumed that the Xen hypervisor was &lt;i&gt;secure&lt;/i&gt;, so that it wasnot possible to exploit any flaw in the hypervior, then we should be fine.Of course, assuming also there were also no flaws in the TXT implementation, and that the SMM was properly sandboxed, or that we trusted (some partsof) the BIOS (these are really complex problems to solve in practice, but I knowthere is some work going on in this area, so there is some hope).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Such aTXT-bases solution, although a step forward, still requires us to trust the cloud provider abit... First, TXT doesn't protect against bus-level physical attacks– think of an attacker who replaces the DRAM dies with some kind ofDRAM emulator – a device that looks like DRAM to the host, but onthe other end allows full inspection/modification of its contents(well, ok, this is still a bit tricky, because of the lack ofsynchronization, but doable).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Additionallyfor Remote Attestation to make any sense, we must somehow know thatwe “talk to” a real TPM, and not to some software-emulated TPM.The idea here is that only a “real” TPM would have access to aprivate key, called Endorsement Key, used for signing during RemoteAttestation procedure (or used during the generation of the AIK key,that can be used alternatively for Remote Attestation). But thenagain who generates (and so: owns) the private endorsement keys? Well,the TPM manufacturer, that can be... some Asian company that we notnecessarily want to trust that much...&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Now we see it would really be advantageous for customers, if Intel decidedto return to the practice of implementing TPM internally inside the chipset, as they did in the past for their Series 4 chipsets (e.g.Q45). This would also protect against the LCP bus-level attacksagainst TPM (although somebody told me recently that TPM in currentsystems cannot be so easily attacked from LCP bus, because of someauthentication protocol being used there – I really don't know, asphysical attacks have not been the area we ever looked atextensively; any comments on that?).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Butthen again, the problem of DRAM content sniffing always remains,although I would consider this to be a complex and expensive attack.So, it seems to me that most governments would be able to bypass suchTXT-ensured guarantees in order to “tap” the user's programsexecuting in the cloud provides that operate within theirjurisdictions. But at least this could stop malicious companies fromstaring up fake cloud services with an intent to easily harvest somesensitive data from unsuspecting users.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;It seems that the only way to solve the above problem of DRAM sniffing attacks is to add some protection at the processor level. We can imagine two solutions that processor vendors could implement:&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;First,they could opt for adding an in-processor hardware mechanism forencrypting all the data that leave the processor, to ensure thateverything the is kept in the DRAM is encrypted (and, of course, alsointegrity-protected), with some private key that never leave the processor. This could be seen as an&amp;nbsp; extension to the Intel TXT.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;This would mean, however, we still needed to relay on:1) the hypervisor to not contain bugs, 2) the whole VMM architectureto properly protect VM's memory, specifically against the Dom0, 3)Intel TXT to not be buggy either, 4) SMM being properly sandboxed, oralternatively to trust (some parts of) the BIOS and SMI handler, 5)TPM's EK key to be non-compromised and verifiable as genuine, and 6)TPM bus attacks made impossible (those two could be achieved bymoving the TPM back onto the chipset, as mentioned above), and finally, 7) on theencryption key used by the processor for data encryption to be safelykept in the processor.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;That'sstill quite a lot of things to trust, and it requires quite a lot of work to make it practically really secure...&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;The other option is a bit more crazy, but also more powerful. Theidea is that the processor might allow to create &lt;/span&gt;&lt;i&gt;untrustedsupervisors&lt;/i&gt;&lt;span style="font-style: normal;"&gt; (or hypervisors).Bringing this down to x86 nomenclature, it would mean that kernelmode (or VT-x root) code cannot sniff or inject code into (crypto-protected) memory of the usermode processes (or VT-x guests).This idea is not as crazy as you might think, and there has even been&lt;a href="http://www.eecg.toronto.edu/%7Elie/papers/lie-sosp2003.pdf"&gt;some academic work&lt;/a&gt; done in this area.Of course, there are many catches here, as this would requirespecifically written and designed applications. And if we everconsidered to use this technology also for client systems (how niceit would be if we could just get rid of some 200-300 kLOC of the Xenhypervisor from the TCB in Qubes OS!), the challenges are evenbigger, mostly relating to safe and secure trusted output (screen)and, especially, input (keyboard, mouse).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Ifthis worked out, then we would need to trust just one element: theprocessor. But we need to trust it &lt;a href="http://theinvisiblethings.blogspot.com/2009/06/more-thoughts-on-cpu-backdoors.html"&gt;anyway&lt;/a&gt;.Of course, we also need to trust some software stack, e.g. thecompilers we use at home to build our application, and the librariesit uses, but that's somehow an unrelated issue. What is important isthat we now would be able to choose that (important) software stackourselves, and don't care about all the other software used by thecloud provider.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;As Iwrote above, the processor is this final element we always need torust. In practice this comes down to also trusting the US government :) But we might imagine users consciously choosing e.g.China-based, or Russia-based cloud providers and require(cryptographically) to run their hosted programs on US-madeprocessors. I guess this could provide reasonable politically-based safety. And there is also ARM, with its licensable processor cores, where, I canimagine, the licensee (e.g. an EU state) would be able to put theirown private key, not known to any other government (here I assume thelicensee also audits the processor RTL for any signs of backdoors). I'm not sure if it would bepossible to hide such a private key from a foundry in Hong Kong, orsomewhere, but luckily there are also some foundries within the EU.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;In anycase, it seems like we could make our cloud computing orders ofmagnitude safer and more secure than what is now. Let's see whetherthe industry will follow this path...&lt;/span&gt;&lt;/div&gt;&lt;span style="font-style: normal;"&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-6975144072797589166?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/6975144072797589166/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=6975144072797589166" title="17 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6975144072797589166" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6975144072797589166" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/12/trusted-execution-in-untrusted-cloud.html" title="Trusted Execution In Untrusted Cloud" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-7845092546778053242</id><published>2011-12-06T10:48:00.001+01:00</published><updated>2011-12-07T10:54:47.901+01:00</updated><title type="text">Exploring new lands on Intel CPUs (SINIT code execution hijacking)</title><content type="html">Today we're releasing a new paper where we describe exploiting a bug in Intel SINIT authenticated code module that allows for arbitrary code execution in what we call an “SINIT mode”. So, to the already pretty-well explored “lands” on Intel processors, that include ring 3 (usermode), ring 0 (kernelmode), ring “-1” (VT-x root), and ring “-2” (SMM), we're now adding a new “island”, the SINIT mode, a previously unexplored territory inhabited so far only by the Intel-blessed opcodes. &lt;br /&gt;&lt;br /&gt;What is really interesting about the attack are the consequences of SINIT mode hijacking, which include ability to bypass Intel TXT, LCP, and also compromise system SMRAM.&lt;br /&gt;&lt;br /&gt;It's also interesting how difficult was this vulnerability for Intel to patch, as they had to release not only updated SINIT modules, but also updated microcode for all the affected processors, and also work with the BIOS vendors so they release updated BIOSes that would be unconditionally loading this updated microcode (plus provide anti-rollback mechanisms for both the BIOS and microcode). Quite an undertaking...&lt;br /&gt;&lt;br /&gt;You can get the paper &lt;a href="http://www.invisiblethingslab.com/resources/2011/Attacking_Intel_TXT_via_SINIT_hijacking.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Intel also published an advisory yesterday, which can be downloaded from their website &lt;a href="http://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00030&amp;amp;languageid=en-fr"&gt;here&lt;/a&gt;. The advisory is peculiar in a few ways, however...&lt;br /&gt;&lt;br /&gt;First, the advisory (I'm referring to the revision 1.0) never explicitly mentions that the attack allows to bypass TXT launch itself, only that the attack “may compromise certain SINIT ACM functionality, including launch control policy and additionally lead to compromise of System Management Mode (SMM). Intel also recommend to disable TXT altogether in the BIOS, as a preventive measure, in case the user doesn't “actively running Intel® TXT”... This reminds me how various vendors started actively disabling Intel VT-x after certain virtualization rootkits have been demonstrated some 5 years ago, and how many laptops still ship with this technology disabled today (or VT-d at least) to the questionable delight of many users.&lt;br /&gt;&lt;br /&gt;Second, the advisory assigns only an “Important” rating to this vulnerability, even though &lt;a href="http://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00021&amp;amp;languageid=en-fr"&gt;another Intel advisory&lt;/a&gt;, published some two years ago for a problem also reported by us, and which which was strictly a &lt;i&gt;subset&lt;/i&gt; of the current vulnerability in terms of powers that it gave to the attacker (in other words the current vulnerability provides the attacker with everything that the previous one did, plus much more), was given a “Critical” rating... This is called evolution, I guess, and I wonder what would be considered critical by Intel these days?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;UPDATE (Dec 7th, 2011):&lt;/b&gt; Intel has just released &lt;a href="http://security-center.intel.com/advisory.aspx?intelid=INTEL-SA-00030&amp;amp;languageid=en-fr"&gt;an updated advisory&lt;/a&gt; (release 1.1) that now explicitly states that the vulnerability also bypasses Intel TXT.&lt;br /&gt;&lt;br /&gt;This is the last paper co-authored with Rafal Wojtczuk, who recently decided to try some new things and to leave ITL. Rafal has been the most talented exploit writer I have worked with, and I will surely miss his ingenious insights, such as e.g. how to practically win an absolutely hopeless race condition with ICMP-delivered MSI! But then again, how many times can one break Intel technologies, before getting bored? At the same time ITL is really transforming now into a development company, with all our efforts around Qubes and architecting, rather than on breaking. I wish Rafal all the best with his new endeavors, and thank him for all the excellent contributions he made while working for ITL over the past 3+ years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-7845092546778053242?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/7845092546778053242/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=7845092546778053242" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7845092546778053242" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7845092546778053242" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/12/exploring-new-lands-on-intel-cpus-sinit.html" title="Exploring new lands on Intel CPUs (SINIT code execution hijacking)" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-2682693250711953422</id><published>2011-09-28T16:36:00.002+02:00</published><updated>2011-10-01T13:19:52.270+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Playing with Qubes Networking for Fun and Profit</title><content type="html">Today, I would like to showcase some of the cool things that one can do with the Qubes networking infrastructure, specifically with all the new features that have been brought by the just released Qubes Beta 2. This will cover the use of multiple Net VMs for creating isolated networks,  the use of a Proxy VM for creating a transparent Tor Proxy VM, as well as demonstration of how to use a Standalone VM with manually assigned devices, to create a “WiFi pen-testing” VM, which surely represents the “for fun” aspect of this post.&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.&lt;/style&gt;&lt;b&gt;Qubes Networking Intro&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From the networking point of view there are three types of VMs in Qubes:&lt;br /&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Net VMs, that have networking  devices assigned to them, such as e.g. a WiFi or Ethernet card. Each  Net VM contains a Xen network backend that is used to provide  networking to all VMs that are connected to this Net VM.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Regular VMs (AppVMs) that use the  networking provided by Net VMs (so they have Xen network frontends  that provide virtual interfaces that are backed by the backend in  the corresponding Net VM.&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div style="margin-bottom: 0in;"&gt;Proxy VMs that combine both of the  above: to Net VMs they look like regular AppVMs, because they are  consumers of the networking they provide, but to other AppVMs they  act as if they were Net VMs themselves, allowing other VMs to  connect to them. Of course the Proxy VMs do not have directly  assigned networking devices – they use the networking provided by  the Net VM that they connect to. One can chain many Proxy VMs, as we  will see below.&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;The virtual interfaces in client VMs are called &lt;/span&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;ethX&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;, and are provided by the &lt;/span&gt;xen_netfront&lt;span style="font-style: normal;"&gt; kernel module, and the corresponding interfaces in the Net/Proxy VM are called &lt;/span&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;vifX.Y&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; and are created by the xen_netback module.&lt;/div&gt;&lt;br /&gt;Each Net and Proxy VM implements NAT, specifically masquerading, for all the connected VMs. Additionally to this SNAT, each Net or Proxy VM provides also DNAT redirection for DNS resolutions, so that each VM behind a Proxy or Net VM thinks that it uses a DNS in the Net/Proxy VM, but in fact all the DNS request are DNAT-ed by all the Proxy and Net VMs down the original DNS that is provided to the final Net VM. This smart trick allows us to avoid running a DNS caching server in Proxy/Net VMs. &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;Also, any VM-to-VM traffic, among the VMs connected to the same Net/Proxy VM is blocked by default.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;Additionally, each Proxy VM enforces system-wide firewaling rules, specifically the rules for all the directly connected VMs. Those firewalling rules are centrally managed in Dom0 and exposed to each Proxy VM through Xen store. One useful application of this firewalling mechanism is to limit certain VMs to only specific type of white-listed traffic to minimize likelihood of user mistakes. A good example could be a work VM that might be limited to network connectivity only with the select corporate servers and denied all other traffic. This way, when the user receives an email message with an embedded http link (possibly leading to a malicious website) and accidentally clicks on it, nothing wrong happens.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;The current infrastructure doesn't support IPv6 routing, but we will likely add this support in the upcoming Beta 3.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;The default networking topology in Qubes OS&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you proceed with the default installation of Qubes Beta 2, then your initial networking topology looks like on the diagram below:&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-HGvCszJ422w/ToMeJm16CMI/AAAAAAAAAJA/CdX1Y-Ct_uc/s1600/qubes-default-net-config.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="272" src="http://3.bp.blogspot.com/-HGvCszJ422w/ToMeJm16CMI/AAAAAAAAAJA/CdX1Y-Ct_uc/s400/qubes-default-net-config.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;The default network configuration in Qubes.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt; So, by default there is one Net VM, called 'netvm', that is automatically assigned all the networking devices in the system. There is also one Proxy VM, called 'firewallvm' that is directly connected to the default Net VM, and which provides networking to all other VMs in the system. This  Proxy VM is used for firewall rules enforcement. Each such service VM consumes 200MB of RAM by default.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Network-isolated VMs&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;For some VMs it might be desirable to completely disconnect them from any kind of networking access. This can be easy done using the following command (issued from Dom0's konsole):&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;[dom0]$ qvm-prefs -s &lt;/span&gt;&lt;i&gt;&lt;appvm name=""&gt;&lt;/appvm&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt; netvm none&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;For example I have a 'vault' VM that I use for keeping my master PGP keys, and other secrets, and this machine is not connected to any network.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Using multiple Net VMs for physically isolated networks&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;In some scenarios the machine might be connected to two or more physically separate networks (e.g. safe corporate intranet, reachable via ethernet cable on the user's desk, and the unsafe and evil Internet, reachable via WiFi card).&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;It is easy to use more than one Net VMs in Qubes, and assign different networking devices to different Net VMs, and also decide which VMs are connected to which Net VMs. The diagram below presents an exemplary such setup:&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-_04df-F5fW0/ToMe2QX_K8I/AAAAAAAAAJE/azWeNG5R5qc/s1600/qubes-multi-netvm-config.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="348" src="http://3.bp.blogspot.com/-_04df-F5fW0/ToMe2QX_K8I/AAAAAAAAAJE/azWeNG5R5qc/s400/qubes-multi-netvm-config.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;A simple setup with two isolated networks, and one fully isolated domain ('vault').&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&amp;nbsp;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;We could created such a setup using the following commands (issued in Dom0):&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-create netvm1 --net --label red&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-create netvm2 --net --label yellow&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Currently &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;qvm-create&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; when used with the &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;--net&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; option automatically assigns all networking devices to the just created VM, so in the example above you would want to remove extra devices from each Net VM using &lt;style type="text/css"&gt;p { margin-bottom: 0.08&lt;/style&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;qvm-pci -d&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;, leaving only those you really want, e.g.:&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-pci -l netvm1 &lt;span style="font-family: DejaVu Serif,serif;"&gt;# to get a list of currently assigned devices&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-pci -d netvm1 02:00.0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Now we should create the Firewall VMs:&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-create firewallvm1 --proxy --label green&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-create firewallvm2 --proxy --label green&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;... and connect them to proper Net VMs:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-prefs -s firewallvm1 netvm netvm1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-prefs -s firewallvm2 netvm netvm2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;And now, for any other VM, just set the appropriate Net VM (either firewallvm1 or firewallvm2, or 'none), to get it assigned to either of the isolated networks, e.g.:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-prefs -s banking netvm firewallvm1&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-prefs -s xfiles netvm firewallvm2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-prefs -s vault netvm none&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;...&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;This configuration provides very strong isolation between the VMs belonging to network #1, and the VMs belonging to network #2. Specifically, this becomes significant if we fear about potential remotely exploitable bugs in the client code of the core TCP/IP stack (in this case the Net VM could potentially compromise all the connected VMs -- but the same problem applies to even physically separated machines that use the same network).&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Setting up Tor Proxy using a Proxy VM&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;Let's now play a bit with Proxy VMs and see how we can use it to create a simple Tor proxy VM. Such a VM would provide anonymized networking to all its clients, so would allow to easily create VMs for anonymous Internet access. The simple setup we would like to prepare is depicted on the figure below:&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-eG2Y4_xJxD0/ToMgWVNiEjI/AAAAAAAAAJI/pWNCiXq-qKs/s1600/qubes-torproxy-config.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-eG2Y4_xJxD0/ToMgWVNiEjI/AAAAAAAAAJI/pWNCiXq-qKs/s400/qubes-torproxy-config.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;The 'torvm' Proxy VM provides anonymized networking to 'anon-web' and 'anon-bitcoin' VMs. All the traffic generated by the VMs behind 'torvm' is either fed into the Tor network, or discarded. Furthermore, any app running in those VMs is not able to read any global system identifiers, such as the external IP, external MAC address, etc.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;br /&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Our Tor proxy would forward only the Tor traffic, so we don't have tofear about some Tor-not-aware applications, or even intentionallymalicious ones to compromise the privacy of our connection. This isbecause such applications have no way to generate traffic to theoutside world without going through our Tor proxy (unless they couldexploit a hypothetical vulnerability in the Tor process running inthe Tor VM). Also, the applications running in any VM behind the Torproxy are not able to determine any globally identifiable IDs, suchas the user's external IP address, the real MAC address used by realNICs, etc.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Interestingly just after writing the above paragraph, I discoveredthat one of our xenstore keys had wrong permissions and, as a result,any VM could read it and get to know the actual external IP (the keyis used by a Net VM to communicate the external IP configuration tothe connected Proxy VMs, so they could know when to update thefirewall configuration). The fix for this problem is &lt;a href="http://git.qubes-os.org/?p=mainstream/core.git;a=commitdiff;h=59f71f634af596c8fe2ef507509bf1ae850286c7"&gt;here&lt;/a&gt;,and the update (qubes-core-dom0-1.6.32) is now available for Dom0(just do &lt;a href="http://wiki.qubes-os.org/trac/wiki/SoftwareUpdateDom0"&gt;qvm-dom0-update&lt;/a&gt;to get it installed).&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&amp;nbsp;				&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;So, this represents a rather strong setup for use with Tor. Let's nowhave a look at how to practically  create such a configuration, stepby step.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;First, let's create the VM that will become our Tor proxy:&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-create torvm --proxy --label green&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;This will create a Proxy VM named 'torvm', based on the defaulttemplate. We will need to now start the template VM and install theTor client there:&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run-a fedora-14-x64 gnome-terminal&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Alternatively, if we didn't trust the Tor client rpm package to benon-malicious, specifically for its installation scripts to be nonmalicious, we could have based this on a different template, e.g. oneused for less trusted VMs, or we could installed the Tor client in&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/usr/local&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,that is backed by the VM's private storage, but this would requirecompiling Tor from sources.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Now, in the just started template VM,lets install the Tor client and (optionally) the Vidalia graphicalfrontend:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[fedora-14-x64]$sudo yum install tor vidalia&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;And then power offthe template VM. Now, every VM based on this template, started afterthe template shutdown, will also see the Tor binary in itsfilesystem.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Let's now configureour torvm to properly start Tor proxying at boot:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run-a torvm gnome-terminal&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Now, we will createthe following script for starting up the Tor transparent proxy andsetting up traffic redirection using iptables:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[torvm]$ vim/rw/config/start_tor_proxy.sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;and now paste thefollowing into this file:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;#!/bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;killall tor&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;QUBES_IP=$(xenstore-readqubes_ip)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;TOR_TRANS_PORT=9040&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;if [ X$QUBES_IP== X ]; then&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;echo"Error getting QUBES IP!"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;echo"Not starting Tor, but setting the traffic redirection anyway toprevent leaks."&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;QUBES_IP="127.0.0.1"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;else&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/usr/bin/tor\&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;--SocksPort0 \&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;--TransListenAddress$QUBES_IP --TransPort $TOR_TRANS_PORT \&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;--DNSListenAddress$QUBES_IP --DNSPort 53 \&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;--RunAsDaemon1 --ControlPort 9051 \&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;|| echo"Error starting Tor!"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;fi&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;echo “0” &amp;gt;/proc/sys/net/ipv4/ip_forward &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-t nat -F&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-t nat -A PREROUTING -i vif+ -p udp --dport 53 -j DNAT--to-destination $QUBES_IP:53&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-t nat -A PREROUTING -i vif+ -p tcp -j DNAT --to-destination$QUBES_IP:$TOR_TRANS_PORT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-I INPUT 1 -i vif+ -p udp --dport 53 -j ACCEPT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-I INPUT 2 -i vif+ -p tcp --dport 9040 -j ACCEPT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/sbin/iptables-F FORWARD&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;echo “1” &amp;gt;/proc/sys/net/ipv4/ip_forward &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Except for the“&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;QUBES_IP=$(xenstore-readqubes_ip)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;” line that reads the torvm'sIP address, there is nothing Qubes-specific in the above listing.It's just a standard way of setting up transparent Tor proxy.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;It is importantthat this file be located in the &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/rw&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;directory, as this directory is backed by the VM's private storageand will survive VM reboots. The VM's root file-system is read-onlyand all the changes to it are lost on VM shutdown (VM gets anillusion of the root fs being writeable thanks to Copy-On-Writemechanism, but the actual COW backing device is cleared upon each VMshutdown).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;We should alsomodify the &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/rw/config/rc.local&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;script, to ensure that our Tor proxy is automatically started -- justpaste the following into this script:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;#!/bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;# Uncommentthis if you would like to use a custom torrc file:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;#rm -f/rw/config/log&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;#ln -sf/rw/config/torrc /etc/tor/torrc&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;chkconfigqubes_netwatcher off&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;chkconfigqubes_firewall off&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/rw/config/start_tor_proxy.sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Finally we shouldalso provide a script that would restart our proxy in case the userdynamically switched the NetVM, which would result in the completelydifferent routing. This could be done by creating a script withpredefined name &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;qubes_ip_change_hook&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;within &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/rw/config/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;directory:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;#!/bin/sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;/rw/config/start_tor_proxy.sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Make sure that all the scripts are executable (chmod +x). And that's all.Now, shutdown the torvm:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run--shutdown --wait torvm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;From now on, everytime you start the torvm (or when Qubes starts it in response tostart of some other VM that uses torvm as its Net VM), the Tortransparent proxy should be automatically started.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Let's test this bycreating a VM that would be using the just created Tor proxy:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-create anon-web --label black&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-prefs -s  anon-web netvm torvm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Now, every time youstart the anon-web VM (e.g. by clicking on the Web browser icon inthe anon-web's start menu), Qubes will also ensure that torvm is upand running, and this in turn would configure all the Tor proxyingfor this VM.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;Fo additionalcontrol one might want to use Vidalia, the graphical front end forTor (this should be installed within the template VM that has beenused for torvm). We could easily start Vidalia by just typing:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run-a torvm vidalia&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: Liberation Serif,serif;"&gt;&lt;span style="font-size: small;"&gt;We should howevermake sure to disable "Start the Tor software when vidaliastarts" option in Settings/General in Vidalia. Otherwise,Vidalia might kill your original Tor (that has transparent proxyopen) and start own without transparent proxy enabled.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-DUPCtbu3svY/ToQpDggfR0I/AAAAAAAAAJc/xRTJYPZusqI/s1600/tor.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-DUPCtbu3svY/ToQpDggfR0I/AAAAAAAAAJc/xRTJYPZusqI/s400/tor.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;The web browser runs in the 'anon-web' VM that uses 'torvm' for networking access, and thus all the traffic generated by 'anon-web' is routed through the Tor network, or discarded if it's a different traffic than TCP or DNS.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Of course one case easily create more VMs that would be using torvmas their Net VM, as so would have anonymized network access. Thebeauty of this solution is that in case one of my anonymized VM getscompromised, others do not. Plus, the already mentioned benefit, thatno matter whether apps in those VMs are buggy, or even intentionallymalicious, they would not be able to leak out the user's external IPaddress.&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Creating a WiFipen-testing VM&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Finally let's have some fun and create a WiFi pen-testing VM. Thedesired config is depicted below:&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-6tMmKe1J2T0/ToQpS-gKzGI/AAAAAAAAAJg/gnrYrarQuMI/s1600/qubes-wififun.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="239" src="http://3.bp.blogspot.com/-6tMmKe1J2T0/ToQpS-gKzGI/AAAAAAAAAJg/gnrYrarQuMI/s320/qubes-wififun.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Because we would like to use all sorts of &lt;strike&gt;l33t h4x0r t00lz&lt;/strike&gt;&lt;span style="text-decoration: none;"&gt;pen-testing security software in this VM, it would make sense tocreate it as a &lt;/span&gt;&lt;span style="text-decoration: none;"&gt;&lt;i&gt;StandaloneVM&lt;/i&gt;&lt;/span&gt;&lt;span style="text-decoration: none;"&gt;, which means thatit would get its own copy of the whole file-system (as opposed tojust the home directory, &lt;/span&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="text-decoration: none;"&gt;/rw&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="text-decoration: none;"&gt;and &lt;/span&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="text-decoration: none;"&gt;/usr/local&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="text-decoration: none;"&gt;,as it is the case with regular Qubes VMs). This would ease theinstallation of all the extra software we would need there, and alsoensure that even if the install/build scripts were malicious, thedamages would be contained only to this very VM and nothing else.Also, for some reason the standard Linux WiFi stack and drivers stilldon't support injection on (all?) most of the WiFi cards out of thebox, so we would need to patch the actual kernel drivers -- yetanother reason to use a Standalone VM in this case.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;So, let's create the VM first, and assign a WiFi card to it:&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-create wififun --standalone --label yellow&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-prefs -s wififun memory 800 &lt;span style="font-family: DejaVu Serif,serif;"&gt;#ensure at least this mem at startup&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$qvm-prefs -s wififun kernel none &lt;span style="font-family: DejaVu Serif,serif;"&gt;#use own copy of kernel and modules&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-pci-a wififun &lt;bdf adress="" device="" of="" wifi="" your=""&gt;&lt;/bdf&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="text-decoration: none;"&gt;Youcan easily find the BDF address of any device using the &lt;/span&gt;&lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="text-decoration: none;"&gt;lspci&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="text-decoration: none;"&gt;command in Dom0 -- this would be something like e.g. “02:00.0”.You should make sure that this WiFi card is not used by any other VM,specifically by your default Net VM (called 'netvm' in a standardQubes installation). Ideally you could just use a dedicated ExpressCard-based WiFi card, leaving the built in WiFi assigned to yourdefault Net VM.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in; text-decoration: none;"&gt;Because it's aStandalone VM, Qubes will make a copy of the whole root filesystem,and thus it would eat about 5GB of your disk (normal VMs would takeonly as much space as their private fs takes up).&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;Let's now start the VM...&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run-a wififun gnome-terminal&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;... and then install the prerequisite software there, starting withdownloading the reasonably new compat-wireless sources, together withthe required injection patches, and then building and installing thenew kernel modules. All actions below are now executed within the VM.This stuff here is really nothing Qubes- or Xen-specific -- one woulddo more or less the same on any Linux in order to get injectionworking (so, treat this as a free bonus WiFi hacking tutorial onLinux).&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ wgethttp://linuxwireless.org/download/compat-wireless-2.6/compat-wireless-2011-07-14.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ wgethttp://patches.aircrack-ng.org/channel-negative-one-maxim.patch&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[wififun]$wgethttp://patches.aircrack-ng.org/mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[wififun]$wgethttp://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ sudoyum install kernel-devel patch gcc&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ tarxjf compat-wireless-2011-07-14.tar.bz2&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ cdcompat-wireless-2011-07-14&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$patch -p1 &amp;lt; ../channel-negative-one-maxim.patch&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[wififun]$patch -p1 &amp;lt; ../mac80211-2.6.29-fix-tx-ctl-no-ack-retry-count.patch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[wififun]$patch -p1 &amp;lt; ../mac80211.compat08082009.wl_frag+ack_v1.patch&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ make&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ sudomake unload&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ sudomake install&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Now, lets reboot the VM to ensure thatall the patched drivers will get properly loaded on each VM boot:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run--shutdown --wait wififun&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[dom0]$ qvm-run-a wififun gnome-terminal&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Let's first see if the WiFi driver got properly loaded and if theinterface has been created (look for &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;wlanX&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;interface):&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ifconfig -a&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;If yes, then proceed with the steps below (if not, then have a lookinto dmesg and see what was the problem):&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ sudobash&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]# yuminstall aircrack-ng dnsmasq&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]#airmon-ng start wlan0 &lt;channel&gt;&lt;/channel&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]#iptables -F INPUT&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]#iptables -F FORWARD&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]# echo“1” &amp;gt; /proc/sys/net/ipv4/ip_forward&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Note that you don't need to add anyexplicit masquerading rules, as they are applied by default on QubesVMs (you can take a look at the &lt;i&gt;nat&lt;/i&gt; table in the VM if youwant to see by yourself).&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Edit the &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;/etc/dnsmasq.conf&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;,so that it contains at least the following:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;interface=at0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;dhcp-range=192.168.0.50,192.168.0.150,12h&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;and then start the dnsmasq daemon -- wewill use it for providing DHCP to our fake AP (the at0 interface willbe created by airbase-ng and emulates the “uplink” of atraditional AP):&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]#/etc/init.d/dnsmasq start&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;And finally the fake AP:&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in; text-decoration: none;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]#airbase-ng -e free_wifi mon0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;and on another console (before anyclient connects, but after &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;airbase-ng&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;got started), configure the &lt;span style="font-family: Liberation Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;at0&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;interface (make sure it matches what you wrote into dnsmasq.conf):&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;[wififun]#&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;ifconfig at0 192.168.0.1 up&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;(you can also add an udev rule to thatautomatically).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;and just to verify it really isworking:&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="text-decoration: none;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;[wififun]#&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;tcpdump -i at0&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;... and now, just wait for a client toconnect to your AP. What you do next is only limited by yourimagination... But hey, this article is about Qubes networking andnot about 0wning client systems ;)&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Here's an innocent example usingMoxie's sslstrip (amazing this attack still works so well at the endof 2011...):&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3StOOvmJ1YI/ToQpdFycIAI/AAAAAAAAAJk/KnOvneQZDjU/s1600/wififun.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="225" src="http://1.bp.blogspot.com/-3StOOvmJ1YI/ToQpdFycIAI/AAAAAAAAAJk/KnOvneQZDjU/s400/wififun.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;My 'wififun' VM in action using a simple sslstrip attack, that surprisingly still works pretty nice...&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;Please note that as your wififun VM is a regular Qubes VM, it isautomatically connected to the default Net VM, which in turn providesnetworking to it. That's why it is so easy to create a fullyfunctioning fake AP.&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;When using custom driver domains, there are currently some catchesyou should be aware:&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Catch #1: &lt;/b&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Whenyou start a driver domain &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;late&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;after system boot, so after some days of uptime and extensive use ofVMs, Xen might not be able to allocate enough continues (in terms ofMFNs) memory for a driver domain. And PV driver domains, unlikenormal domains or HVM driver domains, do require MFN-continuous memory for their DMA buffers (HVM domains do not need that, becauseIOMMU can create an illusion of this; even though IOMMU is also usedfor PV driver domains, for protection, it doesn't actively translatebus addresses into GMFNs).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;This is usually not a bigproblem in practice, because in most cases all the driver domains arestarted early at system boot, when there is still plenty ofnon-fragmented memory available. However it might become a problemwhen one wishes to start e.g. the WiFi pen-testing at some latertime. The work around is to close as many VMs as possible beforestarting such driver domain, and then also reducing, for a moment,the amount of memory assigned to Dom0:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[dom0]$xm mem-set 0 1600m&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;andthen starting the driver domain should be fine. Now we can start allother domains, and that should no longer be problematic for thealready running driver domain.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Catch #2: &lt;/b&gt;&lt;span style="font-weight: normal;"&gt;Somenetwork cards, notably Express Cards, might not work well with the3.0.4 pvops kernel that we use in all VMs by default. In that caseyou might want to try to use the 2.6.38.3 xenlinux kernel in yourWiFi fun VM -- to do that, follow these steps:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[dom0]$sudo qvm-dom0-update kernel-qubes-vm-2.6.38.3-10.xenlinux.qubes&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[dom0]$&lt;/span&gt;&lt;/span&gt;cp /var/lib/qubes/vm-kernels/2.6.38.3/*/var/lib/qubes/appvms/wififun/kernels/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;[dom0]$&lt;/span&gt;&lt;/span&gt;qvm-prefs wififun -s kernelopts "swiotlb=force"&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;And then, in the VM:&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-family: DejaVu Sans Mono,monospace;"&gt;&lt;span style="font-size: x-small;"&gt;[wififun]$ sudoyum install kernel-devel-2.6.38.3-10.xenlinux.qubes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;And rebuild the compat-wireless,unload, install modules, and then load drivers again.&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;b&gt;Summary&lt;/b&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;As you can see, Qubes Beta 2 now offers a very advanced networkinginfrastructure that allows more advanced users to create verysophisticated configurations, allowing for pretty good isolationbetween various domains and networks. Qubes leaves it up to the user(or admin) to figure out what would be the best configuration -- mostusers would be happy with the default simple setup with just one NetVM and one Firewall VM, while others would go for much more advancedsetups.&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-llpRcqX8oBw/ToQpuLMy_HI/AAAAAAAAAJo/3pZ1S-qHupA/s1600/qubes-adv-config.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="291" src="http://2.bp.blogspot.com/-llpRcqX8oBw/ToQpuLMy_HI/AAAAAAAAAJo/3pZ1S-qHupA/s400/qubes-adv-config.png" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;A bit more advanced networking setup. The usbvm has a 3G modem assigned, and it is possible to dynamically switch between the Net VMs without restarting any other VMs.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-2682693250711953422?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/2682693250711953422/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=2682693250711953422" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/2682693250711953422" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/2682693250711953422" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/09/playing-with-qubes-networking-for-fun.html" title="Playing with Qubes Networking for Fun and Profit" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-HGvCszJ422w/ToMeJm16CMI/AAAAAAAAAJA/CdX1Y-Ct_uc/s72-c/qubes-default-net-config.png" height="72" width="72" /><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-8898720712342300501</id><published>2011-09-19T12:52:00.000+02:00</published><updated>2011-09-19T12:52:08.088+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Qubes Beta 2 Released!</title><content type="html">I'm proud to announce that we have just released Qubes Beta 2! You can view installation instructions and download the ISO &lt;a href="http://wiki.qubes-os.org/trac/wiki/InstallationGuide"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;We faced quite a few serious problems with this release that were caused by an upgrade to Xen 4.1 (from Xen 3.4) that we used in Beta 1. But finally we managed to solve all those problems and all in all I'm very happy with this release. It includes many performance optimizations compared to Beta 1 (CPU- and memory-wise) and also many bugfixes.&lt;br /&gt;&lt;br /&gt;We also introduced a couple of new features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Generic mechanism for inter-domain services with a centralized policy enforcement (&lt;a href="http://wiki.qubes-os.org/trac/wiki/Qrexec"&gt;more&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Network-less update mechanism for Dom0 (&lt;a href="http://wiki.qubes-os.org/trac/wiki/Dom0SecureUpdates"&gt;more&lt;/a&gt;) &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;VM management improvements: easy device assignment for driver domains, dynamic netvm switching, flexible VM kernel configuration, etc (see the new qvm-prefs utility)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Easy management of appmenus (shortcuts in the Start Menu)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Update to Xen 4.1 that offers, among other things, better VT-d support and more lightweight management stack (we have ported Qubes to use the new xl now, instead of the slow and heavy xend), and also to 2.6.38-xenlinux kernel for Dom0, and to 3.0.4 pvops kernel for VMs (better hardware compatibility, better power management)&lt;/li&gt;&lt;/ul&gt;I will write some more posts shortly that would present in detail some of the new features and what cool things one could do with them.&lt;br /&gt;&lt;br /&gt;We have also created a &lt;a href="http://wiki.qubes-os.org/trac/wiki/SecurityCriticalCode"&gt;dedicated wiki page&lt;/a&gt; that enumerates all the security-critical code for Qubes OS. We hope this page would be useful for security researchers that might attempt to find weaknesses in Qubes OS either in our code or in the 3rd party code that we rely on (Xen hypervisor, select Xen backends). Whether your motives are noble (gaining immortal fame, helping create a secure client OS), or not (proving ITL wrong), we would appreciate your efforts! And you might even get a job at ITL.&lt;br /&gt;&lt;br /&gt;Speaking of which, I'm happy to announce that Marek Marczykowski, who has effectively become the key Qubes developer over the past few months, has now officially joined ITL :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-8898720712342300501?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/8898720712342300501/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=8898720712342300501" title="10 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8898720712342300501" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8898720712342300501" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/09/qubes-beta-2-released.html" title="Qubes Beta 2 Released!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-5170759851138703204</id><published>2011-09-07T23:56:00.004+02:00</published><updated>2011-09-10T11:42:16.179+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="saving-the-world-afterhours" /><category scheme="http://www.blogger.com/atom/ns#" term="disk encryption" /><category scheme="http://www.blogger.com/atom/ns#" term="tpm" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted execution technology" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted computing" /><title type="text">Anti Evil Maid</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;Anti Evil Maid is an implementation of a TPM-based static trusted boot with a primary goal to prevent &lt;a href="http://theinvisiblethings.blogspot.com/2009/10/evil-maid-goes-after-truecrypt.html"&gt;Evil Maid attacks&lt;/a&gt;.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;The adjective &lt;/span&gt;&lt;i&gt;trusted&lt;/i&gt;&lt;span style="font-style: normal;"&gt;,&lt;/span&gt; in &lt;i&gt;trusted boot&lt;/i&gt;, means that the goal of the mechanism is to somehow attest to a user that only desired (trusted) components have been loaded and executed during the system boot. It's a common mistake to confuse it with what is sometimes called s&lt;i&gt;ecure boot&lt;/i&gt;, whose purpure is to &lt;i&gt;prevent&lt;/i&gt;&lt;span style="font-style: normal;"&gt; any unauthorized component from executing. Secure boot is problematic to implement in practice, because there must be a way to tell which components are authorized for execution. This might be done using digital signatures and some kind of CA infrastructure, but this gets us into problems such as who should run the CA, what should be the policy for issuing certificates, etc.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="background: none repeat scroll 0% 0% transparent; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;The adjective s&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;tatic&lt;/span&gt;&lt;/i&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt; means that the whole &lt;/span&gt;&lt;i&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;chain of trust &lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;is anchored &lt;/span&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;in a special code that executes  before all other code on the platform, and which is kept in a non re-flashable memory, whose sole purpure is to make the initial measurement of the next component that is going to be executed, which is the BIOS code. This special code, also known as Core Root of Trust for Measurement (CRTM), might be part of the BIOS (but kept on a special read-only memory, or implemented by some other entity that executes before the BIOS reset vector, such as e.g. Intel ME or the processor microcode even. Once measured, the BIOS code is executed, and it is now its turn to measures the platform configuration, Option ROM code, and MBR. Then the loader (stored in the MBR), such as Trusted GRUB, takes over and measures its own next stages (other than the MBR sector), and the hypervisor, kernel, and initramfs images that are to be loaded, together with their configuration (e.g. kernel arguments).&lt;/span&gt;&lt;/div&gt;&lt;div style="background: none repeat scroll 0% 0% transparent; font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;As explained above, trusted boot can only retrospectively tell the user whether correct (trusted) software has booted or not, but cannot &lt;/span&gt;&lt;i&gt;prevent &lt;/i&gt;&lt;span style="font-style: normal;"&gt;any software from executing. But how can it communicate anything reliably to the user, if it might have just been compromised? This is possible thanks to the TPM &lt;/span&gt;&lt;i&gt;unseal&lt;/i&gt;&lt;span style="font-style: normal;"&gt; operation that releases secrets to software only if correct software has booted (as indicated by correct hashes in select PCR registers). &lt;/span&gt; &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;So the idea is that if a user can see correct secret message (or perhaps a photo) being displayed on the screen, then it means that correct software must have booted, or otherwise the TPM would not release (&lt;i&gt;&lt;span style="text-decoration: none;"&gt;unseal&lt;/span&gt;&lt;/i&gt;) the secret. Of course we assume the adversary had no other way to sniff this secret and couldn't simply hardcode it into the Evil Maid – more on this later.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Another way to look at it is to realize that Anti Evil Maid is all about &lt;b&gt;authenticating machine to the user&lt;/b&gt;, as opposed to the usual case of authenticating the user to the machine/OS (login and password, decryption key, token, etc). We proceed with booting the machine and entering sensitive information, only after we get confidence it is still &lt;span style="font-style: normal;"&gt;our&lt;/span&gt;&lt;i&gt; trusted &lt;/i&gt;&lt;span style="font-style: normal;"&gt;machine and not some compromised one.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Installing Anti Evil Maid&lt;/b&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Anti Evil Maid should work for any Linux system that uses dracut/initramfs, which includes Qubes, Fedora and probably many other distros. You can find the Anti Evil Maid source code in a git repository &lt;a href="http://git.qubes-os.org/?p=joanna/antievilmaid.git;a=summary"&gt;here&lt;/a&gt;. &lt;span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;You can also download a tarball with sources and prebuilt rpm packages from &lt;a href="http://www.qubes-os.org/files/misc/"&gt;here&lt;/a&gt; (they all should be signed with the &lt;a href="http://wiki.qubes-os.org/trac/wiki/VerifyingSignatures"&gt;Qubes signing key&lt;/a&gt;). Qubes Beta 2, that is coming soon, will have those RPMs already per-installed.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(255, 255, 255);"&gt;To install Anti Evil Maid, follow the instructions in the &lt;a href="http://git.qubes-os.org/?p=joanna/antievilmaid.git;a=blob_plain;f=README;hb=HEAD"&gt;README&lt;/a&gt; file.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Some Practical considerations&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;If you decided to use &lt;b&gt;no password for your TPM SRK key&lt;/b&gt; (so, you passed '-z' to tpm_takeownership, see the README), then you should definitely install Anti Evil Maid on a removable USB stick. Otherwise, if you installed it on your disk boot partition, the attacker would be able to just boot your computer and note down the secret passphrase that will be displayed on the screen. Then the attacker can compromise your BIOS/MBR/kernel images however she likes, and just hardcode the secret passphrase to make it look like if your system was fine.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;If you decided to use custom TPM SRK password (so, you did &lt;i&gt;not &lt;/i&gt;pass -z to tpm_takeownership), then you can install Anti Evil Maid onto your regular boot partition. The attacker would not be able to see your secret passphrase without knowing the SRK password. Now, the attacker can try another Evil Maid attack to steal this password, but this attack is easy to spot and prevent (see the discussion in the next section).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;However, there is still a good argument to install Anti Evil Maid on a separate USB stick rather than on your built-in disk boot partition. This is because you can use Anti Evil Maid as a provider of a keyfile to your LUKS disk encryption (as an additional file unsealable by the TPM). This way you could also stop adversary that  is able to sniff your keystrokes (e.g. using hidden camera, or electromagnetic leak), and capture your disk decryption passphrase (see the discussion in the next section).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;In any case it probably would be a good idea to make a backup stick that you might want to use in case you lose or somehow damage your primary stick. In that case you should have a way to figure out if your system has been compromised in the meantime or not. Use another stick, with another passphrase, and keep it in a vault for this occasion.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Finally, be aware that, depending on which PCRs you decided to seal your secrets to, you might be unable to see the secret even after you changed some minor thing in your BIOS config, such as e.g. the order of boot devices. Every time you change something in your system that affects the boot process, you would need to reseal your secrets to new PCR values as described in the installation instructions.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Attacks prevented by Anti Evil Maid&lt;/b&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;The classic Evil Maid attack is fully prevented.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;If the attacker is able to &lt;span style="font-style: normal;"&gt;steal&lt;/span&gt; your Anti Evil Maid stick, and the attacker gets access to your computer, then the attacker would be able to learn your secret passphrase by just booting from the stolen stick. This is not fatal, because user should get alarmed seeing that the stick has been stolen, and use the backup stick to verify the system (with a different secret messages, of course), and later create a new stick for every day use with a new secret message.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;A variation of the above attack is when the attacker silently &lt;i&gt;copies&lt;/i&gt; &lt;span style="font-style: normal;"&gt;the content of the stick, so that the user cannot realize that someone got access to the stick. Attacker then uses the copied stick to boot the user's computer and this way can learn the secret passphrase. Now, the attacker can infect the computer with Evil Maid, and can also bypass Anti Evil Maid verification by just hardcoding the secret message into Evil Maid. So, even though TPM would know that incorrect software has booted, and even though it would not unseal the secret, the user would have no way of knowing this (as the secret would still be displayed on screen).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;In order to protect against this attack, one might want to use a non-default SRK password – see the installation instructions. Now an extra SRK password would be needed to unseal any secret from the TPM (in addition to PCRs being correct). So the attacker, who doesn't know the SRK password, is now not able to see the secret message and cannot prepare the Evil Maid Attack (doesn't know what secret passphrase to hardcode there).&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal; margin-bottom: 0in;"&gt;The attacker might want to perform an additional Evil Maid attack targeted at capturing this SRK password, e.g. by infecting the user's stick. This, however, could be immediately detected by the user, because the user would see that after entering the correct SRK password, there was no correct secret passphrase displayed. The user should then assume the stick got compromised together with the SRK password, and should start the machine from the backup stick, verify that the backup secret is correct, and then create new AEM stick for daily usage.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;If an attacker is able to capture the user's keystrokes (hidden camera, electromagnetic leaks), the attacker doesn't need Evil Maid attack anymore, and so doesn't need to bother with compromising the system boot anymore. This is because the attacker can just sniff the disk decryption password, and then steal the laptop and will get full access to all user data.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;In order to prevent such a “keystroke sniffing” attack, one can use an additional sealed secret on the Anti Evil Maid stick that would be used as a keyfile for LUKS (in addition to passphrase). In this case the knowledge of the sniffed LUKS passphrase would not be enough for the attacker to decrypt the disk. This has not been implemented, although would be a simple modification to &lt;a href="http://git.qubes-os.org/?p=joanna/antievilmaid.git;a=tree;f=dracut-antievilmaid/90anti-evil-maid;h=0677ca23ec2193fa284a0a25803934514cb28b27;hb=HEAD"&gt;dracut-antievilmaid module&lt;/a&gt;. If you decided to use this approach, don't forget to also create a backup passphrase that doesn't need a keyfile, so that you don't lock yourself from access to your data in case you lose your stick, or upgrade your BIOS, or something! You have been warned, anyway.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Attacks that are still possible&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;An adversary that is able to both: sniff your keystrokes (hidden camera, electromagnetic leak) and is also able to copy/steal/seize your Anti Evil Maid stick, can not be stopped. If a non-democratic government is your adversary, perhaps because you're a freedom fighter in one of those dark countries, then you likely cannot ignore this type of attacks. The only thing you can do, I think, is to use some kind of easy-to-destroy USB stick for keeping Anti Evil Maid. A digestible USB stick, anyone?&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Another type of attack that is not addressed by Anti Evil Maid is an attack that works by removing the “gears” from your laptop (the motherboard and disk at the very least), putting there a fake board with a transmitter that connects back to the attacker's system via some radio link and proxies all the keyboard/screen events and USB ports back to the original “gears” that execute now under supervision of the attacker. Another way of thinking about this attack is as if we took the motherboard and disk away, but kept all the cables connecting them with the laptop's keyboard, screen, and other ports, such as USB (yes, very long cables). The attacker then waits until the user boots the machine, passes the machine-to-user authentications (however sophisticated it was), and finally enters the disk decryption key. In practice I wouldn't worry that much about such an attack, but just mentioning it here for completeness.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Finally, if our adversary is able to extract secret keys from the TPM somehow, e.g. using electron microscope, or via some secret backdoor in the TPM, or alternatively is able to install some hardware device on the motherboard that would be performing TPM reset without resetting the platform, then such an attacker would be able to install Evil Maid program and avoid its detection by SRTM. Still, this doesn't automatically give access to the user data, as the attacker would need to obtain the decryption key first (e.g. using Evil Maid attack).&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Implementation Specific Attacks&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;In the discussion above we assumed that the trusted boot has been correctly implemented. This might not be true, especially in case of the BIOS. In that case we would be talking about attacks against a particular implementation of your BIOS (or TrustedGRUB), and not against Anti Evil Maid approach.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;One typical problem might be related to how CRTM is implemented – if it is kept in a regular BIOS reflashable memory, than the attacker who can find a way to reflash the BIOS (which might be trivial in case your BIOS doesn't check digital signatures on updates) would be able to install Evil Maid in the BIOS but pretend that all hashes are correct, because the attacker controls the root of trust.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Another possible implementation problem might be similar to the &lt;a href="http://invisiblethingslab.com/resources/bh09usa/Attacking%20Intel%20BIOS.pdf"&gt;attack&lt;/a&gt; we used some years ago to reflash a secure Intel BIOS (that verified digital signatures on updates) by presenting a malformed input to the BIOS that caused a buffer overflow and allowed to execute arbitrary code within the BIOS. For such an attack to work, however, the BIOS should not measure the input that is used as an attack vector. I think this was the situation with the logo picture that was used in our attack. Otherwise, even if there was a buffer overflow, the chain of trust would be broken and thus the attack detected. In other words, the possibility of such an attack seems to be rather slim in practice.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;What about Intel TXT?&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;Intel TXT takes an alternative approach to trusted boot. It relies on a &lt;i&gt;Dynamic&lt;/i&gt;&lt;span style="font-style: normal;"&gt; instead of &lt;/span&gt;&lt;i&gt;Static &lt;/i&gt;&lt;span style="font-style: normal;"&gt;Root of Trust for Measurement (DRTM vs. SRTM), which is implemented by the SENTER instruction and special dynamic PCR registers that can be set to zero only by SENTER. Intel TXT doesn't rely anymore on the BIOS or CRTM. This offers a huge advantage that one doesn't need to trust the BIOS, nor the boot loader, and yet can still perform a trusted boot. Amazing, huh?&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;Unfortunately, this amazing property doesn't hold in practice. As &lt;a href="http://invisiblethingslab.com/resources/bh09dc/Attacking%20Intel%20TXT%20-%20paper.pdf"&gt;we have demonstrated almost 3 years ago&lt;/a&gt; (!), it is not really true that Intel TXT can remove the BIOS away from the chain of trust. This is because Intel TXT is prone to attacks through a compromised SMM, and anybody who managed to compromise the BIOS would be trivially able to also compromise the SMM (because it is the BIOS that is supposed to provide the SMI handler).&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Thus, if one compares SRTM with Intel TXT, then the conclusion is that &lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;Intel TXT cannot be more secure than SRTM&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;. This is because if an attacker can compromise the BIOS, then the attacker can also bypass Intel TXT (via a SMM attack). On the other hand, a BIOS compromise alone doesn't automatically allow to bypass SRTM, as it has been discussed in a paragraph above.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;It really is a pity, because otherwise Intel TXT would be just a great technology. Shame on you Intel, really!&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;Alternative approaches to mitigate Evil Maid Attacks&lt;/b&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Various people suggested other methods to prevent Evil Maid attacks, so lets quickly recap and discuss some of them...&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;The most straight forward approach suggested by most people, has been to disable booting from external devices in BIOS, together with locking the BIOS setup with an admin password.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;There are two problems with such an approach. First, all the BIOSes have a long history of so called default passwords (AKA maintenance passwords). You don't want to rely on the lack of BIOS default passwords when protecting your sensitive data, do you?&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Second, even if your BIOS doesn't have a backdoor (maintenance password), it is still possible to just take your disk away and connect to another laptop and infect its boot partition.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Another suggested approach has been to keep your boot partition on a separate USB stick. This solution obviously doesn't take into account the fact that the attacker might install Evil Maid into your BIOS. Many consumer laptop BIOSes do not require digital signatures on BIOS firmware updates (my Sony Vaio Z, a rather high-end machine, is among them), making it simple to install Evil Maid there (the most trivial attack is to make the BIOS always boot from the HDD instead of whatever other device the user wanted to boot from).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Finally, some people pointed out that many modern laptops comes with SATA disks that offer ability to “lock” the disk so that it could only be used with a specific SATA controller. Using this, combined with setting your BIOS to only boot from your internal disk, plus locking access to BIOS setup, should provide reasonable protection. This solution, of course, doesn't solve the problem of a potential maintenance password in your BIOS. Also being skeptical and paranoid as I am, I would not trust this mechanism to be really robust – I would expect it would be fairly simple to unlock the disk so that it could be paired with another, unauthorized controller, and that this probably is a matter of NOP-ing a few instructions in the controller firmware... In fact it seems like you can buy &lt;a href="http://www.hdd-tools.com/products/rrs/"&gt;software to unlock this mechanism&lt;/a&gt; for some $50... And apparently (and not very surprisingly) &lt;a href="http://www.seagateunlock.com/"&gt;some drives seems to continue on the 'default passwords' tradition&lt;/a&gt;.  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;b&gt;FAQ&lt;/b&gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;Q: Bitlocker implemented this already several years ago, right?&lt;br /&gt;A: &lt;a href="http://testlab.sit.fraunhofer.de/content/output/project_results/bitlocker_skimming/"&gt;No&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Q: But, two-factor authentication can also be used to prevent Evil Maid, right?&lt;br /&gt;A: &lt;a href="http://dl.acm.org/citation.cfm?id=1854103&amp;amp;dl=ACM&amp;amp;coll=DL&amp;amp;CFID=41081137&amp;amp;CFTOKEN=11047311"&gt;No&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Q: Does it make any sense to use Anti Evil Maid without a full disk encryption?&lt;br /&gt;A: No.&lt;br /&gt;&lt;br /&gt;Q: Are you going to answer 'no' for  each question I ask?&lt;br /&gt;A: No.&lt;br /&gt;&lt;br /&gt;Q: Why there are no negative indicators (e.g. a big scary warning) when the unseal process fails?&lt;br /&gt;A: The lack of negative indicators is intentional. The user should keep in mind that if somebody compromised their computer, then the attacker would be able to display whatever she wants on the screen, and especially to skip displaying of any warning messages. The only thing the attacker would not be able to display would be the secret message. Thus, it would make no sense to use negative indicators, as they would likely not work in case of a real attack. One solution here would be to use the unsealed secret as a keyfile for disk encryption (as discussed above), which would make it impossible to decrypt the user disk (and so generally proceed with the boot) without successfully unsealing the secret from the TPM.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-5170759851138703204?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/5170759851138703204/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=5170759851138703204" title="24 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/5170759851138703204" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/5170759851138703204" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/09/anti-evil-maid.html" title="Anti Evil Maid" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-6490495664553004297</id><published>2011-08-30T23:06:00.001+02:00</published><updated>2011-09-28T16:37:08.233+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Interview about Qubes OS</title><content type="html">&lt;a href="http://www.tomshardware.com/reviews/qubes-os-joanna-rutkowska-windows,3009.html"&gt;Here&lt;/a&gt; is a recent interview with me for Tom's Hardware, where I talk about Qubes, why virtualization alone does &lt;i&gt;not&lt;/i&gt; automatically bring much security, and why we need it for secure systems anyway, and all that kind of stuff. Nothing really new, but still might be of interest to some readers.&lt;br /&gt;&lt;br /&gt;As for Qubes Beta 2 release -- it really is coming, but we've faced recently some very nasty, race-condition-related problems with new Xen (we bravely switched to Xen 4.1 in Beta 2) that seem to occur on machines with very fast SSDs and we're currently trying to see if we can solve them, or should we instead revert back to Xen 3.4 that we used previously in Beta 1. Except for that, Beta 2 is mostly ready, so we should be releasing it within coming weeks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-6490495664553004297?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/6490495664553004297/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=6490495664553004297" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6490495664553004297" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6490495664553004297" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/08/interview-about-qubes-os.html" title="Interview about Qubes OS" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-7155368799305734593</id><published>2011-06-10T15:02:00.002+02:00</published><updated>2011-07-24T12:09:17.985+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title type="text">My SSTIC 2011 slides</title><content type="html">A few days ago I had a privilege to give an opening keynote at the &lt;a href="http://www.sstic.org/2011/programme/"&gt;SSTIC conference&lt;/a&gt; in Rennes, France, which is believed by many to be the most important security conference in France. You can find my slides &lt;a href="http://www.invisiblethingslab.com/resources/2011/SSTIC%202011.pdf"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;SSTIC seems to be a very interesting conference indeed, with a strong emphasis on system-level security, which is quite unusual these days where most conferences focus on networking, apps, and web-apps. What a pity all those interestingly-looking talks have been encoded in an &lt;a href="http://en.wikipedia.org/wiki/French_language"&gt;obscure language&lt;/a&gt; used only by some 3% of the population of the planet...&lt;br /&gt;&lt;br /&gt;Anyway, it was a pleasure to talk to some &lt;a href="http://www.ssi.gouv.fr/en/"&gt;ANSSI&lt;/a&gt; people I met before the conference (one of the organizers of the event) who really seemed to understand well the challenges we face with building secure operating systems, and generally seemed well versed in the topic. Perhaps some other nations should learn from France, instead of proposing ridiculous and superficial &lt;a href="http://www.bbc.co.uk/news/world-us-canada-13614125"&gt;means&lt;/a&gt; that can't really solve any real problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-7155368799305734593?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/7155368799305734593/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=7155368799305734593" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7155368799305734593" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7155368799305734593" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/06/my-sstic-2011-slides.html" title="My SSTIC 2011 slides" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-3206816702689101078</id><published>2011-06-03T17:16:00.003+02:00</published><updated>2011-07-24T12:08:54.874+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="fighting for a better world" /><title type="text">From Slides to Silicon in 3 years!</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;Remember our Xen 0wning Trilogy at Black Hat in summer 2008, specifically the presentation on &lt;a href="http://invisiblethingslab.com/resources/bh08/part2-full.pdf"&gt;&lt;i&gt;Detecting &amp;amp; Preventing the Xen Hypervisor Subversions&lt;/i&gt;&lt;/a&gt;&lt;span style="font-style: normal;"&gt;?&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;One of the things &lt;a href="http://www.blogger.com/goog_852802259"&gt;&lt;/a&gt;&lt;a href="http://theinvisiblethings.blogspot.com/2008/08/our-xen-0wning-trilogy-highlights.html"&gt;we were discussing&lt;/a&gt; there was a proposal to include an additional restriction to Intel processors that would disallow execution of &lt;/span&gt;&lt;i&gt;usermode&lt;/i&gt;&lt;span style="font-style: normal;"&gt; pages from within &lt;/span&gt;&lt;i&gt;supervisor&lt;/i&gt;&lt;span style="font-style: normal;"&gt; mode (ring0). Such a feature, we argued, apart from obviously making many ring3-to-ring0 exploits much harder, including the very Xen heap overflow exploit we presented in the slides, would also bring us closer to efficient runtime code integrity checkers for kernels and hypervisors, as discussed in the slides.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-style: normal;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UUqClGOWD3w/Tej5DuLF_GI/AAAAAAAAAIE/qBrKYYHJi8M/s1600/slide97" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="156" src="http://2.bp.blogspot.com/-UUqClGOWD3w/Tej5DuLF_GI/AAAAAAAAAIE/qBrKYYHJi8M/s400/slide97" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Slide #97, Detecting and Preventing Xen Hypervisor Subversions, Black Hat USA, July, 2008&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Fast forward 3 years. On June 1&lt;/span&gt;&lt;sup&gt;&lt;span style="font-style: normal;"&gt;st&lt;/span&gt;&lt;/sup&gt;&lt;span style="font-style: normal;"&gt;, 2011, an Intel engineer is submitting a patch for Xen to support a mysterious new processor feature called SMEP (Supervisor Mode Execution Protection). He writes the feature is not yet documented in SDM, but soon will be. In fact, the May 2011 update of Intel SDM already contains the details:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-OQB3mPqycFY/Tej7twiRhPI/AAAAAAAAAIc/nIv8J26rsL4/s1600/sdm-smep" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="48" src="http://3.bp.blogspot.com/-OQB3mPqycFY/Tej7twiRhPI/AAAAAAAAAIc/nIv8J26rsL4/s400/sdm-smep" width="400" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Intel SDM, vol. 3a, May 2011, source: intel.com&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Some other people spotted this feature earlier, because of &lt;a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=de5397ad5b9ad22e2401c4dacdf1bb3b19c05679"&gt;another patch&lt;/a&gt; submitted by another Intel engineer to Linux kernel a few weeks ago. Here's a &lt;a href="http://vulnfactory.org/blog/smep/"&gt;good write up by Dan Rosenberg&lt;/a&gt; discussing how this patch makes writing Linux kernel exploits harder, and how it's still possible to write them.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;The SMEP feature still doesn't seem to be present in the processors available on the market, including the latest Sand Bridge processors, but there's no question it's coming, now that the feature made it into SDM.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;It is quite rewarding to see your idea implemented in a &lt;i&gt;processor&lt;/i&gt;... I guess this is how physicists feel when they introduce a new particle as part of a new quantum model, and later discover evidences to support the existence of this very particle in the wild...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-3206816702689101078?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/3206816702689101078/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=3206816702689101078" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3206816702689101078" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3206816702689101078" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/06/from-slides-to-silicon-in-3-years.html" title="From Slides to Silicon in 3 years!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-UUqClGOWD3w/Tej5DuLF_GI/AAAAAAAAAIE/qBrKYYHJi8M/s72-c/slide97" height="72" width="72" /><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-8736093765434856111</id><published>2011-06-01T01:25:00.001+02:00</published><updated>2011-07-24T12:08:42.903+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="challanges" /><category scheme="http://www.blogger.com/atom/ns#" term="secure architecture" /><category scheme="http://www.blogger.com/atom/ns#" term="usb" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">USB Security Challenges</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;br /&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;When we think about “USB Security” there are lots of things that come to mind...  &lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;First there are all the &lt;i&gt;physical&lt;/i&gt;&lt;span style="font-style: normal;"&gt; attacks that could be conducted with the help of USB devices. These are generally not so interesting, because if one includes physical attacks in the threat model, then it really opens up lots of possibilities of various attacks, and generally a physical attacker always wins. Still, there are a few very cheap and easy physical attacks that one would like to avoid, or make harder, such as the &lt;a href="http://theinvisiblethings.blogspot.com/2009/10/evil-maid-goes-after-truecrypt.html"&gt;Evil Maid Attacks&lt;/a&gt; or the &lt;a href="http://citp.princeton.edu/memory/"&gt;Cold Boot Attacks&lt;/a&gt;. Strictly speaking these are not problems inherent to USB itself, but rather with lack of Trusted Boot, or OS not cleaning properly secrets from memory upon shutdown. They are just made simple thanks to bootable USB sticks.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Much more interesting USB-related physical attacks are those that take advantage of the specifics of the USB standard. One &lt;a href="http://www.blackhat.com/presentations/bh-usa-05/BH_US_05-Barrall-Dewey.pdf"&gt;example&lt;/a&gt; here would be a malicious USB device that exposes intentionally malformed info about itself in order to exploit a potential flaw in a USB Host Controller driver that processes this info upon each new USB device connect. &lt;a href="https://media.blackhat.com/bh-dc-11/Larimer/BlackHat_DC_2011_Larimer_Vulnerabiliters%20w-removeable%20storage-Slides.pdf"&gt;Or&lt;/a&gt; a malicious USB device that would trick the OS (Windows at least) into downloading a known buggy USB driver (or even an intentionally malicious driver, legally submitted to WHQL by the attacker) and then exploit the driver.&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Another class of physical attacks made possible by the USB specification are malicious USB devices that &lt;a href="https://media.blackhat.com/bh-dc-11/Stavrou-Wang/BlackHat_DC_2011_Stavrou_Zhaohui_USB_exploits-Slides.pdf"&gt;pretend to be a keyboard&lt;/a&gt; or mouse. The input devices, such as keyboard, are actually the most security sensitive devices&lt;span style="font-style: normal;"&gt;, because an attacker who controls the keyboard can do everything the user can do, which basically means: can do everything, at least with regards to the user's data.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Finally, the USB, as the names stands, is a &lt;/span&gt;&lt;i&gt;bus&lt;/i&gt;&lt;span style="font-style: normal;"&gt; interconnect, which means all the USB devices sharing the same USB controller are capable of sniffing and spoofing signals on the bus. This is one of the key differences between USB and PCI Express standards, where the latter uses a peer-to-peer interconnect architecture.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Ok, so these all above were &lt;/span&gt;&lt;i&gt;physical&lt;/i&gt;&lt;span style="font-style: normal;"&gt; attacks. Let's now look at, much more fatal, &lt;/span&gt;&lt;i&gt;software&lt;/i&gt;&lt;span style="font-style: normal;"&gt; attacks.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;The infamous class of attacks exploiting various autorun or auto-preview behaviors is the most known example, but also the easiest, at least in theory, to protect against.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Much more interesting are software attacks that attempt to exploit potential flaws in the USB stacks – similarly like the physical attacks mentioned above, just that this time not requiring any hardware-level modifications to the USB device. Exposing a &lt;a href="http://www.securityfocus.com/archive/1/516615"&gt;malformed partition table&lt;/a&gt; is a great example of such an attack. Even if we have all the autorun mechanisms disabled, still, when we're inserting a storage medium the OS &lt;/span&gt;&lt;i&gt;always &lt;/i&gt;&lt;span style="font-style: normal;"&gt;attempts to parse the partition table in order to e.g. create devices symbolizing each partition/volume (e.g. /dev/sdbX devices).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Now, this is really a problematic attack, because the malformed partition table can be written onto a fully legitimate USB stick by malware. Imagine e.g. you have two physically separated machines (air-gapped), belonging to two different security domains, and you want to transfer files from one to another. You insert the USB stick into the first machine, copy files, and then insert the stick to the second machine. If the first machine was compromised, it could have altered the partition table on the USB stick, and now when this stick is inserted into the other machine its malformed partition table might exploit a buffer overflow in the code used by the second OS to parse the stick's partition information. Air-gapped systems, huh? We avoid this attack vector in Qubes by using a special inter-domain &lt;a href="http://wiki.qubes-os.org/trac/wiki/Qfilecopy"&gt;file copy mechanism&lt;/a&gt; that doesn't require any metadata parsing.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;A variation of the above attack would be to expose a malicious file system metadata, but this time the target OS would have to actually mount the partition for the attack to work (and, of course, there would have to be bugs in the OS file system parsing code, although these&amp;nbsp; seem to be quite common on most OSes).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;Having quickly summarized the USB security-related threats, let's now think about how we could design an OS to mitigate most of those attacks, and at the very least the software-based attacks. This is, in fact, precisely the challenge we've been facing in Qubes, so the divagations below necessarily focus mostly on the Qubes architecture.   &lt;br /&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;First we should realize that USB devices, unlike PCI Express devices, &lt;i&gt;cannot&lt;/i&gt; be independently delegated to different domains (VMs). This is because IOMMU technologies, such as Intel VT-d, operate only on PCIe device granularity. This means we can only delegate a whole USB &lt;i&gt;controller&lt;/i&gt;&lt;span style="font-style: normal;"&gt; to a domain, including &lt;/span&gt;&lt;i&gt;all&lt;/i&gt;&lt;span style="font-style: normal;"&gt; of the USB devices connected to this controller/hub.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Imagine now two internal devices, both connected via internal USB bus: a keyboard, and a 3G wireless modem. Chances are high that you will have those two devices connected to the same USB controller – usually one controller is used for all the internal devices, like those I just mentioned, plus camera, fingerprint reader, etc, and the other controller is used for all the externally visible USB connectors (at least this is true for modern systems: Intel Series 5 chipsets and newer).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;We would like to be able to delegate the 3G modem to the NetVM (an &lt;/span&gt;&lt;i&gt;untrusted&lt;/i&gt;&lt;span style="font-style: normal;"&gt; domain on Qubes where all the networking drivers and stacks are kept; it's considered &lt;/span&gt;&lt;i&gt;untrusted&lt;/i&gt;&lt;span style="font-style: normal;"&gt; because its compromise is equivalent to a compromise of a WiFi network or home router, or some other router, and any reasonable person always assumes that the network is compromised, and deals with that using crypto, such as SSL or SSH). But assigning the USB controller, to which the 3G modem is connected to, to the NetVM, would also assign the USB keyboard to the NetVM! And this is precisely what we don't want to do, because control over the keyboard is equivalent to the control over the whole system!&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Currently, in Qubes Beta 1, we keep all the USB controllers assigned to Dom0. This, however, causes two annoyances:&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;First, the user cannot use any of the USB-connected networking devices, such as 3G modems (because there is no networking in Dom0).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Second, if somebody connects a USB disk and later delegates it to some domain (this could easily be done via block-attach mechanism, supported by the same backend that handles storage virtualization for domains), and this domain turns out to be compromised, it might alter e.g. the stick's partition table and later attack Dom0 as explained above.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;We can eliminate the second problem by modifying the Dom0's kernel to not parse the partition table of any removable devices automatically, and instead expect some kind of explicit consent from user to actually do that (we still must allow to mount USB disks in Dom0 to allow easy backups of all domains at once).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;To allow the use of USB-connected networking devices in NetVM, we could use a PVUSB backend that can virtualize single USB devices without moving the whole USB controller to the domain. But that would require introducing a whole lot of new code to Dom0 – code that would be &lt;/span&gt;&lt;i&gt;directly reachable&lt;/i&gt;&lt;span style="font-style: normal;"&gt; from VMs (in other words that would be processing lots of untrusted input coming from untrusted domains).&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;So another option is to delegate all the non-security-critical USB controllers, i.e. those controllers that don't have any security-sensitive USB devices connected, such as keyboard, to a dedicated “USB” domain, and later share the USB devices via PVUSB backend from this USB domain. This time, the extra PVUSB backend runs in the USB domain, not in Dom0, so we don't worry &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;that much&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; about potential bugs in this backend. Of course, this way you cannot delegate the USB controller to which the keyboard, and potentially also other security-critical devices, such as camera, are connected to, which in practice rules out the &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;integrated&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;3G modem. Fortunately many modern laptops do not use USB-connected keyboard and touchpad (they use PS/2-connected keyboards instead), and the face camera can be easily disabled with a piece of sticker (although that sucks, because it means we cannot really use the camera).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;With this approach (a dedicated USB domain) you can now delegate your 3G modem to the NetVM, and other USB devices, such as removable disks to other domains, e.g. for file exchange. This seems the most reasonable setup, although it requires that either 1) your laptop doesn't have USB-connected keyboard, or 2) you don't use internal USB devices connected to the same controller that your USB keyboard/touchpad from other domains than Dom0 (in practice: no 3G modem in NetVM).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;As we can see proper handling of USB devices is quite a challenge for OS architects. It might have been much less of a challenge if the engineers designing the USB, chipsets, and motherboards were a bit more security-conscious. Even such simple practice as never mixing security critical devices (keyboard, touchpad, camera, fingerprint reader), with non-security ones (3G modem), onto the same USB controller, would help tremendously. Or ability to somehow dynamically configure their connectivity, e.g. in BIOS?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-8736093765434856111?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/8736093765434856111/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=8736093765434856111" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8736093765434856111" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8736093765434856111" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/06/usb-security-challenges.html" title="USB Security Challenges" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-2297606500415169677</id><published>2011-05-28T14:56:00.003+02:00</published><updated>2011-07-24T12:08:31.948+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloud" /><category scheme="http://www.blogger.com/atom/ns#" term="philosophical" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="fighting for a better world" /><title type="text">(Un)Trusting the Cloud</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;br /&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Everybody loves The Cloud these days, and it is not hard to understand why. When every person owns computers (devices), the cloud is really hard to beat when it comes to syncing all your digital life back and forth between all those devices, and also sharing with your family members, friends, and colleagues at work. From task lists, through calendars, through &lt;a href="http://www.google.com/intl/en-US/health/about/index.html"&gt;health&lt;/a&gt; &amp;amp; &lt;a href="http://home.trainingpeaks.com/"&gt;fitness&lt;/a&gt; data, to work-related &lt;a href="http://docs.google.com/"&gt;documents&lt;/a&gt;. And I'm not even mentioning all the &lt;i&gt;unencrypted&lt;/i&gt;&lt;span style="font-style: normal;"&gt; email that is out there.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }a:link {  }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;One doesn't need to be especially smart or security conscious to realize how much this might be a threat to security and privacy. How much easier would it be to attack somebody's laptop if I knew precisely in which hotel and when he or she is planning to stay? How much more expensive would my health and life insurance be, if they could get a look at my health and fitness progress? Etc.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;But we're willing to sacrifice our privacy and security in exchange for easy of syncing and sharing of our data. We decide to trust The Cloud. What specifically does that mean?&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;First, it means we trust the particular cloud-based service vendor, such as the provides of our training monitoring app and service. We trust that this vendor is: 1) non-malicious and ethical, and so is not going to sell our private data to some other entity, e.g. insurance company, and 2) that the software written by this vendor is somehow secure, so it would not be easy for an attacker to break into their cloud service and download all the user's data (and then sell to health insurance companies).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Next, we trust the cloud infrastructure provider, such as Amazon EC2. We trust that the cloud provider is 1) non-malicious and ethical, and that they won't really read the memory of the virtual machine on which the previously mentioned cloud-service is running (and won't make it available to a local government officials, e.g. in China), and 2) that they secured their infrastructure properly (e.g. it wouldn't be easy for one customer to “escape” from a VM and read all the memory of the VMs belonging to other customers).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Finally we trust all the infrastructure that is in the middle between us and the service provider, such as e.g. the networking protocols, are safe to use (e.g. we trust all the engineers working in any of the ISP we use won't sniff/spoof our communication, e.g. by using some fake or quasi-fake SSL certs).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;So, that's a hell of a lot of trusting! And the stake is high. Do we really need to make such a sacrifice? Do we really need to hand in all our private data to all those organizations? Of course we don't!&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;First, notice that in majority of cases, the cloud is only used basically as a on-line &lt;i&gt;storage&lt;/i&gt;. No processing, just dump storage. Indeed, what kind of server-side processing does your task list or calender require? Or your freestyle swimming results? Or your conference slides? None.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;And we know for very long how to safely keep secrets on untrusted storage, don't we? This is achieved via encryption (and digital signatures for integrity/authenticity). So, the idea is very simple: let's encrypt all the data &lt;i&gt;before &lt;/i&gt;&lt;span style="font-style: normal;"&gt;we send them to the cloud. The point here is, the encryption must be done by the app that is running on our client device. Not in the cloud, of course.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Ok, so let's say I have my calendar records encrypted in the cloud, how do I share it with my other devices and other people, such as my partner and colleagues at work? Very simple – you encrypt each record with a random symmetric key and then, for every other device or person who you want to grant access to your calendar you make the symmetric key available to this person, by encrypting  it with their public key (if you're paranoid, you can even verify fingerprints using some out-band communication channel, such as phone, to ensure the cloud/service provider didn't do MITM attack on you). What if you want to share only &lt;/span&gt;&lt;i&gt;some&lt;/i&gt;&lt;span style="font-style: normal;"&gt; events (or some details) with some group of people (e.g. only your availability info)? Very simple – just encrypt those records you want to share in non-full access with some other symmetric key and publish only this key to those people/devices you want to grant such non-full access.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Implementing the above would require writing new end-user apps, or plugins for existing apps (such as Outlook), so that they do encryption/decryption/signing/verification before sending the data out to the cloud. But what stops the malicious vendor from offering apps that would be leaking out our secrets, e.g. the keys? Well, nothing actually. But this time, the vendor would need to &lt;/span&gt;&lt;i&gt;explicitly&lt;/i&gt;&lt;span style="font-style: normal;"&gt; build in some kind of backdoor into the app. The same could be done with any other vendor, and any other, non-cloud-based app. After all, how do we know that MS Word, which is not cloud-based yet, is not sending out fragments of our texts to Agent Smith? Note how different this is from a situation when the vendor already &lt;/span&gt;&lt;i&gt;owns&lt;/i&gt;&lt;span style="font-style: normal;"&gt; all our data, unencrypted, brought legitimately to their servers, and all they need to do is to read them from their &lt;/span&gt;&lt;i&gt;own&lt;/i&gt;&lt;span style="font-style: normal;"&gt; disks. No need to plant and distribute any backdoors!&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;In practice few vendors would be risking their reputation and would be willing to build in a backdoor into an app that is then made available to customers. Because every backdoor in such client-exposed code will sooner or later be found (You would really not believe what great lengths all those young people aimed with disassembler and debugger would go to, to win an economy class ticket to the middle of desert in the hottest summer season, just to be able to deliver a presentation on how evil/stupid a company X is ;).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;One problem is, however, with accessing our encrypted cloud over a Web Browser. In contrast to apps, the web browser content is much less &lt;/span&gt;&lt;i&gt;identifiable&lt;/i&gt;&lt;span style="font-style: normal;"&gt;. An app can have a digital signature – everybody know its an App v 1.1, published by X. As explained above it would be rather stupid for X to plant a backdoor into such an app. But a Web-delivered Javascript is much more &lt;/span&gt;&lt;i&gt;tentative&lt;/i&gt;&lt;span style="font-style: normal;"&gt;, and it's very possible for X to e.g. deliver various versions of scripts to different customers. Digital signature on client-side scripts, paired with ability to whitelist allowed client-side-scripts, would likely solve this problem.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;So, why we still haven't got client-side-encrypted cloud-services? The question is rhetorical, of course. Most vendors actually &lt;/span&gt;&lt;i&gt;loves&lt;/i&gt;&lt;span style="font-style: normal;"&gt; the idea of having unlimited access to their customers data. Do you think Google would be happy to give up an opportunity to data mine all your data? This might affect their ad business, &lt;a href="http://www.wired.com/magazine/2010/06/ff_sergeys_search/"&gt;health research&lt;/a&gt;, or just Secret Plan To 0wn The World. After our dead body, I can almost hear them yelling! After all they have just came up with Chrome OS to bring even more data into their data mining machine...&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;To sum it up, there is no technical reason we must entrust all those people with our most private data. Sooner or later somebody will start selling client-side-encrypted cloud services, and I would be the first person to sign up for it. Hopefully it will happen sooner than later (to late?).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;This post also hopefully shows, again, one more aspect – that we can, relatively easy, move most of the IT infrastructure out of the “TCB” (Trusted Computing Base, used as metaphor here). In other words, we can design our systems and services so that we don't need to trust a whole lot of things, including servers and the networking infrastructure (except for its reliability, but not for its security). But, there always remains one element that we must trust – these are our &lt;/span&gt;&lt;i&gt;client devices&lt;/i&gt;&lt;span style="font-style: normal;"&gt;. If they are compromised, the attacker can steal everything.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;span style="font-style: normal;"&gt;Strangely most people still don't get it, or get it &lt;a href="http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2300386"&gt;backwards&lt;/a&gt;. Just the fact that “information is not stored on the iPad but kept safe on the corporate network”, doesn't change anything! Really. If the attacker owns your iPad, then she also can do anything that the legitimate user could do from this iPad. So if you could get to the company's secret trade data from your iPad's Receiver, so would be able to do the malware/attacker.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-2297606500415169677?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/2297606500415169677/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=2297606500415169677" title="22 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/2297606500415169677" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/2297606500415169677" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/05/untrusting-cloud.html" title="(Un)Trusting the Cloud" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-7354555212668635236</id><published>2011-05-21T20:17:00.001+02:00</published><updated>2011-07-24T12:08:19.636+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="philosophical" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">The App-oriented UI Model and its Security Implications</title><content type="html">&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Most of the desktop OSes today, such as Windows or Mac, expose and encourage a &lt;i&gt;File-oriented UI model&lt;/i&gt;. You pick a file in the file manager, click it, and then the file manager automagically determines the best app to handle the file, starts the app, and passes the file to it.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Back in the MS-DOS days we used a different model: an app-oriented model – you started an app first, e.g. Word Perfect, or Lotus 1-2-3, and then you opened a file from within the app (Norton Commander and similar programs somehow changed that later).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;Interestingly this very same app-oriented model is now becoming popular again thanks to systems such as iOS and Android. There is no such thing as a global File Explorer or Finder on an iPad. Only the apps. One must first pick an app, and then it's the application's responsibility to expose an option for opening one of your “files”, if the app supports it (e.g. the calendar or task list apps would always open your default calendar or task list without asking for anything).&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;I actually like this app-oriented model a lot! It's much less confusing to the user. Just think about all those attacks in the past where an attacker could prepare a file with some innocently-looking extension but which in fact was an MZ executable. Or how many times people are not even aware which app they use! One might argue that user should not be distracted by such “unimportant” things as what app he or she uses for her work, but I disagree. Apparently Apple, and millions of iPhone and iPad users, disagree too.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;But the main reason why I like this app-oriented model is because it just fits greatly into the Security by Isolation philosophy.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;Just think about it: if it's possible to get users to consciously select an app, and we now know it is possible thanks to the millions of app-oriented devices sold, then it should be not much more difficult to get them to also consciously select the &lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;domain &lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;or &lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;area&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;, such as “work”, or “personal”, which they wish to use. Just imagine that instead of one “Mail” app, you would have two apps (and two icons): “Mail Work”, and “Mail Personal”.&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;There are some technicalities here – such as e.g. how to isolate apps between each other? Do we need to build another layer of isolation in a form of VMs to isolate “Mail Work” from “Mail Personal”, or should the (new) OSes and the (new) APIs be designed in such a way, that they were thin and secure, and allow for very good isolation between processes without using virtualization?&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;In Qubes we must use this additional layer of abstraction (virtualization), because we want to use Linux apps (and in the future also Windows apps), and they require huge POSIX/X API (and Win32 API) to work correctly. And those APIs are not easily &lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;isolate-able&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;. So we use VMs as “API providers”. Same with isolating networking drivers and stacks – we need Linux kernel API to get those drivers and stacks running, so that's why we use a Linux-based “NetVM” for isolating networking. For this &lt;/span&gt;reason we expect users to explicitly define &lt;i&gt;&lt;span style="font-weight: normal;"&gt;domains&lt;/span&gt;&lt;/i&gt;&lt;span style="font-weight: normal;"&gt;, such as “work”, “personal”, etc. This is because we cannot afford to run every single app in a separate AppVM (more precisely we cannot afford to create a working copy of this huge POSIX/X API for each app).&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;But we could very well imagine a well constructed API for apps that would just be easily &lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;isolate-able&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: normal;"&gt;I'm not saying iOS or Android has such an API)&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, and so there would be no need to define domains explicitly. Still, we would need a possibility to define more than one &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;instance&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; of each app – such as the previously mentioned “Mail Work” and “Mail Personal”.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: normal;"&gt;The app-oriented model seems to be the future. And so seems the Security by Isolation philosophy!&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-7354555212668635236?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/7354555212668635236/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=7354555212668635236" title="7 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7354555212668635236" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7354555212668635236" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/05/app-oriented-ui-model-and-its-security.html" title="The App-oriented UI Model and its Security Implications" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-5608264528014721919</id><published>2011-05-13T19:04:00.001+02:00</published><updated>2011-07-24T12:08:06.132+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="attack" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted computing" /><category scheme="http://www.blogger.com/atom/ns#" term="exploit" /><title type="text">Following the White Rabbit: Software Attacks Against Intel VT-d</title><content type="html">Today we publish a new paper which is a result of our several month long in-depth evaluation of Intel VT-d technology. To quote the abstract:&lt;br /&gt;&lt;blockquote&gt;We discuss three software attacks that might allow for escaping from a VT-d-protected driver domain in a virtualization system. We then focus on one of those attacks, and demonstrate practical and reliable code execution exploit against a Xen system. Finally, we discuss how new hardware from Intel offers a potential for protection against our attacks in the form of Interrupt Remapping (for client systems available only on the very latest Sandy Bridge processors). But we also discuss how this protection could be circumvented on a Xen system under certain circumstances... &lt;/blockquote&gt;&lt;br /&gt;I think the attack is likely the most complex and surprising out of all the things we have presented so far. Parts of it are even funny (if you share our weird sense of humor), such as the use of ICMP ping to generate MSIs. The paper also covers the vendors' response. You can download the paper &lt;a href="http://www.invisiblethingslab.com/resources/2011/Software%20Attacks%20on%20Intel%20VT-d.pdf"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-5608264528014721919?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/5608264528014721919/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=5608264528014721919" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/5608264528014721919" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/5608264528014721919" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/05/following-white-rabbit-software-attacks.html" title="Following the White Rabbit: Software Attacks Against Intel VT-d" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-1548152289459004392</id><published>2011-04-23T16:52:00.008+02:00</published><updated>2011-04-25T23:04:59.505+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><title type="text">The Linux Security Circus: On GUI isolation</title><content type="html">&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;There certainly is one thing that &lt;i&gt;most&lt;/i&gt; Linux users don't realize about their Linux systems... this is the lack of GUI-level isolation, and how it essentially nullifies all the desktop security. I wrote about it a few times, I spoke about it a few times, yet I still come across people who don't realize it all the time.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;So, let me stress this one more time: if you have two GUI applications, e.g. an OpenOffice Word Processor, and a stupid Tetris game, both of which granted access to your screen (your X server), then there is no isolation between those two apps. Even if they run as different user accounts! Even if they are somehow sandboxed by SELinux or whatever! None, zero, null, nil!&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;The X server architecture, designed long time ago by some happy hippies who just thought all the &lt;strike&gt;people &lt;/strike&gt;apps are good and non-malicious, simply allows any GUI application to control any other one. No bugs, no exploits, no tricks, are required. This is all by design. One application can sniff or inject keystrokes to another one, can take snapshots of the screen occupied by windows belonging to another one, etc.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="margin-bottom: 0in;"&gt;&lt;br /&gt;If you don't believe me, I suggest you do a simple experiment. Open a terminal window, as normal user, and run &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;xinput list&lt;/span&gt;, which is a standard diagnostic program for Xorg (on Fedora you will likely need to install it first: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;yum install xorg-x11-apps)&lt;/span&gt;:&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;/div&gt;&lt;br /&gt;$ xinput  list&lt;br /&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;It will show you all the pointer and keyboard devices that your Xorg knows about. Note the ID of the device listed as “AT keyboard” and then run (as normal user!):&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;$ xinput test &lt;i&gt;id&lt;/i&gt;&lt;id&gt;&lt;id&gt;&lt;/id&gt;&lt;id&gt;&lt;/id&gt;&lt;/id&gt;&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;It should now start displaying the scancodes for all the keys you press on the keyboard. If it doesn't, it means you used a wrong device ID.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;Now, for the best, start another terminal window, and switch to root (e.g. using su, or sudo). Notice how the xinput running as user is able to sniff all your keystrokes, including root password (for su), and then all the keystrokes you enter in your root session. Start some GUI app as root, or as different user, again notice how your xinput can sniff all the keystrokes you enter to this other app!&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;Yes, I can understand what is happening in your mind and heart right now... Don't worry, others have also passed through it. Feel free to hate me, throw out insults at me, etc. I don't mind, really (I just won't moderate them). When you calm down, continue reading.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;In Qubes the above problem doesn't exist, because each domain (each AppVM) has it own local, isolated, dummy X server. The main X server, that runs in Dom0 and that handles the real display is never exposed to any of the AppVMs directly (AppVMs cannot connect to it via the X protocol). For details see this&lt;span style="background-color: white;"&gt; &lt;/span&gt;&lt;a href="http://wiki.qubes-os.org/trac/wiki/GUIdocs" style="background-color: white;"&gt;&lt;span style="-moz-background-clip: border; -moz-background-origin: padding; -moz-background-size: auto auto; background-attachment: scroll; background-image: none; background-position: 0% 0%; background-repeat: repeat;"&gt;technical overview&lt;/span&gt;&lt;/a&gt;.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;You can repeat the same experiment in Qubes. You just need to use the ID of the “qubesdev” device, as shown by xinput list (should be 7). Run the xinput in one of your domains, e.g. in the “red” one. Because we actually use the same device for both mouse and keystrokes, you should now see both the key scancodes, as well as all the mouse events. Notice how your xinput is able to sniff all the events that are destined for other apps belonging to the &lt;i&gt;same domain&lt;/i&gt; where you run xinput, and how it is unable to sniff anything targeted to &lt;i&gt;other domains&lt;/i&gt;, or Dom0.&lt;/div&gt;&lt;div style="font-weight: normal; margin-bottom: 0in;"&gt;&lt;br /&gt;BTW, Windows is the only one mainstream OS I'm aware of, that actually attempts to implement some form of GUI-level isolation, starting from Windows Vista. See e.g. this &lt;a href="http://theinvisiblethings.blogspot.com/2007/02/running-vista-every-day.html"&gt;ancient article&lt;/a&gt; I wrote in the days when I used Vista at my primary laptop. Of course, it's still easy to bypass this isolation, because of the huge interface that is exposed to each GUI client (that also includes GPU API). Nevertheless, they at least attempt to prevent this at the architecture level.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-1548152289459004392?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/1548152289459004392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=1548152289459004392" title="27 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1548152289459004392" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1548152289459004392" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/04/linux-security-circus-on-gui-isolation.html" title="The Linux Security Circus: On GUI isolation" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>27</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-3884781202259282494</id><published>2011-04-16T14:29:00.001+02:00</published><updated>2011-07-24T12:07:34.903+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted computing" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><title type="text">Why the US "password revolution" won't work</title><content type="html">So, I've been reading &lt;a href="http://arstechnica.com/tech-policy/news/2011/04/with-passwords-broken-us-rolls-out-internet-identity-plan.ars"&gt;this article&lt;/a&gt; this morning on how the US "private and public" institutions are going to revolutionize the way we authenticate on the web. The "ground breaking" idea, also illustrated on this NIST &lt;a href="http://www.nist.gov/nstic/animation.html"&gt;animation&lt;/a&gt;, is to use 3rd party authorities that would first verify your identity somehow ("Can we see your id?", "What is your Mam's maiden name?", etc), and then would issue you some kind of a token that you would later use for authentication on the web. A token would be e.g. a smart card, or a USB stick (probably they just mean a smart card with USB connector, whatever), or even a "phone application".&lt;br /&gt;&lt;br /&gt;The idea is that the user will not have to "remember" all those passwords for all the various websites, which apparently is a problem in practice, because most users never heard about password manager apps, and so they actually try to &lt;i&gt;remember&lt;/i&gt; all those passwords, or even try to use the same one all over the place. Using one password for more than one website is obviously wrong and people should be told not to do that. But an easy way to solve this is to just get people to use password managers.&lt;br /&gt;&lt;br /&gt;But the key problem that they try to solve, which is &lt;i&gt;identity theft&lt;/i&gt;, is just not gonna be solved by this "password revolution". This is because if somebody has compromised my laptop, then it really doesn't matter if I use passwords, or smart cards, or whatever other multi-factor authentication mechanism -- none of them will help if the attacker controls my operating system.&lt;br /&gt;&lt;br /&gt;Most people cannot just get it -- this is because they lack understanding of how computers and operating systems work. They don't understand that the &lt;i&gt;operating system can impersonate the user at will&lt;/i&gt;! This is because the operating system fully controls the keyboard, the mouse, and the screen.&lt;br /&gt;&lt;br /&gt;So, imagine you use your super-secure smart card token for authentication to your bank. So, before you log into your bank account, and perhaps before you make any transaction on the banking website, you must insert your smart card somewhere (e.g. into smart card reader, or into USB port, etc). Before you insert your token, no one can impersonate you on the bank website. So far, so good! But then, once you inserted your token, it's all lost! The compromised OS could have saved your PIN to this card when you used it previously (even if you configured it not to do so!) and now,&amp;nbsp; immediately, it could use the inserted card to authenticate &lt;i&gt;as you&lt;/i&gt; to the bank and start issuing transactions on your behalf. And you won't even notice this all, because in the meantime it will show you a faked screen of your banking account. After all, it fully controls the screen.&lt;br /&gt;&lt;br /&gt;The bottom line is that &lt;b&gt;we cannot secure our digital lives, if our client operating systems could not be secured first&lt;/b&gt;. And today, the operating systems we use on our laptops, such as Windows, or Mac, or Ubuntu, are just trivial to be compromised by the attackers. After all, if that wasn't true we wouldn't have all those problems with identity theft. But introduction of tokens won't make our operating systems any more secure!&lt;br /&gt;&lt;br /&gt;What we need instead are technologies that allow to build next-generation trusted operating systems. Technologies such as Intel TXT or VT-d. And we need OS vendors to actually start using them.&lt;br /&gt;&lt;br /&gt;You can say I'm biased, because of our work on &lt;a href="http://www.qubes-os.org/"&gt;Qubes OS&lt;/a&gt;. But then, consider this -- perhaps we would never invest so much money and resources into this project, if we believed there are other ways to bring security to our digital life.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-3884781202259282494?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/3884781202259282494/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=3884781202259282494" title="22 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3884781202259282494" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3884781202259282494" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/04/why-us-password-revolution-wont-work.html" title="Why the US &quot;password revolution&quot; won't work" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>22</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-1742367838131028779</id><published>2011-04-12T08:49:00.001+02:00</published><updated>2011-04-25T23:05:12.416+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Qubes Beta 1 has been released!</title><content type="html">I'm very proud to announce that we have just released Qubes Beta 1! Some new features that have come into this release include:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Installer (finally!),&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Improved &lt;a href="http://wiki.qubes-os.org/trac/wiki/TemplateImplementation"&gt;template sharing mechanism&lt;/a&gt;: service VMs can now be based on a common template, and you can now easily create many net- and proxy- VMs; template upgrades now don't require shutting down all the VMs;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt; &lt;i&gt;Standalone&lt;/i&gt; VMs, convenient for development, as well as for installing the least trusted software,&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Built in, easy to use firewall VM(s),&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Seamless integration of virtualized tray icons (check the &lt;a href="http://www.qubes-os.org/Screenshots.html"&gt;screen shots&lt;/a&gt;!)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://wiki.qubes-os.org/trac/wiki/Qfilecopy"&gt;Redesigned&lt;/a&gt; file-copy between domains (easier, more secure),&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Default template based on Fedora 14 (x64)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Reasonably complete &lt;a href="http://wiki.qubes-os.org/trac/wiki/UserDoc"&gt;User Guide&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;... and &lt;i&gt;many&lt;/i&gt; other improvements and bug fixes!&lt;br /&gt;&lt;br /&gt;To download the installation ISO go to &lt;a href="http://wiki.qubes-os.org/trac/wiki/InstallationGuide"&gt;this page&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can also install Qubes on an external USB disk - this might be a convenient option if you want to just try it out, without the need to "sacrifice" your laptop.&lt;br /&gt;&lt;br /&gt;This release is very stable, but we feel that it still requires some more polish, mostly with regards to user interface. We're planning to release at least one more beta, in about 2 months, where we will focus mostly on UI improvements, and also on upgrading Xen and kernel in Dom0 to allow for better hardware support.&lt;br /&gt;&lt;br /&gt;The final Qubes 1.0 is planned after the summer holidays. Once we reach this milestone, further work will likely fork into two branches:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The "commercial branch" which will focus on adding various extensions on top of Qubes 1. One specific commercial extension that we think would be a killer is support for Windows-based domains (AppVMs),&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;The "open source branch" that will continue on implementing even more revolutionary architecture and features, such as untrusted storage domains, safe GPU multiplexing, trusted boot, etc. In the end this should lead to Qubes 2.0 sometime in 2012 or 2013.&lt;/li&gt;&lt;/ul&gt;Cross your fingers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-1742367838131028779?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/1742367838131028779/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=1742367838131028779" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1742367838131028779" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1742367838131028779" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/04/qubes-beta-1-has-been-released.html" title="Qubes Beta 1 has been released!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-6127135461889249331</id><published>2011-03-13T12:11:00.007+01:00</published><updated>2012-01-03T18:12:13.029+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Partitioning my digital life into security domains</title><content type="html">&lt;span style="color: #333333;"&gt;The diagram below illustrates how I have decomposed my digital life into security domains. This is a quite sophisticated scheme and most users would probably want something simpler, but I think it's still interesting to discuss it. The domains are implemented as lightweight AppVMs on Qubes OS. The diagram also shows what type of networking connectivity each domain is allowed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-IJVsMCGYQak/TXypnudUSjI/AAAAAAAAAHQ/o0OUQhixsPs/s1600/qubes%2Bpartitioning%2B-%2Bno%2Bflows.jpg" style="color: #333333;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5583524137983560242" src="http://1.bp.blogspot.com/-IJVsMCGYQak/TXypnudUSjI/AAAAAAAAAHQ/o0OUQhixsPs/s400/qubes%2Bpartitioning%2B-%2Bno%2Bflows.jpg" style="cursor: pointer; display: block; height: 300px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;&lt;br /&gt;&lt;span style="color: #333333;"&gt;Let's discuss this diagram bit by bit. The three basic domains are &lt;/span&gt;&lt;b style="color: #333333;"&gt;work&lt;/b&gt;&lt;span style="color: #333333; font-weight: normal;"&gt; (the green label)&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;, &lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;b&gt;personal&lt;/b&gt;&lt;span style="font-weight: normal;"&gt; (the yellow label), and &lt;/span&gt;&lt;b&gt;red&lt;/b&gt;&lt;span style="font-weight: normal;"&gt; (for doing all the untrusted, insensitive things) – these are marked on the diagram with bold frames.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0&lt;/style&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;A quick digression on domain labels (colors) – in Qubes OS each domain, apart form having a distinct name, is also assigned a &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;label&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, which basically is one of the several per-defined colors. These colors, which are used for drawing window decorations by the trusted Window Manager (color frames), are supposed to be user friendly, easy noticeable, indicators of how trusted a given window is. It's totally up to the user how he or she interprets these colors. For me, it has been somehow obvious to associate the &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;red&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; color with something that is untrusted and dangerous (the “red light” -- stop! danger!), &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;green &lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;with something that is safe and trusted, while &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;yellow &lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;and &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;orange&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; with something in the middle. I have also extended this scheme, to also include &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;blue&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, and &lt;/span&gt;&lt;/span&gt;&lt;i style="color: #333333;"&gt;&lt;span style="font-weight: normal;"&gt;black&lt;/span&gt;&lt;/i&gt;&lt;span style="color: #333333; font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, which I interpret as indicating progressively more trusted domains than green, with black being something  ultimately trusted.&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Back to my domains: the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain is where I have access to my work email, where I keep my work PGP keys, where I prepare reports, slides, papers, etc. I also keep various contracts and NDAs here (yes, these are PDFs, but received from trusted parties via encrypted and signed email – otherwise I open them in &lt;/span&gt;&lt;/span&gt;&lt;a href="http://theinvisiblethings.blogspot.com/2010/06/disposable-vms.html"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Disposable VMs&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;). The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain has only network access to my work email server (SMTP/IMAP4 over SSL), and nothing more.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;For other work-related tasks that require some Web access, such as editing Qubes Wiki, or accepting LinkedIn invites, or downloading cool pictures from fotolia.com for my presentations, or specs and manuals from intel.com, for all this I use &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-pub&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, which I have assigned the yellow label, meaning I consider it only somehow trusted, and I would certainly never put my PGP keys there, or any work-related confidential information.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;personal&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;is where all my non-work related stuff, such as  personal email and calendar, holiday photos, videos, etc, are held. It doesn't really have access to the Web, but if I was into social networking I would then probably allow HTTPS to something like Facebook.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Being somehow on the paranoid side, I also have a special &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;very-personal&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, which I use for the communication with my partner when I'm away from home. We use PGP, of course, and I have a separate PGP keys for this purpose. While we don't discuss any &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;secret and sensitive stuff&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; there, we still prefer to keep our intimate conversations private.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;I use &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;shopping&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; for accessing all the internet e-commerce sites. Basically what defines this domain is access to my credit card numbers and my personal address (for shipping). Because I don't really have a dedicated “corporate” credit card, I do all the shopping in this domain, from groceries, through sports equipment, on hotel/plane reservations ending. If I had separate business credit cards, then I would probably split my &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;shopping&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain into &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;personal-shopping&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; and &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-shopping&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;. I also have &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;banking&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, which I use only for managing my bank account (which again combines both my personal and company accounts).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;I also have a few specialized work-related domains, that I rarely use. The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-admin&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain is used to manage almost all of the ITL servers, such as our webserver, Qubes repo &amp;amp; wiki servers, email server and DNS management, etc. This domain is allowed only SSH traffic to those server, and HTTPS to a few Web-based management servers. The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-blog&lt;/b&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;is used to manage this very blog you're reading now. The reason why it is separate from &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-admin&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; or &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, is because I'm over paranoid, and because I fear that if somebody compromises the blogger service, and subsequently exploits a bug in my browser that I use for editing my blog, than I don't want this person to be able to also get admin access to all the ITL servers. Similarly, if somebody somehow compromised e.g. the Amazon Web Management Console, and then exploited my browser in &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-admin&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;, then I would like at least to retain access to my blog. If I used twitter, I would probably also manage it from this &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-blog&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, unless it was a personal twitter account, in which case I would run it from &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;personal&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;qubes-dev&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain is used for all the Qubes development, merging other developers' branches (after I verify signatures on their tags, of course!), building RPMs/ISOs (yes, Qubes Beta 1 will ship as a DVD ISO!), and finally signing them. Because the signing keys are there, this domain is very sensitive. This domain is allowed only SSH network access to our Qubes git server. Again, even if somebody compromised this Git server, it still would not be a big problem for us, because we sign and verify all the tags in each others repos (unless somebody could also modify the SSH/Git daemons running there so that they subsequently exploit a hypothetical bug in my git client software when I connect to the server).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;I also decided to keep all the accounting-related stuff in a separate domain – whenever I get an invoice I copy it to the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;accounting&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain. The rationale for this is that I trust those PDFs much less than I trust the PDFs I keep in my &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;Once a year I move the old stuff from my &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, such as old email spools, old contracts and NDAs, to the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work-archives&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain. This is to minimize the potential impact of the potential  attack on my &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain (my work domain could be attacked e.g. by exploiting a hypothetical bug in Thunderbird's protocol handshake using a MITM attack, or a hypothetical bug in GPG).&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;vault&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain is an ultimately trusted one where I generate and keep all my passwords (using keepass) and master GPG keys. Of course, this vault domain has no networking access. Most of those passwords, such as the email server access password is also kept in the specific domains which uses them, such as the &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;work &lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;domain, and more specifically in the Thunderbird client (there is absolutely no point in not allowing e.g. Thunderbird to remember the password – if it got compromised it would just steal it the next time I manually enter it)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333;"&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;And finally, there is the previously mentioned &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;red&lt;/b&gt;&lt;/span&gt;&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;domain (I have tried to call it &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;junk&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; or &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;random&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; in the past&lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;, &lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;but I think &lt;/span&gt;&lt;/span&gt;&lt;i&gt;&lt;span style="font-weight: normal;"&gt;red&lt;/span&gt;&lt;/i&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; is still a better name after all). The &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;red &lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;domain is totally untrusted – if it gets compromised, I don't care – I would just recreate it within seconds. I don't even back it up! Basically I do there everything that doesn't fit into other domains, and which doesn't require me to provide any sensitive information. I don't differentiate between work-related and personal-related surfing even – I don't care about anonymity for all those tasks I do there. If I was concerned about anonymity, I would create a separate &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;anonymous&lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt; domain, and proxy all the traffic through a &lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;b&gt;tor proxy &lt;/b&gt;&lt;/span&gt;&lt;span style="font-style: normal;"&gt;&lt;span style="font-weight: normal;"&gt;from there.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Now, this all looks nice and easy ;) but there is one thing that complicates the above picture...&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;b&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Data flows between the domains&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-style: normal;"&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;/div&gt;&lt;div style="font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;The diagram below shows the same domains, but additionally with arrows symbolizing typical data flows between them.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-6iEN6AFqWMU/TXyqaqgbtZI/AAAAAAAAAHY/FScd_uk9uso/s1600/qubes%2Bpartitioning%2B-%2Bdata%2Bflows.jpg" style="color: #333333;"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5583525013096215954" src="http://4.bp.blogspot.com/-6iEN6AFqWMU/TXyqaqgbtZI/AAAAAAAAAHY/FScd_uk9uso/s400/qubes%2Bpartitioning%2B-%2Bdata%2Bflows.jpg" style="cursor: pointer; display: block; height: 300px; margin: 0px auto 10px; text-align: center; width: 400px;" /&gt;&lt;/a&gt;          &lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;You can see that most of the usual data flows are from &lt;i&gt;more trusted&lt;/i&gt; domains to &lt;i&gt;less trusted&lt;/i&gt; domains – e.g. copy and pasting a URL that I receive via email in my &lt;b&gt;work&lt;/b&gt; domain, so that I could open it in my untrusted browser in &lt;b&gt;red&lt;/b&gt;, or moving invoices from my &lt;b&gt;work&lt;/b&gt;&lt;i&gt;&lt;b&gt; &lt;/b&gt;&lt;/i&gt;domain (where I receive them via email) to the &lt;b&gt;accounting&lt;/b&gt; domain.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;But there are, unfortunately, also some transfers from &lt;i&gt;less trusted&lt;/i&gt; domains to &lt;i&gt;more trusted&lt;/i&gt; ones. One example is copy and pasting an interesting URL that I just stumbled upon when surfing in the &lt;b&gt;red&lt;/b&gt; domain, and that I would like to share with a college at work, or a friend, and so I need to copy and paste it to my email client in either &lt;b&gt;work&lt;/b&gt; (colleague) or &lt;b&gt;personal&lt;/b&gt; (friend) domain.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Now, copying data from &lt;i&gt;less trusted&lt;/i&gt; domains to &lt;i&gt;more trusted&lt;/i&gt; ones presents a significant problem. While one could think that pasting an URL into Thunderbird email editor is a pretty harmless operation, it's still is an untrusted input – and we don't really know what the &lt;b&gt;red&lt;/b&gt; domain &lt;i&gt;really &lt;/i&gt;pasted into its local clipboard, and so what we will paste into the &lt;b&gt;work &lt;/b&gt;domain's&lt;b&gt; &lt;/b&gt;Thunderbird email editor (perhaps 64kB of some junk that will overflow some undo buffer in the editor?). And even more scary is the example with copying the cool-looking graphics file from the Web into my &lt;b&gt;work&lt;/b&gt; domain so that I could use it in my presentation slides (e.g. an xkcd . Attacks originating through malicious JPEGs or other graphics format, and exploiting bugs in rendering code have been &lt;a href="http://www.openwall.com/advisories/OW-002-netscape-jpeg/OW-002-netscape-jpeg.txt"&gt;known for more than a decade&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;But this problem – how to handle data flows from less trusted systems to more trusted ones – is not easily solvable in practice, unfortunately... &lt;/span&gt; &lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Some people who design and build high-security systems for use by military and government takes a somehow opposite approach – they say they are not concerned about less-trusted-to-more-trusted data transfers as long as they could assure there is no way to perform a transfer in the opposite direction. So, if we could build a system that guarantees that a more trusted domain can never transfer data to a less trusted domain (even if both of those domains are compromised!), then they are happy to allow one-way “up transfers”. In practice this means we need to eliminate all the covert channels between two &lt;i&gt;cooperating&lt;/i&gt; domains. The word &lt;i&gt;cooperating&lt;/i&gt; is a key word here, and which makes this whole idea not practical at all, IMHO.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Elimination of the covert channels between &lt;i&gt;cooperating&lt;/i&gt; domains is indeed required in this scheme, because the assumption is that the data transfer from the less trusted domain could have indeed compromised the more trusted domain. But this, at least, should not result in any data leak back to the originating domain, and later to the less-classified network, which this less-trusted domain is presumably connected to. One of the assumptions here is that the user of such a system is connected to more than one, isolated networks. Even in that case, elimination of all the covert channels between domains (or at least minimizing their bandwith to something unusable – what is unusable, really?) is a big challenge, and can probably only could be done when we're ready to significantly sacrifice the system's performance (smart scheduling tricks are needed to minimize temporal covert channels).&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;I would like to make it clear that we are not interested in eliminating cooperative covert channels between domains in Qubes any time in the near future, and perhaps in the long term as well. I just don't believe into such approach, and I also don't like that this approach does nothing to preserve the &lt;i&gt;integrity&lt;/i&gt; of the more-trusted domain – it only focuses on the isolation aspect. So, perhaps the attacker might not be able to leak secrets back to the less trusted domain, but he or she can do everything else in this more trusted domain. What good is isolation, if we don't maintain integrity?&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;An alternative solution to handling the less-trusted-to-more-trusted data transfers, is to have trusted “converters” or “verifiers” that could handle specific file types, such as JPEGs, and ensure we get a non-malicious file in the destination domain. While this might remind the bad-old A/V technology, it is something different. Here, the trusted converters would likely be some programs written in a safe language, running in another trusted domain, rather than a big ugly A/V with a huge database of signatures of “bad” patterns of what might appear in a JPEG file. The obvious problem with such an approach is that somebody must write those converters, and write them for all file types that we wish to allow to be transferred to more trusted domains. Perhaps doable in the longer-term, and perhaps we will do it in some future version of Qubes... &lt;/span&gt; &lt;/div&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Right now we are ignoring this problem, and we say that all less-trusted-to-more-trusted transfers are to be done on the user's own risk :) You're welcome to submit trusted converters for your favorite file type(s) in the meantime!&lt;/span&gt;&lt;/div&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="color: #333333; font-style: normal; text-decoration: none;"&gt;&lt;span style="font-size: 100%;"&gt;&lt;b&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Copying files between domains&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;style type="text/css"&gt;p { margin-bottom: 0.08in; }&lt;/style&gt;  &lt;br /&gt;&lt;div style="color: #333333; font-style: normal; font-weight: normal; text-decoration: none;"&gt;&lt;span style="background: none repeat scroll 0% 0% transparent;"&gt;Speaking of copying files between domains, there is another security catch here. If we imagined two physically separated machines that share no common network resources, the only way to move files between those two air-gaped machines would be via something like a USB stick or a CDROM or DVD disc. But inserting a USB drive or CDROM into a machine triggers a whole lot of actions: from parsing device-provided information, loading required drivers (for USB), parsing the driver's partition table, mounting and finally parsing the filesystem. Each of this stage requires the machine's OS to perform a lot of untrusted input processing, and the potential attack space here is quite large. So, even if we could limit ourselves to copy only harmless files between machines/domains (perhaps they were somehow verified by a trusted party in-between, as discussed above), still there is a huge opportunity that the originating domain could compromise the target domain.&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal;"&gt;In Qubes Alpha we have been using a similar file copy mechanism, using a virtual stick for file copy between domains. In Qubes Beta 1 we will provide a new scheme based on same shared memory channel that we use for GUI virtualization – the technical details of this solution will be available soon in &lt;a href="http://wiki.qubes-os.org/trac"&gt;our wiki&lt;/a&gt;. The most sensitive element in this new scheme is the un-cpio-like utility that runs in the target domain and unpacks the incoming blob into the pre-defined directory tree (e.g. &lt;span style="font-family: courier new;"&gt;/home/user/incoming/from-{domainname}/&lt;/span&gt;). We believe we can write pretty safe un-cpio-like utility, in contrast to secure all the previously mentioned elements (USB device parsing, partition parsing, fs parsing). The Qubes Beta 1 is planned to be released at the end of March, BTW.&lt;/div&gt;&lt;div style="color: #333333; font-style: normal;"&gt;&lt;span style="font-size: 100%; font-weight: bold;"&gt;Partitioning enforcement and easy of use&lt;/span&gt;&lt;/div&gt;&lt;div style="color: #333333; font-style: normal;"&gt;&lt;span style="color: #333333;"&gt;For any security partitioning scheme to make sense in real life, it is necessary to have some enforcement mechanism that would ensure that the &lt;/span&gt;&lt;span style="color: #333333; font-style: italic;"&gt;user&lt;/span&gt;&lt;span style="color: #333333; font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style="color: #333333;"&gt;doesn't mistakenly bypass it. Specifically for this purpose we have come up with special, previously-mentioned firewalling support in Qubes&lt;/span&gt;&lt;span style="color: #333333; font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="color: #333333;"&gt;Beta 1&lt;/span&gt;&lt;span style="color: #333333;"&gt;,&lt;/span&gt;&lt;span style="color: #333333; font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="color: #333333;"&gt;that I will cover in a separate article soon.&lt;/span&gt;&lt;/div&gt;&lt;span style="color: #333333;"&gt;Anther thing is to make the partitioning easy to use. For instance, I would like to be able to setup a &lt;/span&gt;&lt;span style="color: #333333;"&gt;hint&lt;/span&gt;&lt;span style="color: #333333; font-style: italic;"&gt; &lt;/span&gt;&lt;span style="color: #333333;"&gt;in the policy, that when I click on an URL in an email I received in my &lt;/span&gt;&lt;span style="color: #333333; font-weight: bold;"&gt;work&lt;/span&gt;&lt;span style="color: #333333;"&gt; domain that it should be automatically opened in the &lt;/span&gt;&lt;span style="color: #333333; font-weight: bold;"&gt;red&lt;/span&gt; domain's default Web browser.&lt;span style="color: #333333;"&gt; Currently we don't do that in Qubes, but we're thinking about doing it in the near future.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #333333; font-weight: bold;"&gt;&lt;span style="font-size: 100%;"&gt;Summary&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #333333;"&gt;Partitioning one's di&lt;/span&gt;&lt;span style="color: #333333;"&gt;gital life into security domains is certainly not an easy process and requires some thinking. This process is also very user-specific. The partitioning scheme that I've come up for myself is quite sophisticated, and most people would probably want something much simpler. In case of corporate deployments, the scheme would be designed by CIO or IT admins, and enforced on users automatically. Much bigger problem are home and small business users, who would need to come up with the partitioning themselves. Perhaps in future versions of Qubes we will provide some ready to use templates for select "typical" groups of users.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-6127135461889249331?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/6127135461889249331/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=6127135461889249331" title="15 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6127135461889249331" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/6127135461889249331" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/03/partitioning-my-digital-life-into.html" title="Partitioning my digital life into security domains" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-IJVsMCGYQak/TXypnudUSjI/AAAAAAAAAHQ/o0OUQhixsPs/s72-c/qubes%2Bpartitioning%2B-%2Bno%2Bflows.jpg" height="72" width="72" /><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-3724428542352438428</id><published>2011-03-08T14:40:00.007+01:00</published><updated>2011-03-13T12:11:55.942+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="personal" /><title type="text">My documents got lost/stolen [offtopic]</title><content type="html">I just realized yesterday that my wallet has disappeared, with all my credit cards, Polish ID card, and driver's license inside. Most likely somebody stole it. No strange transactions have been observed on my credit card accounts yet, but these are generally not much of a concern, thanks to credit card insurance. What is more troubling, is that perhaps some other woman is currently using my stolen ID and the driver's license doing nasty things on my account.&lt;br /&gt;&lt;br /&gt;Apparently there is little one can do in Poland (EU?) in order to invalidate a stolen ID card. While there is an inter-bank Polish-wide database of stolen ID cards, it is being used only by banks, so it can only prevent other people from applying for small loans (for bigger loans, one would need more documents). But there are so many other things one could do, such as renting a car (and then committing a crime with it), signing up a deal with a mobile carrier (and then committing a cyber crime using this phone, or just making a really huge bill), or perhaps buying an SSL cert...&lt;br /&gt;&lt;br /&gt;With apparently no better option left, I decided to write this blog post -- hopefully somebody will find it, e.g. before issuing a Class 2 SSL cert to the fake Joanna Rutkowska.&lt;br /&gt;&lt;br /&gt;Here are the numbers of my lost/stolen documents:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;AFS739530&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;**********5058&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Luckily&lt;span style="font-weight: bold;"&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;I have had my ID details written down somewhere, and the driver's license number I extracted from my Hertz profile.&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;A scene at a police department in Warsaw:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hi, I would like to report my wallet being lost or stolen...&lt;/li&gt;&lt;li&gt;Madam, was your wallet stolen, or have you lost it?&lt;/li&gt;&lt;li&gt;Officer, how could I possibly know this...? If I lost it, do you really think I would remember the very moment of losing it?&lt;/li&gt;&lt;li&gt;Madam, you must be sure whether it was a crime or not!&lt;/li&gt;&lt;li&gt;...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;A scene on the hotline, calling my mobile provider (note that I decided to use the word &lt;span style="font-style: italic;"&gt;stolen&lt;/span&gt; this time):&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Hi, my documents have been stolen -- I would like that you indicate my ID card as invalid in your system (that you hopefully share with other telcom operators)..&lt;br /&gt;&lt;/li&gt;&lt;li&gt;You should report such an incident to the police, Madam...&lt;/li&gt;&lt;li&gt;Right, but I guess that neither you, nor any other mobile provides in Poland will consult a Police database before signing up a contract with a strange person who might be using my stolen documents, correct?&lt;/li&gt;&lt;li&gt;Oh, but we will not sign a contract with a strange person who uses your documents! Only with you!&lt;/li&gt;&lt;li&gt;And how would you know it was not me, if that person was similarly aged and looking, and was using my stolen ID and driver's license?&lt;/li&gt;&lt;li&gt;...&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-3724428542352438428?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/3724428542352438428/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=3724428542352438428" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3724428542352438428" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/3724428542352438428" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2011/03/my-documents-got-loststolen-offtopic.html" title="My documents got lost/stolen [offtopic]" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-1897900981379908689</id><published>2010-12-06T18:23:00.004+01:00</published><updated>2011-01-04T22:52:31.593+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="company news" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Update on Qubes</title><content type="html">It's been a bit quiet on the Qubes development front for the last 2 months. The reason for this was that Rafal and myself got fully engaged in a new commercial research project. After all, we do need to make money somehow, so that we could later spend them on funding Qubes development :)&lt;br /&gt;&lt;br /&gt;But this new engagement is actually closely related to what we do with Qubes (i.e. how new hardware technologies allow to build more secure OSes), so it's not like we're abandoning Qubes, as the experience we get with this research project will surely be useful for us when designing and implementing the Qubes 2.0 architecture.&lt;br /&gt;&lt;br /&gt;In order to continue with Qubes, we've decided to hire some Linux programmers, while Rafal and I will continue with our research project over the coming months. We've decided to start a cooperation with another Polish computer outfit, &lt;a href="http://tls-technologies.com/frontpage_en.php"&gt;TLS Technologies&lt;/a&gt;, who specializes in advanced systems design and implementation.&lt;br /&gt;&lt;br /&gt;There are a couple of people people from TLS engaged in Qubes, and you will soon "meet" them on &lt;a href="https://groups.google.com/group/qubes-devel"&gt;qubes-devel&lt;/a&gt;, in our &lt;a href="http://www.qubes-os.org/trac/"&gt;wiki&lt;/a&gt;, and of course, you will see their contributions in our &lt;a href="http://qubes-os.org/gitweb/"&gt;git repos&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The plan is to have Beta 1 released sometime in January &lt;del&gt;2010&lt;/del&gt;2011. The two important features that will be implemented first, and that will make it into Beta 1 (apart for the long-awaited installer) are: Firewall VMs, and support for templates for service VMs. Stay tuned for more details soon!&lt;br /&gt;&lt;br /&gt;If everything goes smoothly, then we should expect Qubes 1.0 sometime at the end of Q1 2011...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-1897900981379908689?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/1897900981379908689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=1897900981379908689" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1897900981379908689" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1897900981379908689" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/12/update-on-qubes.html" title="Update on Qubes" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-9214464405081236892</id><published>2010-10-06T16:00:00.003+02:00</published><updated>2010-10-06T16:29:07.797+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">Qubes Alpha 3!</title><content type="html">We have just uploaded the new packages for the Qubes Alpha 3 milestone. A lot of under the hood work went into this release, including:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Support for &lt;a href="http://theinvisiblethings.blogspot.com/2010/06/disposable-vms.html"&gt;fast-booting Disposable VM&lt;/a&gt; (see also implementation description &lt;a href="http://www.qubes-os.org/trac/wiki/DVMimpl"&gt;here&lt;/a&gt;)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.qubes-os.org/trac/wiki/Qmemman"&gt;Dynamic memory balancing&lt;/a&gt; between AppVMs&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Redesigned &lt;a href="http://www.qubes-os.org/trac/wiki/QubesNet"&gt;networking &lt;/a&gt;and NetVM support (for VT-d system)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Reasonably stable S3 sleep support (suspend-to-RAM), that works even with a NetVM!&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Improved GUI virtualization (all known bugs fixed finally!)&lt;/li&gt;&lt;/ul&gt;Disposable VMs are really a killer feature IMO. The screenshot below shows the user's experience:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_Ti3q3Hdvels/TKpR7rgoq4I/AAAAAAAAAGw/ARa_TKsWL1E/s1600/disposablevm.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 253px;" src="http://3.bp.blogspot.com/_Ti3q3Hdvels/TKpR7rgoq4I/AAAAAAAAAGw/ARa_TKsWL1E/s320/disposablevm.png" alt="" id="BLOGGER_PHOTO_ID_5524317978657074050" border="0" /&gt;&lt;/a&gt;The user righ-clicks on a PDF file, chooses "Open in Disposable VM", and then waits 1... 2... 3... 4 seconds (assuming a reasonably modern laptop) and the document automagically opens in a fresh new Disposable VM. If you make some changes to the document (e.g. if it was a PDF form, and you edited it), those changes will propagate back to the original file in the original AppVM.&lt;br /&gt;&lt;br /&gt;So, within 4-5 seconds, Qubes creates a new VM, boots it up (actually refreshes from a savefile), copies the file in question to the VM, and finally opens the application that is a registered MIME handler for this type of documents, e.g. a PDF viewer. We're pretty confident this time could be further decreased down to some 2 seconds, or maybe even less. This is planned for some later Beta release.&lt;br /&gt;&lt;br /&gt;Dynamic memory balancing allows to better utilize system physical memory by moving it between running AppVMs in realtime, according to the VM's real needs. This allows to run more VMs, compared to a scheme with static memory allocation, and also dramatically eliminates system hiccups, that otherwise occur often in a static scheme when one of the VMs is short of memory and initiates swapping.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_Ti3q3Hdvels/TKpSgz5-66I/AAAAAAAAAG4/3z-eUmZJwyw/s1600/qmemman.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 151px;" src="http://2.bp.blogspot.com/_Ti3q3Hdvels/TKpSgz5-66I/AAAAAAAAAG4/3z-eUmZJwyw/s320/qmemman.png" alt="" id="BLOGGER_PHOTO_ID_5524318616566033314" border="0" /&gt;&lt;/a&gt;The screenshot above shows the memory usage on my 6GB laptop when writing this blog post. As you can see I can easily run a dozen of AppVMs (most users will not need that many, but I'm a bit more paranoid I guess ;) and could probably even start a few more if there was such a need (e.g. open some Disposable VMs). Of course, this all depends on the actual type of workload the user runs in each VM - most of my AppVMs run just one or two applications, usually a Web browser (Firefox), but some, e.g. the work, and personal AppVMs run much more memory-hungry applications such as Open Office, or Picasa Photo Browser. I very rarely see more than 1 GB of memory allocated to a single VM, though. Generally speaking, the new memory management in Qubes works pretty nice.&lt;br /&gt;&lt;br /&gt;Currently, the biggest slow-down factor for Qubes is somehow poor disk performance, most likely  caused by the joint impact of the Xen backend, Linux dm, and kcryptd (we use the simplest possible Xen block backend for security reasons, will move to more sophisticated backends when we introduce untrusted storage domain in Qubes 2.0).&lt;br /&gt;&lt;br /&gt;Now, most of the under-the-hood work for Qubes 1.0 seems to be complete, and now it time for all the polishing of the user experience, which will be the main focus of the upcoming Beta development. Just reminding that we're currently looking to &lt;a href="http://theinvisiblethings.blogspot.com/2010/09/itl-is-hiring.html"&gt;hire developers&lt;/a&gt; for this effort.&lt;br /&gt;&lt;br /&gt;The Installation instructions can be found &lt;a href="http://www.qubes-os.org/trac/wiki/InstallationGuide"&gt;here&lt;/a&gt;. Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-9214464405081236892?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/9214464405081236892/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=9214464405081236892" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/9214464405081236892" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/9214464405081236892" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/10/qubes-alpha-3.html" title="Qubes Alpha 3!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_Ti3q3Hdvels/TKpR7rgoq4I/AAAAAAAAAGw/ARa_TKsWL1E/s72-c/disposablevm.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-7242870861005515935</id><published>2010-09-28T13:55:00.007+02:00</published><updated>2010-09-28T14:55:22.519+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="company news" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">ITL is hiring!</title><content type="html">We're looking to hire one or two full time developers, who will be working on the open source version of &lt;a href="http://www.qubes-os.org/Home.html"&gt;Qubes OS&lt;/a&gt;, with the primary task of advancing it from Alpha to Beta stage, and then finally to a production quality version.&lt;br /&gt;&lt;br /&gt;We're looking to hire &lt;span style="font-style: italic;"&gt;developers&lt;/span&gt;, not necessarily security researchers! Specifically we expect the following from candidates:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Many years of experience with Linux/GNU development, including system-level and kernel-level Linux development, documented by the actual projects,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Familiarity with virtualization technologies, and specifically with Xen hypervisor,&lt;/li&gt;&lt;li&gt;Basic understanding of the Qubes architecture and excitement about the project :)&lt;/li&gt;&lt;li&gt;Product-oriented approach (polishing, testing, packaging, understanding of user needs),&lt;/li&gt;&lt;li&gt;Good communication skills in written English&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In return we offer the following benefits:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Decent, full-time salary,&lt;/li&gt;&lt;li&gt;Opportunity to be part of a &lt;a href="http://www.invisiblethingslab.com/itl/About.html"&gt;renown security team&lt;/a&gt;,&lt;/li&gt;&lt;li&gt;Opportunity to work on an exciting product,&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Work on a GPLed project with all the benefits it gives to the developer (visibility, rights to the code)&lt;/li&gt;&lt;/ul&gt;If you're interested in joining our team, please send a message to joanna at invisiblethingslab.com.&lt;br /&gt;&lt;br /&gt;Please do not send typical resumes: don't write about schools you finished, certificates you obtained, driving license, scuba trainings, etc. We are only interested in a short bio (keep it below 100 words please), &lt;span style="font-weight: bold;"&gt;and links to your past or current projects&lt;/span&gt;. Include your geographic location.&lt;br /&gt;&lt;br /&gt;While it would be great if you were based in Warsaw (or somewhere in Poland), as it would allow for regular face-to-face meetings, this is not a critical factor. ITL doesn't have a physical office, and everybody work from their apartments, so there is no need to relocate to Warsaw, in case you happened to be based somewhere else.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://xkcd.com/664/"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 206px;" src="http://4.bp.blogspot.com/_Ti3q3Hdvels/TKHbgfsTIKI/AAAAAAAAAGY/x5QFRMysCTE/s400/academia_vs_business.png" alt="" id="BLOGGER_PHOTO_ID_5521935969442537634" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-7242870861005515935?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7242870861005515935" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/7242870861005515935" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/09/itl-is-hiring.html" title="ITL is hiring!" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_Ti3q3Hdvels/TKHbgfsTIKI/AAAAAAAAAGY/x5QFRMysCTE/s72-c/academia_vs_business.png" height="72" width="72" /></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-1723680013954760533</id><published>2010-09-13T16:35:00.006+02:00</published><updated>2010-12-06T18:23:25.754+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><title type="text">On Thin Clients Security</title><content type="html">I'm constantly being asked about it, and so I thought I would write a handy blog post, so I could just referrer to it in the future, when yet anther person asks me if I think the use of Thin Clients is a  game-changer to desktop security...&lt;br /&gt;&lt;br /&gt;It is not! Thin Clients do not improve your desktop security in any way, and that's because:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;You still run a regular full-blown OS, such as Widows and all the regular applications, such as those buggy PDF readers, Web browsers, etc - it's just you run them all on some corporate server, rather on your laptop. The fact that you run the OS on the corporate server, doesn't make it any less prone to compromises, compared to if you run it locally on your laptop.&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;A compromise of your laptop, even if it's just a dump terminal, is still fatal! This is because if your laptop's kernel (or MBR, or BIOS, or some PCI device's firmware, or GPU) is compromised, the attacker can intercept/steal/spoof all the data that you work on remotely, because it is still your laptop that processes the input (keystrokes, mouse events) and output (pixels). So, an Evil Maid attack on your laptop when you use it as a Thin Client, would be just as devastating, as it is otherwise (and don't fool yourselves that crypto tokens &lt;a href="http://portal.acm.org/citation.cfm?id=1854099.1854103"&gt;can help&lt;/a&gt;)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;We really need secure end-user systems, even if we just want to use them as dump terminals only! There is really no way we could skip this step (and e.g. focus only on infrastructure, or services security).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-1723680013954760533?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/1723680013954760533/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=1723680013954760533" title="11 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1723680013954760533" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1723680013954760533" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/09/on-thin-clients-security.html" title="On Thin Clients Security" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-1857218549417302829</id><published>2010-09-09T18:21:00.002+02:00</published><updated>2010-09-09T18:37:57.159+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="os security" /><category scheme="http://www.blogger.com/atom/ns#" term="trusted computing" /><category scheme="http://www.blogger.com/atom/ns#" term="general" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><title type="text">(Un)Trusting your GUI Subsystem</title><content type="html">Why do we need secure desktop systems?  Why support from hardware is necessary to build secure desktop OSes? Does virtualization make things more, or less complex? Why Dynamic RTM (Intel TXT) is better than Static RTM? Can we have untrusted GUI domain/subsystem?&lt;br /&gt;&lt;br /&gt;I tried to cover those questions in my recent keynote at ETISS, and you can grab the slides &lt;a href="http://qubes-os.org/files/doc/etiss.pdf"&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Particularly, the slide #18 presents the idealistic view of an OS that could be achieved through the use of hardware virtualization and trusted boot technologies. It might look very similar to many other pictures of virtualized systems one can see these days, but what makes it special is that all the dark gray boxes represent &lt;span style="font-style:italic;"&gt;untrusted&lt;/span&gt; domains (so, their compromise is not security-critical, except for the potential of a denial-of-service).&lt;br /&gt;&lt;br /&gt;No OS currently implements this architecture, even Qubes. We still have Storage and GUI subsystem in Dom0 (so they are both trusted), although we already know (we think) how to implement the untrusted storage domain (this is described in detail in the arch spec), and the main reason we don't have it now is that TXT market adoption is so poor, that very few people could make use of it.&lt;br /&gt;&lt;br /&gt;The GUI subsystem is, however, a much bigger challenge. When we think about, it should really feel impossible to have an untrusted GUI subsystem, because the GUI subsystem really "sees" all the pixmaps that are to be displayed to the user, so also all the confidential emails, documents, etc. The GUI is different in nature than the networking subsystem, where we can use encrypted protocols to prevent the netvm from sniffing or meaningfully intercepting the application-generated traffic, or the storage subsystem, where we can use fs-encryption and trusted boot technologies to keep the storage domain off from reading or modifying the files used by apps in a meaningful ways. We cannot really encrypt the pixmaps (in the apps, or AppVMs), because for this to work we would need to have graphics cards that would be able to do the decryption and key exchange (note how this is different from the case of an untrusted storage domain, where there is no need for internal hardware encryption!), and the idea of putting, essentially an HTTPS webserver on your GPU is doubtful at best, because it would essentially move the target from the GUI domain to the GPU, and there is really no reason why lots-of-code in the GPU were any harder to attack than lots-of-code in the GUI domain... &lt;br /&gt;&lt;br /&gt;So we came out recently with an idea of a Split I/O model that is also presented in my slides, where we separate the user input (keyboard, mouse), and keep it still in dom0 (trusted domain), from the output (GUI, audio), which is moved into an untrusted GUI domain. We obviously need to make sure that the GUI domain cannot "talk" to other domains, to make sure it cannot "leak out" the secrets that it "sees" while processing the various pixmaps. For this we need to have the hypervisor ensure that all the inter-domain shared pages mapped into the GUI domain are read-only for the GUI domain, and this would imply that we need the GUI protocol, exposed by the GUI domain to other AppVMs, to be unidirectional. &lt;br /&gt;&lt;br /&gt;There are more challenges though, e.g. how to keep the bandwith of timing covert channels, such as those through the CPU caches, between the GUI domain and other AppVMs on a reasonably low level (please note the distinction between a covert channel, which require cooperation of two domains, and a side-channel, which requires just one domain to be malicious - the latter are much more of a theoretical problem, and are of a concern only in some very high security military systems, while the former are easy to implement in practice usually, and present a practical problem in this very scenario).&lt;br /&gt;&lt;br /&gt;Another problem, that was immediately pointed out by the ETISS audience, is that an attacker, who compromised the GUI domain, can manipulate the pixmaps that are being processed in the GUI subsystem to present false picture to the user (remember, the attacker should have no way to send them out anywhere). This includes attacks such as button relabeling ("OK" becomes "Cancel" and the other way around), content manipulation ("$1,000,000" instead of "$100", and vice-versa), security labels spoofing ("red"-labeled windows becoming "green"-labeled), and so on. It's an open question how practical these attacks are, at least when we consider automated attacks, as they require ability to extract some semantics from the pixmaps (where is the button, where is the decoration), as well as understanding the user's actions, intentions, and behavior (just automatically relabeling my Friefox label to "green" would be a poor attack, as I would immediately realize something is going wrong). Nevertheless this is a problem, and I'm not sure how this could be solved with the current hardware architecture.&lt;br /&gt;&lt;br /&gt;But do we really need untrusted GUI domain? That depends. Currently in Qubes the GUI subsystem is located in dom0, and thus it is fully trusted, and this also means that a potential compromise of the GUI subsystem is considered fatal. We try to make an attack on GUI as hard as possible, and this is the reason we have designed and implemented special, very simple GUI protocol that is exposed to other AppVMs (instead of e.g. using the X protocol or VNC). But if we wanted to add some more "features", such as 3D hardware acceleration for the apps (3D acceleration is already available to the Window Manager in Qubes, but not for the apps), then we would not be able to keep the GUI protocol so simple anymore, and this might result in introducing exploitable fatal bugs. So, in that case it would be great to have untrusted GUI domain, because we would be able to provide feature-rich GUI protocols, with all the OpenGL-ish like things, without worrying that somebody might exploit the GUI backend. We would also not need to worry about putting all the various 3rd party software in the GUI domain, such as KDE, Xorg, and various 3rd party GPU drivers, like e.g. NVIDIA's closed source ones, and that some of it might be malicious.&lt;br /&gt;&lt;br /&gt;So, generally, yes, we would like to have untrusted GUI domain - we can live without it, but then we will not have all the fancy 3D acceleration for games, and also need to carefully choose and verify the GUI-related software (which is &lt;span style="font-style:italic;"&gt;lots of&lt;/span&gt; software).&lt;br /&gt;&lt;br /&gt;But perhaps in the next 5 years everybody will have a computer with a few dozens of cores, and also the CPU-to-DRAM bandwidth will be orders of magnitude faster than today, and so there will be no longer a need to offload graphic intensive work to a specialized GPU, because one of our 64 cores will happily do the work? Wouldn't that be a nicer architecture, also for many other reasons (e.g. better utilization of power/circuit real estate)? In that case nobody will need OpenGL, and so there will be no need for a richer GUI protocol than what is already implemented in Qubes...&lt;br /&gt;&lt;br /&gt;It's quite exciting to see what will happen (and what we will come up for Qubes) :)&lt;br /&gt;&lt;br /&gt;BTW, some people might confuse X server &lt;span style="font-style:italic;"&gt;de-privileging&lt;/span&gt; efforts, i.e. making the X server run without root privileges, which is being done in some Linux distros and BSDs, with what had been described in this article, namely making the GUI subsystem &lt;span style="font-style:italic;"&gt;untrusted&lt;/span&gt;. Please note that a de-priviliged X server doesn't really solve any major security problems related to GUI subsystem, as whoever controls ("0wns") the X server (depriviliged or not) can steal or manipulate all the data that this X server is processing/displaying. Apparently there are some reasons why people want to run Xorg as non-root, but in case of typical desktop OSes this provides little security benefit (unless you want to run a few X servers with different user accounts, and on different vt's, which most people would never do anyway).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-1857218549417302829?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://theinvisiblethings.blogspot.com/feeds/1857218549417302829/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=24586388&amp;postID=1857218549417302829" title="12 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1857218549417302829" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/1857218549417302829" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/09/untrusting-your-gui-subsystem.html" title="(Un)Trusting your GUI Subsystem" /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-24586388.post-8797973337920093538</id><published>2010-09-02T10:38:00.005+02:00</published><updated>2010-09-02T12:28:46.891+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="company news" /><category scheme="http://www.blogger.com/atom/ns#" term="qubes" /><category scheme="http://www.blogger.com/atom/ns#" term="conferences" /><title type="text">Qubes, Qubes Pro, and the Future...</title><content type="html">The work on Qubes OS has been extremely exciting and also very challenging for us. While most of the work we have been doing so far relates to solving various technical, under-the-hood challenges, the more important goals in the long-term are related more to mitigating the so called "human factor", i.e. making the system not only easy to use, but tolerant to user absentmindedness. This includes e.g. ensuring the user uses a correct AppVM (e.g. do the banking in the "banking" AppVM, and not in the "random web browsing" AppVM, and also not the other way around: don't do random surfing in the "banking" AppVM), and generally making the whole isolation between AppVMs as seamless as possible, but without sacrificing the security at the same time. &lt;br /&gt;&lt;br /&gt;This is becoming very important, as the technical level of security in Qubes is already very high, and so the "human factor" might easily become a low hanging fruit for the attacker. (&lt;a href="http://theinvisiblethings.blogspot.com/2007/04/human-factor.html"&gt;In contrast to other OSes&lt;/a&gt;) &lt;br /&gt;&lt;br /&gt;But for Qubes to become something more than just an interesting OS for Linux geeks and security enthusiasts, it is also critical to have better application support. Right now Qubes lets users run Linux apps, because each AppVM is Linux-based. But, and let's not be afraid to admit this: Linux sucks when it comes to application support! (Take Open Office as an example - it not only looks like MS Office 97, but is also terribly user-unfriendly, especially their presentation program, the Impress. Why is it so difficult to make it look and behave more like Apple Keynote?)&lt;br /&gt;&lt;br /&gt;There is only one way to provide better application support to Qubes: make it support Windows-based, or Mac-based, AppVMs. Just imagine that: being able to run most of your Windows (or Mac) applications, but at the same time benefit from the Qubes strong isolation and seamless integration on one common desktop...&lt;br /&gt;&lt;br /&gt;In order to implement support for Windows-based AppVMs (or alternatively Mac-based AppVM) we would need to engage significant resources (5+ very skilled developers, working full time for 1+ year), and so we're currently looking for an investor that would be able to provide funding for such an endeavor. The idea is to create a dedicated spin-off company that would focus entirely on Qubes and Qubes Pro, and in the future will make a profit from selling Qubes Pro licenses. Qubes Pro will become a commercial product, still based on the open source Qubes, but adding support for Windows-based or Mac-based AppVMs. I would be happy to discuss the details and business plan via email with interested potential investors.&lt;br /&gt;&lt;br /&gt;Speaking about the future of Qubes: next week I will speak at the European Trusted Infrastructure Summer School, where I will talk about some general stuff like why we need secure desktop systems and why trusted computing might be a way to go, but will also dive a little bit into some new things we plan for Qubes 2.0, such as storage domain and split I/O graphics model. The conference features some very reputable speakers in system-level security field, such as David Grawrock (the father of Intel TXT and TPM), and Loic Duflot (our venerable competitor in the filed of offensive system-level research), so I consider a honour to deliver an opening keynote there (Check the agenda &lt;a href="http://www.isg.rhul.ac.uk/etiss/agenda"&gt;here&lt;/a&gt;). &lt;br /&gt;&lt;br /&gt;I will have my Qubes laptop with me, of course, so if anybody is interested to see Qubes OS live (including Disposable VMs!), I would be happy to do a quick demo on the spot.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/24586388-8797973337920093538?l=theinvisiblethings.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8797973337920093538" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/24586388/posts/default/8797973337920093538" /><link rel="alternate" type="text/html" href="http://theinvisiblethings.blogspot.com/2010/09/qubes-qubes-pro-and-future.html" title="Qubes, Qubes Pro, and the Future..." /><author><name>Joanna Rutkowska</name><uri>http://www.blogger.com/profile/07657268181166351141</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="21" height="32" src="http://3.bp.blogspot.com/-n-lxZoEnaxk/TmfpgeFkrpI/AAAAAAAAAIk/0lOeffOciS0/s220/Joanna%2BRutkowska.jpg" /></author></entry></feed>

