An exploit on Apple Macs could enable attackers to create a permanent back door, OS X security researcher Pedro Vilaca has warned.
The vulnerability, which affects Apple Macs older than a year, enables attackers to overwrite firmware on boot-up, leaving machines permanently vulnerable.

Further reading

Vilaca claims that he stumbled upon the exploit while examining two different attacks on Apple’s OS X operating system presented at the Chaos Communication Congress last year, by Trammell Hudson, Rafal Wojtczuk and Corey Kallenberg. 
“The first one was related to the possibility to attack EFI from a Thunderbolt device, and the second had a very interesting vulnerability regarding the UEFI boot script table. The greatest thing about the second vulnerability is that it allows you to unlock flash protections by modifying the boot script executed after a S3 suspend-resume cycle,” explained Vilaca in a blog post.
He continued: “The attack requires you to reverse the boot script implementation, which is a royal pain in the ass… While doing some experiments with flashrom I finally noticed something big. I couldn’t believe it the first time so I tried it in other Macs and it was indeed true. Macs have an even bigger hole than Dark Jedi.
“What is that hole after all? Is Dark Jedi hard to achieve on Macs? No, it’s extremely easy because Apple does all the dirty work for you. What the hell am I talking about? Well, Apple’s S3 suspend-resume implementation is so f*cked up that they will leave the flash protections unlocked after a suspend-resume cycle,” explained Vilaca.
He continued: “It means that you can overwrite the contents of your BIOS from userland and rootkit EFI without any other trick other than a suspend-resume cycle, a kernel extension, flashrom, and root access. Wait, am I saying Macs EFI can be rootkitted from userland without all the tricks from Thunderbolt that Trammell presented? Yes I am! And that is one hell of a hole :-).”
Vilaca went on to test the vulnerability he found on a number of Apple Macs, concluding that the MacBook Pro Retina, a MacBook Pro 8.2, and a MacBook Air, all running latest EFI firmware available, are all vulnerable to the attack.
“It appears that latest MacBook models are not vulnerable but I’m not 100 per cent sure about this. I couldn’t fully test it on a recent model (the owner was afraid of giving me root access ;-)). The first impression was that the bug was silently fixed by Apple but this requires extensive testing to be sure (or some EFI binary disassembling). I expect all mid/late 2014 machines and newer to not be vulnerable. Apple either fixed it by accident or they know about it. It’s not something you just fix by accident.”
Vilaca believes that the vulnerability is a zero-day exploit and has called on Apple to fix the bug as a matter of priority. Vilaca believes that Apple may have a “corporate culture problem” with regard to security, similar to Microsoft’s in the late-1990s.
“The issue at stake is that I believe Apple has a corporate culture problem regarding security (like Microsoft had many years ago) and they only seem to react when pushed against a corner.
“If they indeed knew about the bug – because I don’t believe it’s a coincidence not working in latest machines – then they keep their pattern of not patching older versions. This is a bad policy and at least if they want to put it in practice at least be straightforward with customers and warn them about the issues.”

Leave a Reply