Security Experts:

Researcher to Demonstrate Attack on Apple EFI Firmware

An attacker can make malicious modifications to the firmware of Apple MacBooks and keep the devices under his control even after the operating system has been reinstalled, according to a researcher.

Next week, at the Chaos Communication Congress (CCC) in Germany, Trammell Hudson will demonstrate that an individual with physical access to a device can install a highly persistent bootkit on the EFI (Extensible Firmware Interface) boot read-only memory (ROM) through Thunderbolt, a port that is standard on all Mac computers.

Because the malicious code is written to the serial peripheral interface (SPI) flash ROM, the attacker can not only control the targeted system right from the first instruction, but he can also ensure that the bootkit remains on the device even if OSX is reinstalled or if the hard drive is replaced.

The bootkit can spread through other Thunderbolt devices connected to the initially infected machine. The infected Thunderbolt devices, which might be connected even to air-gapped networks, would continue to operate properly, making the threat difficult to detect. The bootkit can also rely on system management mode (SMM), virtualization and other methods to stay hidden, the expert said.

One of the problems is that there are no software or hardware cryptographic checks to verify the validity of the firmware at boot time.

“Our proof of concept bootkit also replaces Apple's public RSA key in the ROM and prevents software attempts to replace it that are not signed by the attacker's private key,” Hudson wrote in the abstract of his presentation. “A hardware in-system-programming device is the only way to restore the stock firmware.”

The attack described by Hudson leverages a Thunderbolt Option ROM vulnerability disclosed two years ago at Black Hat by Australia-based researcher Loukas K (snare). According to Hudson, a Thunderbolt Option ROM can be leveraged to bypass the cryptographic signature checks in Apple EFI firmware update routines.

The security hole, which according to the researcher is not difficult to patch, remains unfixed. Apple could not immediately be reached for comment. However, as users have pointed out on Hacker News, the vulnerability doesn't affect only Thunderbolt ports found on Apple devices.

“[The vulnerability] affects all badly implemented Thunderbolt ports,” the user 'georgyo' said. “Apple's growing popularity and strong hardware standardization makes them especially susceptible to the wormificaiton of this attack.”

Attacks that rely on modified firmware can be very dangerous. Another recent example is BadUSB, an attack which shows that malware can be planted directly into the firmware of USB devices.

view counter
Eduard Kovacs is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.