• About Jakob Engblom and this blog
Observations from Uppsala Computer Simulation, Virtual Platforms, Embedded Programming, Multicore and More (by Jakob Engblom)

Building a Spy-Proof OS?

2012 June 16 09:16 / 2 Comments / Jakob

I am not in the computer security business really, but I find the topic very interesting. The recent wide coverage and analysis of the Flame malware has been fascinating to follow. It is incredibly scary to see a “well-resourced (probably Western) nation-state” develop this kind of spyware, following on the confirmation that Stuxnet was made in the US (and Israel).

In any case, regardless of the resources behind the creation of such malware, one wonders if it could not be a bit more contained with a different way to structure our operating systems. In particular, Flame’s use of microphones, webcams, bluetooth, and screenshots to spy on users should be containable. Basically, wouldn’t cell-phone style sandboxing and capabilities settings make sense for a desktop OS too?

It is clear that making access to input units an unprivileged operation in OSes like Windows is a bad idea. At the very least, access to such units should be explicitly granted to each application just like it works (to varying degrees) in mobile OSes. This should prevent an arbitrary process from just starting a camera capture with no notification to the user. It would mean that a piece of spying malware would have to either do some social engineering to trick a user into giving it the privilege or it would have to find some way to break into a trusted program. Unfortunately, I guess a typical PC would be littered with programs with access granted. Skype, for example, would be a nice target for someone looking for access to cameras and mikes. To make use of Skype at all, we would have to grant it both IO and network access rights. Thus, if you can infect into Skype, you have what you need.

To add to security, ideally, hardware should be designed with it in mind. It is a bit strange to consider that Iran seems to have used machines that included cameras and microphones inside secure facilities and other places worth spying on. Still, in a military setting, this can probably be fixed by mandate. But I do not think the threat is limited to just obvious high-profile targets. Industrial espionage and other more common threats are certainly an issue for millions of regular computer users who cannot reasonably be expected not to cameras, audio, and similar functions on their machines.

Imagine, for example, if we made status lights mandatory on all input units (cameras, microphones, etc.) on our machines. And made sure that they were driven by the hardware units themselves, not software that could be subverted. Even better, every time a unit was being asked to start capture, what if you had to confirm this with a special hardware button? Easier and safer than an OS pop-up like Windows UAC. A small added cost in the hardware, certainly, but definitely worth paying for to avoid disasters like schools spying on pupils via their school-issued laptops. You always trade convenience and security, but in this case I think the inconvenience could be limited by some good design. At least for me, hardware buttons for a few well-chosen functions tend to trump software dialogs (on the other hand, I have had to help family and friends who had inadvertently used the hardware wifi-off button on their machines and could not get networking going).

If you look at something like taking screenshots, you also have either a strong capability protection – or just abandon it entirely. It is clear that in general, allowing any program to capture the screen is an insane data leak between supposedly isolated processes. It really should be totally impossible on a secure machine, the OS should not even have the ability to export the state of the screen to programs. It is not a function most people need in their daily work… except… maybe they do. I totally depend on screenshots to do my job. I use screenshots to create documentation, blogs, articles, and report GUI bugs. I do screen recordings to demo our products (and report bugs). I use webex to run presentations and demos over the Internet to avoid travel. So, it seems to be an unavoidable function for helpdesks, bug reports, and professionals. Remains to make sure that programs doing it have to ask for user permission.

Debugging works the same way. A debugger really needs to be able to pry open another process and look at its inner workings. But you really do not want that in case the program doing the prying is malware. However, if you outlaw debugging completely, software development would be more than slightly inconvenienced. Most users could do without these hooks, leaving them active only on software developer’s machines. This leaves software developers a bit more at risk than other users, but these seems to be no way to avoid that.

It points the way towards a future split between development machines and user machines, which is how smartphone and most embedded development works today – but which also to some extent negates the great personal computer revolution. As I see it, one of the truly great features of the home computers and professional personal computers that started to appear in the late 1970s is that the machines could be used to develop software on. Consumption and creation of software happened on the same machine, making it possible to buy one machine and both use other people’s software and build your own. We have taken that for granted for a long time now… but it might be under threat from the wave of designs following Apple’s iOS decision to split consumption and creation.

So what is my conclusion from this rambling? I think we can and should build operating systems that control access to input and output units much more tightly, even on a desktop. But leave open for users to grant privileges for global actions like debug and screenshots to particular programs, in case they need it. A totally segregated OS like a MILS (multiple independent levels of security) probably would work fine as a consumption device, but would not work as a creator and software development device. Maybe an OS can be shipped in “locked down” and “open” mode, a bit like mobile handsets are sometimes provided in very open configurations to developers? That could work to both better protect the innocent masses of regular users, and provide useful power for developers.

My mom does not need to use a debugger, but I certainly do. So why not entirely remove that ability from her machine? I could live with that.

Recommended links on Flame:

  • Ars Technica has a very good series of articles, start at the most recent one and dig backwards. The first one was here.
  • Mikko Hypponen at F-Secure has written a series of very thoughtful blogs, including ones about opening Pandora’s box, and why AV vendors are totally out of their league against something like this. He also noted that it seems that US defense contractors are piling in on an emerging market for virtual weapons.
  • More on the Windows Update propagation from Kaspersky.
Tweet
Posted in: desktop software, programming, security / Tagged: capabilities, Flame, MILS, mobile phones, operating systems, Stuxnet

2 Thoughts on “Building a Spy-Proof OS?”

  1. Emil Vikström on 2012 June 21 at 03:06 said:

    I’m rather intrigued by Qubes OS: http://qubes-os.org/Home.html
    Qubes utilises virtual machines, so that each program can be run in a container with strict rules about what data can travel from one container to another. This is all integrated so the user don’t even recognize that the programs cannot talk to each other. They’ve also abstracted away networking to make it possible to lock down a single program entirely while leaving other programs free to use

    They have a rather interesting blog at http://theinvisiblethings.blogspot.se/

  2. Jakob on 2012 June 21 at 08:47 said:

    Qubes utilises virtual machines, so that each program can be run in a container with strict rules about what data can travel from one container to another.
    This is all integrated so the user don’t even recognize that the programs cannot talk to each other. They’ve also abstracted away networking to make it possible to lock down a single program entirely while leaving other programs free to use

    So basically, it is very strong sandboxing. A bit like a mobile OS, but more pervasive.

    The problem is that this approach works fine for applications that do not need to talk to each other or access local data. But many of the applications we use rely on interactions with each other… screenshots is one obvious example, or just sharing files. An IPhone-style model with its “only one app can access its data” model is horrible for things like editing a document with multiple applications, or just doing simple things like attaching a word document to an email or pushing it to a server or uploading to a webpage in a browser.

    Sandboxing is nice for passive consumption, but for active creation of software and text and pictures and movies, we often cannot have strong sandboxing as we pass data around between many different executables.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation

← Previous Post
Next Post →

Recent Posts

  • Wind River Blog: Simics 4.8 is Here
  • A Few Electrons too Many
  • Wind River Blog: Visuality NQ CIFS Server on Simics
  • Everything in the Cloud?
  • Wind River Blog: TCF and Simics
  • Off-Topic: Moving Bad Piggies Save Games
  • Two Cores, Four Cores, Eight Cores – Mobile Variety
  • Bliss: Failing to Pivot for Ideology
  • Wind River Blog and Movie: Demo of Simics Debugging
  • Simulation vs Reality in Schlock Mercenary
  • Programming like Lego
  • Does ISA Matter for Performance?
  • Wind River Blog: Debugging Simics using Simics
  • Wind River Blog: Simics and Flying Piggies
  • Dragons can be Useful – when AT Models Make Sense

Categories

  • appearances (30)
  • articles (21)
  • blogging (10)
  • books (6)
  • business issues (31)
  • computer architecture (35)
  • conferences (34)
  • EDA (50)
    • ESL (35)
  • embedded (78)
    • embedded software (57)
    • embedded systeme (50)
  • general research (6)
  • history (32)
    • general history (7)
    • history of computing (26)
  • off-topic (94)
    • biking (5)
    • board games (1)
    • computer games (3)
    • desktop software (35)
    • food and drink (1)
    • funny (12)
    • gadgets (24)
    • Politics (3)
    • popular culture (5)
    • trains (5)
    • transportation (10)
    • travel (10)
    • websites (3)
  • parallel computing (92)
    • multicore computer architecture (51)
    • multicore debug (22)
    • multicore software (65)
  • programming (107)
  • review (8)
  • security (19)
  • teaching (7)
  • testing (9)
  • uncategorized (12)
  • virtual things (129)
    • computer simulation technology (68)
    • virtual machines (17)
    • virtual platforms (98)
    • virtualization (14)
  • Wind River Blog (40)

Tags

ARM blog commentary Cadence Checkpointing clock-cycle models Communications of the ACM computer architecture conference cycle accuracy debugging DML Domain-specific languages embedded freescale G900 heterogeneous homogeneous IBM Intel iPod lego linux mobile phones multicore off-topic office 2007 operating systems p4080 podcast commentary power architecture rant research reverse debugging reverse execution S4D SiCS Multicore days Simics simulation software tools Sun SystemC video virtualization Vista Windows

1

  • F-Secure Blog

Blogs and news

  • Andras Vajda's blog (on multicore)
  • Embedded in Academia (John Regehr)
  • Grant Martin
  • Jack Ganssle
  • My Wind River Blog
  • Security Now podcast
  • Secworks (Joachim Strömbergson)
  • Simon Kågström
  • Synopsys View from the Top
  • Worse Than Failure

Archives

  • May 2013 (2)
  • April 2013 (1)
  • March 2013 (4)
  • February 2013 (1)
  • January 2013 (3)
  • December 2012 (2)
  • November 2012 (2)
  • October 2012 (1)
  • September 2012 (6)
  • August 2012 (4)
  • July 2012 (4)
  • June 2012 (3)
  • May 2012 (4)
  • April 2012 (2)
  • March 2012 (3)
  • February 2012 (1)
  • January 2012 (6)
  • December 2011 (2)
  • November 2011 (3)
  • October 2011 (4)
  • September 2011 (5)
  • August 2011 (4)
  • July 2011 (3)
  • June 2011 (4)
  • May 2011 (7)
  • April 2011 (1)
  • March 2011 (3)
  • February 2011 (5)
  • January 2011 (1)
  • December 2010 (4)
  • November 2010 (3)
  • October 2010 (5)
  • September 2010 (5)
  • August 2010 (5)
  • July 2010 (6)
  • June 2010 (5)
  • May 2010 (3)
  • April 2010 (4)
  • March 2010 (3)
  • February 2010 (4)
  • January 2010 (7)
  • December 2009 (6)
  • November 2009 (6)
  • October 2009 (7)
  • September 2009 (6)
  • August 2009 (7)
  • July 2009 (11)
  • June 2009 (5)
  • May 2009 (10)
  • April 2009 (7)
  • March 2009 (8)
  • February 2009 (9)
  • January 2009 (12)
  • December 2008 (8)
  • November 2008 (9)
  • October 2008 (9)
  • September 2008 (10)
  • August 2008 (13)
  • July 2008 (12)
  • June 2008 (8)
  • May 2008 (9)
  • April 2008 (10)
  • March 2008 (7)
  • February 2008 (8)
  • January 2008 (5)
  • December 2007 (5)
  • November 2007 (7)
  • October 2007 (7)
  • September 2007 (12)
  • August 2007 (9)
  • July 2007 (2)
© Copyright 2013 - Observations from Uppsala
Infinity Theme by DesignCoral / WordPress