Microsoft turns Web Sandbox loose

Opinion
Feb 4, 20093 mins

* Web Sandbox looks to solve the browser security problem

In a notable, and some might say uncharacteristic move, Microsoft has released the Live Labs Web Sandbox project source code under the Apache License 2.0.

Web Sandbox is a solution to the problem of how to isolate Web content from third parties that is incorporated into Web pages so that malicious code and exploits are walled off from secure content.

As the Microsoft Live Labs Web Sandbox site explains the challenge is that “Today Web gadgets, mashup components, advertisements, and other 3rd party content on Web sites either run with full trust alongside your content or are isolated inside of IFrames. As a result, many modern Web applications are intrinsically insecure, often with unpredictable service quality.”

Microsoft announced a technology preview of Web Sandbox in October at the company’s Professional Developer Conference in Los Angeles and is now trying to encourage developers to work with Sandbox in an attempt to see if and how the system can be “broken.”A core goal of Sandbox is to make the security model “as unobtrusive as possible.” As such the Sandbox approach is based on using existing Web development methodologies and technologies – this means there’s no SDK so Web content that is managed by Sandbox requires no modification and isn’t aware of the fact that Sandbox is in control.

Web Sandbox works by using JavaScript and a Web service or Microsoft’s Silverlight (Microsoft’s answer to Adobe’s Flash) to grab the HTML, CSS, and JavaScript in each chunk of content that is added to a Web page and “box” it – put it in an isolated environment within the browser so that accidental exceptions and intentional bad behavior don’t destroy or compromise the integrity of the rest of the contents. Web Sandbox rewrites the content looking for bad content both at rewrite time and at execution.

A common misunderstanding about browser architecture is that IFrames (inline frames) can be used to isolate content, but in fact IFrame content can run bad code that can compromise the rest of the browser environment as well as attempt to redirect, install add-ons, and attempt “clickjacking” (also called “UI Redressing” is a relatively new exploit identified at the end of last year – see the NoScript browser add-on to protect yourself from this exploit).

The Web Sandbox architecture is explained in detail on the project’s site and you can test your code on the Sandbox site.

Kudos to Microsoft for making this project open source and engaging the development community at large – the need for much better browser security is becoming a pressing issue and Web Sandbox could become a leading approach to solving the problem.