Biz & IT —

An alarming number of patched Macs remain vulnerable to stealthy firmware hacks

At-risk EFI versions likely put Windows and Linux PCs at risk, too.

An alarming number of patched Macs remain vulnerable to stealthy firmware hacks

An alarming number of Macs remain vulnerable to known exploits that completely undermine their security and are almost impossible to detect or fix even after receiving all security updates available from Apple, a comprehensive study released Friday has concluded.

The exposure results from known vulnerabilities that remain in the Extensible Firmware Interface, or EFI, which is the software located on a computer motherboard that runs first when a Mac is turned on. EFI identifies what hardware components are available, starts those components up, and hands them over to the operating system. Over the past few years, Apple has released updates that patch a host of critical EFI vulnerabilities exploited by attacks known as Thunderstrike and ThunderStrike 2, as well as a recently disclosed CIA attack tool known as Sonic Screwdriver.

An analysis by security firm Duo Security of more than 73,000 Macs shows that a surprising number remained vulnerable to such attacks even though they received OS updates that were supposed to patch the EFI firmware. On average, 4.2 percent of the Macs analyzed ran EFI versions that were different from what was prescribed by the hardware model and OS version. Forty-seven Mac models remained vulnerable to the original Thunderstrike, and 31 remained vulnerable to Thunderstrike 2. At least 16 models received no EFI updates at all. EFI updates for other models were inconsistently successful, with the 21.5-inch iMac released in late 2015 topping the list, with 43 percent of those sampled running the wrong version.

Hard to detect (almost) impossible to disinfect

Attacks against EFI are considered especially potent because they give attackers control that starts with the very first instruction a Mac receives. What's more, the level of control attackers get far exceeds what they gain by exploiting vulnerabilities in the OS or the apps that run on it. That means an attacker who compromises a computer's EFI can bypass higher-level security controls, such as those built into the OS or, assuming one is running for extra protection, a virtual machine hypervisor. An EFI infection is also extremely hard to detect and even harder to remedy, as it can survive even after a hard drive is wiped or replaced and a clean version of the OS is installed.

"As the pre-boot environment becomes increasingly like a full OS in and of its own, it must likewise be treated like a full OS in terms of the security support and attention applied to it," Duo Security researchers wrote in a whitepaper outlining their research. Referring to the process of assuring the quality of a release, the researchers added: "This attention goes beyond just releasing well QA'd EFI patches—it extends to the use of appropriate user and admin notifications to message the security status of the firmware alongside easy-to-apply remedial actions."

Duo Security warned that the problem of out-of-date pre-boot firmware for computers running Windows and Linux may be even worse. Whereas Apple is solely responsible for supplying the motherboards that go into Macs, there are a wide number of manufacturers supplying motherboards for Windows and Linux machines, with each manufacturer providing vastly different families of firmware. Duo Security focused on Macs because Apple's control over the entire platform made such an analysis much more feasible and because they provided an indication of how pre-boot firmware is faring across the entire industry.

In an e-mailed statement, Apple officials wrote: "We appreciate Duo's work on this industry-wide issue and noting Apple’s leading approach to this challenge. Apple continues to work diligently in the area of firmware security and we’re always exploring ways to make our systems even more secure. In order to provide a safer and more secure experience in this area, macOS High Sierra automatically validates Mac firmware weekly."

Apple didn't respond to a followup question asking how the weekly firmware validation measure works in the just-released High Sierra version of macOS. The new macOS version introduces a feature called eficheck, but Duo Security researchers said they have found no evidence it warns users when they're running out-of-date EFI versions, as long as they're official ones from Apple. Instead, eficheck appears only to check if EFI firmware was issued by someone other than Apple.

The research comes two years after Apple overhauled the way it delivers firmware updates. Since 2015, Apple has bundled software and firmware updates in the same release in an effort to ensure users automatically install all available security fixes. Prior to the change, Apple distributed EFI updates separately from OS and application updates. Further complicating the old process, firmware updates required users to install them by first booting into a dedicated EFI firmware mode.

The Duo Security research indicates that the new firmware patching regimen has multiple problems of its own. In some cases, entire Mac model categories aren't receiving firmware updates at all. In other cases, Mac models receive an EFI update with a version that's earlier than the one that's currently installed. The error results in no update being installed, since a Mac's EFI system will automatically reject updates that try to roll back to earlier versions. In other cases, Macs don't get updated for reasons Duo Security wasn't able to determine.

Attacks on the bleeding edge

People with out-of-date EFI versions should know that pre-boot firmware exploits are currently considered to be on the bleeding edge of computer attacks. They require large amounts of expertise, and, in many—but not all—cases, they require brief physical access to the targeted computer. This means that someone who uses a Mac for personal e-mail, Web browsing, and even online banking probably isn't enough of a high-profile user to be targeted by an attack this advanced. By contrast, journalists, attorneys, and people with government clearances may want to include EFI attacks in their threat modeling.

Duo Security is releasing a free tool it's calling EFIgy that makes it easy to check whether a Mac is running an EFI version with a known vulnerability. It's available for download here. For people using Windows and Linux computers, the process for verifying they have the most up-to-date UEFI version isn't nearly as simple. Windows users can open a command prompt with administrative rights and type "wmic BIOS get name, version, serialnumber" and then compare the result with what's recommended by the hardware manufacturer. Finding the UEFI version on a Linux computer varies from distribution to distribution. In some cases, out-of-date firmware can be updated. For older computers, the best course of action may be to retire the machine. A blog post accompanying the whitepaper is here.

Duo Security's research exposes a security blind spot in the Mac world that almost certainly extends well into the Windows and Linux ecosystems as well. Now that the findings have gone public and a much larger sample of Macs can be tested, the world will be able to get a better idea how widespread the problem really is. Getting a clearer picture on how Windows and Linux systems are affected will take more time.

Post updated in the eighth paragraph to add details about eficheck.

Channel Ars Technica