By Jake Edge
May 28, 2008
When considering the vulnerabilities of a system, the hardware is usually
ignored. Software certainly presents the biggest target—fairly easily
exploited as we have seen—but a new class of attacks goes directly at
the hardware, specifically network cards. The results can range from a
permanent denial-of-service to a complete compromise of the card's
function.
One researcher has overly cutely dubbed this kind of attack "phlashing"
because it attacks the firmware on the card, which is typically stored in
flash. The basic idea is that an attacker will rewrite the firmware using
an image under their control. That image could do any number of fairly
nasty things to the card.
Two separate researchers have recently reported on their explorations into this
type of attack. Arrigo Triulzi's posting to the, evidently private, Robust
Open Source mailing list was reported
on Ben Laurie's weblog. Rich Smith of HP also gave a talk on
his PhlashDance fuzzing tool at the EuSecWest conference. In both
cases, network devices were compromised via insecure remote firmware update
capabilities.
Smith's research focuses on causing permanent denial-of-service through
overwriting the firmware, presumably with garbage. At that point, the card
will no longer function and may, in fact, no longer be able to be
updated—remotely or locally—which turns it into a paperweight.
More importantly, no network traffic can use the device, so if it is
situated in a critical router, for example, it could affect a large number
of systems.
A more insidious attack is described by Triulzi. He replaces the firmware
with new code, effectively reprogramming the device to do whatever he
wants. One of the attacks goes like this:
[...] I've reached my goal of writing a totally transparent firewall bypass
engine for those firewalls which are PC-based: you simply overwrite the
firmware in both NICs and then perform PCI-to-PCI transfers between the two
cards for suitably formatted IP packets (modern NICs have IP "offload
engines" in hardware and therefore can trigger on incoming and outgoing
packets). The resulting "Jedi Packet Trick" (sorry, couldn't resist) fools,
amongst others, CheckPoint FW-1, Linux-based Strongwall, etc. This is of
course obvious as none of them check PCI-to-PCI transfers.
An additional trick, noted by Laurie and others is to use those same
techniques to read or write the main memory of the host computer. This
could certainly allow sensitive information to leak—or the host
itself to
be
compromised. As Laurie says: "You might even be able to read
disk, too, depending on the disk controller."
This is truly frightening stuff that is flying under the radar of most
network administrators. There are no known attacks in the wild, but it
would seem only a matter of time before that happens. This is definitely
something to keep an eye on.
Other than avoiding vulnerable network hardware—lists of which do not
seem to be available from either researcher—there doesn't seem to be
much that can be done to deal with phlashing attacks. A properly
programmed I/O memory
management unit (IOMMU) might alleviate some of the worst cases by
disallowing DMA outside of approved ranges, but card vendors need to make
updates more difficult. It might be more convenient for an administrator
of a large network to update multiple cards across the wire, but the price
paid for that convenience seems too high.
(
Log in to post comments)