CanSecWest’s Pwn2Own 2008 contest had heavy coverage in the past days, so I will recap rules and results very quickly.
Three targets, all patched. All in typical client configurations with typical user configurations. You hack it, you get to keep it.
Targets (typical road-warrior clients):
VAIO VGN-TZ37CN running Ubuntu 7.10
Fujitsu U810 running Vista Ultimate SP1
MacBook Air running OSX 10.5.2
Competition started on March 26th, and was meant to last 3 days with decreasing difficulty level:
Bare OS, no extra application
No laptop got hacked
Applications bundled with the OS (e.g. web browser)
Mac OS X got pwned through a Safari vulnerability
3rd party popular applications
Vista fell down because of a Flash vulnerability reportedly exploited through a Java vector
Needless to say, after day 2 titles were slight variations on the “Mac OS X Hacked First” theme, while last day the song changed into “Vista Breached, Linux Unbeaten”, casting the event into a security contest among OSes.
While I’m very happy to see a free (as in beer and as in speech) software being depicted by media coverage as the best choice (security wise) over two commercial alternatives, I think that Nathan Mc Feters, even as biased toward Microsoft as he sounds recently, offers a rather objective report:
None of the 3 OSes could be violated 1st day, when pure OS security was tested
Mac OS X was taken because the high-level softwares it bundles (especially its web browser and multimedia plugins) are not as safe as its FreeBSD-derivative core
Vista was hacked because, notwithstanding all its security enhancements, ubiquitous 3rd party software can work around them and make a relatively safe OS exploitable
Now some simple considerations:
Safari is a web browser
Flash and Java are browser-hosted tecnologies, and they’re both cross-platform: in facts, according to Shane Macaulay who won the Vista laptop, the vulnerabilities he found “could affect Linux or Mac OS X” too
The browser appears to be the weakest spot in PC security, no matter the OS, while it’s probably the single most used application
Corollary: whatever OS you prefer, never browse the web without NoScript :)
Just 3 of the many reasons why I’m seriously considering to ship next NoScript versions with Forbid Macromedia® Flash®, Forbid Microsoft® Silverlight™ and Forbid other plugins checked by default in the Plugins options panel, like it already happens for Java™:
Programming errors in Flash or Silverlight applets can be as exploitable as traditional XSS/CSRF, if not more, no matter if the plugin itself is vulnerable or not. If recent attack on RSnake failed, it’s most likely because he had NoScript configured to block Flash even on his own site. Not impractical as it may sound: in facts, you can select Apply these restrictions to trusted sites as well and enable multimedia clips or applets individually, on the fly with a click on their placeholder — that’s exactly what I do, by the way.
Fully functional PDF viewers are now about as safe and loyal (under your control) as your web browser with full scripting enabled. That may be good enough for some people, but clearly falls short for risk-averse industries.
I did it, in the end. NoScript now blocks all plugins by default on untrusted sites, and you can optionally extend this restrictions to trusted sites as well.
Just not to be always destructive, a couple of flash(!) news about browser plugins issues we discussed in the past:
The “Quicktime pwns default browsers” bug, after being worked around by Mozilla with the release of Firefox 2.0.0.7, has been fixed on the proper Apple side. Even if the advisory page refers to a SEP 21 date, the actual software update as been published right now.
The basic concept, not terribly new by the way, is that browser proxy settings cannot be enforced on browser plugins, which happily ignore them in some circumstances, e.g. when establishing a direct TCP socket connection.
So if you’re using a proxy to hide your internet address (like Tor users do), embeddable objects like Java applets can betray you, revealing your real identity to advertisers spying on your habits or, worse, to the police of a repressive state.
RSnake’s interesting proof of concept exploits JavaScript + LiveConnect , and it apparently works on Gecko-based browser with Java™ installed only. I didn’t manage to make it work on Opera, even though it does support LiveConnect.
So I decided to defer bedtime a bit and I put together my own quick deanonymizing proof of concept, which relies on the almost ubiquitous Macromedia® Flash® and works in any web browser, like Internet Explorer, supporting the Flash player (no need for JavaScript, either).
The
XMLSocket
ActionScript object is used to bypass browser’s proxy setting and connect to a tiny server written in Perl, listening on port 9999 and echoing client’s IP.
Adobe Acrobat/Reader PDF documents can be used to compromise your Windows box. Completely!!! Invisibly and unwillingly!!! All it takes is to open a PDF document or stumble across a page which embeds one.
I’ve got no problem with believing his words, since the stuff we keep calling “documents” became containers for all kinds of executable code long time ago, either intentionally (script embedding) or by accident (buffer overflows, often due to an overly complex format driven by creeping featurism).
I (like many people, I guess) do have problems with his suggested work-around:
My advise for you is not to open any PDF files (locally or remotely).
This is something no business can afford, plain and simple.
The real fix would be vendors stopping with these crazy mixes of data and code, but it’s something they seem not even considering.
So, how can we mitigate risks of this kind, which surely won’t go away even when Adobe will fix this specific PDF issue?
OK, I’m obviously biased here, but did you ever notice the
NoScript Options/Advanced/Plugins
panel?
It provides quite a flexible way to block Java, Flash, Silverlight and all the other plugins such as Acrobat Viewer, Windows Media Player and QuickTime, just to name the ones featured in pdp’s researches.
If you check all the
Forbid…
checkboxes but the last (IFRAMES), all types of plugin-handled, potentially dangerous content will be blocked by default if coming from unknown (and therefore untrusted) sites.
You’ll get a nice placeholder with the NoScript logo instead: you just click it, and you activate the content on the fly if you deem it’s trustworthy.
If you’re a paranoid like me, you may want to trade some usability for maximum security and check also the
Apply these restrictions to trusted sites too
option, which will mandate on-demand activation everywhere.
I heard someone saying
security × usability = K
.
If it’s true (and I hope some day it won’t necessarily be), NoScript tries hard to pump that