Are Your Devices Hardwired For Betrayal?
Right now there is no way to tell if your computer has been compromised. This needs to change. https://eff.org/r.lvqd
It’s an interesting time to be a computer security researcher. Last week, Kaspersky Lab released a report about a new family of malware from an entity they called “The Equation Group”. The report demonstrated for the first time that firmware-based attacks, previously only demonstrated in lab settings, have been used in the wild by malware authors. This should serve as a wake up call to security professionals and the hardware industry in general: firmware-based attacks are real and their numbers will only increase. If we don’t address this issue now we risk facing disastrous consequences.
What is Firmware?
Most pieces of hardware on a modern computer are complex enough that they need their own tiny computers in order to operate. Devices such as your hard disk, network card, BIOS, keyboard, USB drives, and video cards all have their own microprocessor, memory, and software—separate from the CPU, RAM, and other components that make up your actual computer. This lower-level software and operating system is called “firmware”.
Firmware is not just limited to your computer either. There is firmware in most electronic devices that we use: cellphones, car components, printers, digital cameras, TVs, routers, etc., all contain firmware. Some firmware runs in a privileged position in your system, even though you may not be aware of its existence. For example, the firmware on your video card or monitor can read the pixels on your screen, your hard drive can read any files you write (and write its own files), and your network card can listen to all of your network traffic.
In the Equation Group report, Kaspersky described a class of malware that could replace the firmware of almost any hard drive with a malicious copy, allowing it to read and write files on the drive and re-exploit the system, even if the hard drive were formatted. This is an impressive attack—but this type of attack is not just limited to computer hard drives. Any of the above mentioned devices could have their firmware compromised, and the results would be devastating.
What is the Problem?
Firmware is not inherently a bad thing—it is needed to operate the advanced hardware that comprises today’s computing environment. The problem with firmware is that it is often extremely opaque. Most hardware manufacturers do not release the source code for their firmware. In fact, manufacturers will even take steps to try to prevent the reverse engineering of their firmware. Additionally, there is no way for your computer to “see” into the firmware installed on its peripheral components—i.e., there is no way to tell if your firmware is the original firmware that came with the device or if it has been replaced—so there is no way to tell if it is acting maliciously.
Firmware-based malware is still a relatively unexplored field compared to other types of malware. A fewdifferent attacks [.pdf] have been demonstrated in lab settings, but so far these attacks have rarely been seen in the wild. Thanks to the Kaspersky report and various Snowden leaks, we now know that the NSA has developed malware that can infect hard drive firmware and potentially even infect theBIOS.1 Firmware-based attacks will only become more of a threat to computer security as they are adopted by other intelligence agencies, not to mention criminals.
Firmware-based attacks can be especially attractive to malware authors, partially because they can be so devastating. There are a few reasons for this:
- Firmware based malware is hard to detect. A computer has no way to inspect the firmware running on its devices.
- Firmware based malware is hard to remove. Even a complete reformatting of the hard drive will not get rid of the firmware because the device is infected at a hardware level.
- Most firmware has never had a public security audit and is closed source. This makes firmware a rich source of potential security bugs and zero-days.
- Many devices never have their firmware updated, so potential exploits or installed malware may stick around for a long time.
We are thus faced with one of the most pernicious computer security problems we have ever seen. Our hardware devices could be riddled with malware, and we have no way of knowing. We have no way to assure ourselves that we have control over the machines that we use every day of our lives. The very foundation of our technology is rotten and full of termites. The problem of firmware-based malware must be addressed immediately.
How Do We Fix It?
Hardware manufacturers must take steps to address this problem before more firmware disasters comes to pass. In the past, hardware manufacturers have been more worried about physical and side-channel attacks. Manufacturers therefore focused mainly on making their hardware and firmware opaque and tamper-proof in hopes that, if no one could reverse engineer the firmware, then no one would be able to attack it. Unfortunately this defense has proven ineffective. This should serve as a stark reminder of the old adage: “Security through obscurity is no security at all.” We we need to take back transparency and verifiability in our hardware.
Although this is a daunting problem, it is solvable. To avert this disaster there are three things that must happen right away:
- Firmware must be properly audited. Hardware manufacturers need to hire security professionals to audit their firmware and publish the results. Preferably, hardware companies should hire full time security staff to make sure that their code is audited before it ever gets installed. Hardware manufacturers could also release the source code for their device’s firmware, allowing independent security researchers and laypersons to review the code as well—and perhaps even improve it. People have a right to inspect the code that is running on their computers.
- Firmware updates must be signed. Firmware updates should be signed by the manufacturers so that we can be sure we are installing trusted code when we upgrade our firmware. Additionally, manufacturers should ensure that there is an easy mechanism for the average user to check the signature and upgrade their firmware. Ideally users would not have to rely on the broken certificate authority system to verify these signatures.
- We need a mechanism for verifying the integrity of installed firmware. Of course, even if we have signed updates to firmware, some piece of malware could reprogram the firmware already on the device and have a good long life, before it eventually gets updated (if ever). Because of this, we need a way to verify the code on our hardware devices at boot time or run time in a way that can’t be subverted by malicious firmware already on the device. 2
None of these things are inherently difficult from a technological standpoint. The hard problems to overcome will be inertia, complacency, politics, incentives, and costs on the part of the hardware companies.
We have given up control of our computing. We are trusting too many different devices—devices we have no reason to trust given that they could be compromised without our knowledge. The time has come to take back control of our computing devices and our security. We must put pressure on hardware companies to ensure that their products are trustworthy, even (and especially) after they leave the factory floor. We must act now to ensure a future where the foundation of computing is secure.
- 1.The BIOS, or Basic Input/Output System, is the program that runs when you first turn on your computer. It is responsible for detecting hardware, initializing subsystems, and starting your boot loader, which then loads your operating system.
- 2.While this is a tricky problem to solve, there are a few potential ways to do it. One such way would be to use a local attestation mechanism similar to the kind used in a TPM.