Last week’s macOS Sierra 10.12.2 software update squashed a number of bugs and patched a few newly discovered vulnerabilities, among them one that allowed an attacker to obtain your FileVault disk encryption password by plugging in a $300 Thunderbolt device into a locked or sleeping Mac.
As detailed by security researcher Ulf Frisk, attackers must have physical access to your Mac in order to exploit the vulnerability. The obtained password may be used to unlock your Mac’s disk and access everything on it.
Frisk details two macOS issues that made this kind of attack possible.
Firstly, macOS did not protect itself against Direct Memory Access (DMA) attacks before it was started. That’s because Extensible Firmware Interface (EFI), which is the Mac’s variant of BIOS and runs when you turn on your Mac, used to let Thunderbolt devices read and write memory before macOS itself was booted.
“At this stage macOS is not yet started,” Frisk wrote. “macOS resides on the encrypted disk—which must be unlocked before it can be started. Once macOS is started it will enable DMA protections by default.”
And secondly, macOS stored the FileVault disk encryption password in clear text in multiple memory locations. Although the password was moved around between reboots, it was still stored in a fixed memory range.
Furthermore, macOS did not delete the password from memory once the disk was unlocked.
Plugging a dedicated $300 Thunderbolt-based DMA attack hardware, an attacker with physical access to your Mac would simply reboot the computer. Any previously enabled DMA protections would be dropped at that point.
In other words, the memory contents—including the FileVault disk encryption password stored in clear text—would remain intact for a few seconds until the startup disk was unlocked and the password was overwritten with new content.
This let the attack hardware obtain the password in less than 30 seconds.
If your Mac is shut down, it’s not vulnerable. If it’s sleeping, however, the computer is still vulnerable. The attack was not tested on more recent Mac models with USB-C.
To secure your Mac, just install the latest macOS Sierra 10.12.2 software update.
Apple’s security document detailing the security content of macOS Sierra 10.12.2 makes no mention of the vulnerability, but Frisk did tell Apple about it in August and the company did fix it with the latest 10.12.2 update.
“The solution Apple decided upon and rolled out is a complete one,” he wrote. “At least to the extent that I have been able to confirm. It is no longer possible to access memory prior to macOS boot. The Mac is now one of the most secure platforms with regards to this specific attack vector.”
I’m glad this has been fixed.
To protect yourself from so-called cold boot attack or yet unforeseen DMA-based vulnerabilities, always power down your Mac when you’re not using it instead of putting it to sleep.
Photo: Thunderbolt-based DMA attack hardware used to exploit the vulnerability.
Source: Ulf Frisk