Friday February 10, 2012 7:21 AM AEST

Hole in the wall

By Ashton Mills
10:26 Jun 4, 2009 | 2 Comments
Tags: firewall | internet | security
 »
Hole in the wall

X-Ray: The firewall is an essential bastion of internet security, but what's not well known is that all firewalls have an Achilles heel...

Firewalls are the first line of defence for any network connected PC. And, usually, the more the merrier - having them at the gateway, the router, and on every individual PC on the network helps to ensure no nasties come knocking on your silicon door.

And they couldn't be simpler. While once upon a time a firewall was a static, binary allow/deny wall of defence, modern firewalls are different. Blanket allow and deny rules are effective, but not terribly practical - everytime you ran a program that wanted to access the net on a non-standard port, you would need to explicitly open that port. And then, even if it was no longer in use, it would remain open unless you explicitly closed it.

Thus was borne the stateful firewall, an intelligent packet-analysing firewall that tracks packets going out to determine what to allow in - responses to any connections originated on the inside are automatically passed through. Ports don't need to be opened or closed, just exceptions based on the traffic to and from a specific machine.

All firewalls, at least at the consumer level in routers and security software, are stateful. They provide a fire-and-forget solution to ensuring a machine remains locked down with the exception of the traffic it generates itself. And it's a very effective solution.

But therein lies the Achilles heel as well.

Man on the inside
Because a stateful firewall allows in any traffic generated by programs going out, there's an implicit expression of trust at play - obviously, all the traffic leaving the machine must be legitimate. It has to be, because inherently the firewall can't tell good traffic from bad.

So what happens if a malicious program gets on a machine, and happily starts transmitting your keystrokes to a hacker in Russia? Why, it allows it through - because it has no way of knowing it wasn't the user that wanted to contact that .ru domain.

This is what spurred the evolution of personal firewalls, the type of which you can get standalone or as part of a security suite today. On top of the basic stateful firewall, these firewalls take the extra step of assuming that not all traffic originating from a machine is necessarily legitimate, and so implement internal checks - at the very least to query the user with 'This program wants to access the net, do you want me to allow it?'

You would think this should be relatively foolproof, as a user can easily answer whether the program in question really is one they started or not. But what this means is that for a malicious program to bypass the firewall, all it has to do is pretend it's the user.

There's another problem with this too - invariably, some programs will automatically be allowed access by any security suite, because they're considered essential: Windows Update for example, or the program's own services. Additionally, a user is going to grow tired very quickly of being prompted to allow their browser through everytime they launch it, so they're going to tick 'Add to exclusion list' quick-smart.

Which means malicious software doesn't need to force access and bypass a firewall, all it has to do is pretend it's one of the programs that's already allowed through. And this is exactly what some malware attempts to do.

Most of today's advanced firewall suites cannot stop a nasty application from emulating another program and gaining unrestricted access to the net - to do things like transmit your keystrokes, or send other data gleaned from the system for identity theft.

The smart ones don't try and emulate one or two programs, they'll have an internal list of many and try each one until it gets through. The [i]really/i] smart ones will highjack programs and use techniques like DLL or thread injection to either directly alter a running program, or create a 'clone' of an application (such as Explorer itself) that kills the original instance and launches the new one with a modified DLL.

These are attacks from the inside out, and there's not a lot security programs and their firewalls can do about it - because there are two factors at play: first any hijacked programs pass through the firewall because the firewall is doing exactly what you tell it to - let through 'trusted' programs, including those the user themselves has allowed. Secondly, because the very foundation of Windows assumes the user is an expert - and given administrative access on-demand - security programs and firewalls are again bound by the level of trust implicit in a user's authority. A user's 'copy' of Internet Explorer for example is considered trusted, even if it's been hijacked.

The solution many personal firewalls work with is to look for trojan code when a 'trusted' application accesses the net. Either the code itself shows up in its database of malicious software, or an MD5 sum or similar is compared against the database of known programs. Neither of these methods are foolproof, and so while some security suites can catch some of these wolves in sheep's clothing, none can be completely effective, and they're only as up to date - like virus scanners - as their signature files.

And that's the rub, a firewall is no silver bullet. There is, however, something much better: common sense.

 
 »
 
This article appeared in the May, 2009 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
2 Comments
TheSecret
Jul 2, 2009 3:46 AM
There is no Achilles heel as is described in the article. Firewalls, of any type, are not designed to distinguish between traffic the user consented to send, and malicious traffic. Firewalls are never designed to tell "good from bad".

Personal firewalls were never meant to prevent malware in this way, nor are they capable of stopping sufficiently advanced malware. The answer to the problem of malware is not one that can be solved by malware, but rather a better application of existing security models. UAC was a start, then ultimately ended up as a failure.

It's also possible with windows to sign known executables, so if one of these executables is hijacked, they can be prevented from executing. A firewall does not come into it.
TheSecret
Jul 2, 2009 7:58 AM
"the problem of malware is not one that can be solved by malware" should be "the problem of malware is not one that can be solved by firewalls"....
Comments have been disabled on this article.
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

SubscribeBuy nowDigital Version