Download Linux Journal | August 2010 | Issue 196

Transcript
If one filters traffic strictly based on
source and destination IP addresses and, in
practical terms, not by TCP/UDP port (service type), you may think that you haven’t
achieved much. All an attacker has to do
in order to attack a protected system is
gain access to some other system that the
firewall allows to initiate transactions
with your actual target. But, what if
none of those “secondary” systems that
the firewall considers trusted is externally
reachable? If that’s the case, your
“crude” firewall rules may, in fact, have
effectively mitigated the risk of remote
compromise for that system.
This scenario is illustrated in Figure
1, which shows a firewall that sits in
between two different networks, Zone
A and Zone B, and the Internet. The
firewall blocks all inbound traffic from
the Internet to either zone, but allows
hosts in Zone B to initiate transactions
with hosts in Zone A. In this case, the
firewall is highly effective in making it
unfeasible for Internet-based attackers
to exploit the trust relationship between
Zones A and B, even if the firewall filters
only on source IP address.
Figure 1. Filtering Only by Source IP Address
But, I’m not really advocating addressonly filtering. The fact is there are still
plenty of important network services that
use ports and protocols besides TCP
80/443 and HTTP/HTTPS. Domain Name
Services still use TCP and UDP 53;
Microsoft Remote Desktop Protocol
(Terminal Services) still uses TCP port
3389; Oracle still uses TCP port 1521; and
so on. Modern firewalls still make plenty
of meaningful decisions about what traffic
to allow, based on service type.
Another argument against the usefulness of firewalls is the fact that malware
(viruses, trojans, worms) has evolved
from being mainly a nuisance to becoming a sophisticated means of infiltrating
even well-secured networks. Ten years
ago, the most likely impact of a virus or
worm outbreak in one’s organization was
a disruption of service. Malware tended
to strain system and network resources,
but by its indiscriminate nature, it wasn’t
very useful for stealing data or breaching
sensitive systems.
Nowadays, however, malware often
is targeted at specific organizations by
attackers who first go to great lengths to
learn what data and systems to have their
malware seek out, based on known (or
highly probable) vulnerabilities on those
systems. In other words, nowadays
malicious hackers often deploy worms
as “avatars” of themselves!
Such targeted malware is extremely
difficult to detect, remediate against or
trace back. Often, it’s placed directly on
target networks or systems by co-opted
insiders. Therefore, firewalls frequently
have little useful role in blocking the activity
of targeted malware. It doesn’t matter
how thick your fortress walls are if your
mailroom guys have been bribed to ignore
the fact that the large package addressed
to your king is ticking.
But I ask you, does the fact that bad
guys may simply mail your king a bomb,
mean that you can safely replace those
expensive castle walls—the tuckpointingbill for which in any given year is probably
astronomical—with cardboard? I, for one,
don’t think you can.
Just because attackers are developing
ever-more sophisticated tools doesn’t
mean they’ll forget how to use the old
ones. Remember the LAND attack from
the late 1990s? It involved sending
spoofed TCP packets bearing the same
source IP address as the target to which
you’re sending them, causing a massive
“reply to myself” sort of loop, which
impairs system performance (potentially
cripplingly). LAND was made obsolete
by system patches and firewall protections—or so we thought. But in 2005, a
security researcher named Dejan Levaja
discovered that Windows Server 2003
and Windows XP SP2 were vulnerable