The Battle for Your Browser

Attackers are doing a drive-by on your browser, but the defenses against such attacks are good and getting better.

Windows users have to look at the Internet as a source of unending attacks. You can defend yourself with some software and some common sense, and the defenses are set to get even better.

There are two basic popular types of malware infection these days: the Trojan horse program marketed through links in an e-mail and drive-by browser hijackings. I have a hard time getting my hands around how effective one or the other is.

The drive-by method uses a bag of JavaScript that throws a stream of attacks at the browser, one after another, hoping one will compromise it. At almost all times these attacks are patched vulnerabilities, meaning that you're basically safe from them if you keep your browser and other software up to date. Some of that software, like Flash, Acrobat and RealPlayer, are more likely to linger in old, unpatched versions, so you need to be assiduous.

A big part of the consideration for vulnerability exploits is, if they happen to execute, how much damage can they do? Microsoft has done a lot of work in this area over the last few years, aiming to restrict the ability of exploits to do much damage if they get through initial defenses.

One of my favorite Microsoft bloggers, Robert Hensing, who works in the Security Vulnerability Research and Defense group, argues that these second-level defenses are good and getting better.

The active defenses on by default in Vista are pretty good: IE Protected Mode, ASLR (Address Space Layout Randomization) and DEP (Data Execution Protection) are all examples of this. But applications have to be set up to use ASLR and DEP, and both Microsoft and ISVs have been slow to do so. These techniques are so good at rooting out bugs as well as exploits that they would be too disruptive to turn on in a blanket fashion.

But they've been turning on more and more. Even Apple has turned on ASLR and DEP in some parts of QuickTime, an option it doesn't have in OS X. And IE8 will have DEP turned on by default, which puts all the ActiveX control authors on notice.

ASLR may prevent it from finding an execution point. If it can find the exploit code, DEP will likely prevent it from running. Protected mode prevents it from modifying anything in the system or becoming persistent. As Hensing points out, faced with an environment like this, exploit code can't get a lot of work done.

The reflexive advice you get from a lot of sources, including the U.S. government, is to shut off JavaScript and ActiveX. I just can't agree that this is good advice; despite what the average Noscript advocate says, the Internet is unusable with JavaScript turned off. I try it every now and then and it's just not worth surfing the Web. With ActiveX turned off, you can get some work done, but you'll notice that lots of pages work badly, mostly for excessive reliance on Flash.

I often wonder how many completely updated PCs get exploited. I bet the numbers are small, and I bet almost all of the ones that do get exploited are through social engineering where the user gets tricked into lowering defenses and running a Trojan horse. It's hard to get through otherwise.

Security Center Editor Larry Seltzer has worked in and written about the computer industry since 1983.

For insights on security coverage around the Web, take a look at eWEEK.com Security Center Editor Larry Seltzer's blog, Cheap Hack.