Slashdot Mirror


Macs Vulnerable To Userland Injected EFI Rootkits

Bismillah writes that a new vulnerability in recent Macs — and potentially older ones — can be used to plant code such as rootkits into areas of EFI memory that shouldn't be writeable, but become unlocked after the computer wakes up from sleep mode. The article explains that [The vulnerability] appears to be due to a bug in Apple's sleep-mode energy conservation implementation that can leave areas of memory in the extensible firmware interface (EFI) (which provides low-level hardware control and access) writeable from user accounts on the computer. Memory areas are normally locked as read-only to protect them. However, putting some late-model Macs to sleep for around 20 seconds and then waking them up unlocks the EFI memory for writing.

21 of 82 comments (clear)

  1. Still needs another vulnerability by cerberusss · · Score: 5, Insightful

    FTFA:

    The researcher who discovered the flaw, Pedro Vilaça, said the vulnerability can be used to (some examples) that is invisible to the operating system in the writeable flash memory

    So to summarize: as a user, you can sometimes write to EFI memory.

    That's currently all there is to it. There's no rootkit, there's no malware, etc. Just this space where you can hide and survive an OS wipe and reinstall.

    I'm sure some will come up with a payload that uses this space to hide itself, no doubt about it. But currently, this is all there is to it.

    --
    8 of 13 people found this answer helpful. Did you?
    1. Re:Still needs another vulnerability by Anonymous Coward · · Score: 3, Interesting

      Oh, I know how to solve this one. There's a bug in the EFI capsule update mechanism that allows to install unsigned firmware updates if you have root.

      Now combine it with this bug, and you can corrupt an EFI update initiated by root from an unprivileged account. Essentially, wait for the next EFI update and you get arbitrary code execution from Ring 3, userland, to Ring -3, the firmware.

    2. Re:Still needs another vulnerability by Anonymous Coward · · Score: 3, Informative

      It's enough to make such a thing. Just lurk until it becomes writable, then make good use of it. Much simpler than stealing keys from the next VM over by cache-timing attacks, and we've seen those to be viable. So insisting on proof for what ought to be obvious is maybe a bit facetious.

      This thing is also more indication that EFI actually makes peecees more insecure because there's another layer of software running with even more privileges than the OS itself, and it's closed-source firmware. Crappy firmware. Expect more holes to be found. Brought to you by the kings of gifts that keep on giving. And no, I don't mean just apple, far from it.

    3. Re:Still needs another vulnerability by benjymouse · · Score: 4, Insightful

      So to summarize: as a user, you can sometimes write to EFI memory.

      That's currently all there is to it. There's no rootkit, there's no malware, etc. Just this space where you can hide and survive an OS wipe and reinstall.

      Yes - it is a vulnerability for which there is no exploit published (yet).

      This vulnerability is serious, as it allows an attacker to permanently infect the Mac *firmware* and gain control each time the Mac is booted - even if you nuke and reinstall OS X.

      You may try to dismiss this as "still needs another vulnerability". Another vulnerability or even a social engineering attack, evil maid attack will all suffice. This one can be used to take permanent, undetected residence on successfully exploited macs.

      That's bad in my book

      --
      Reading slashdot one-liner: (irm http://rss.slashdot.org/Slashdot/slashdot).rdf.item | fl title,desc*
    4. Re:Still needs another vulnerability by fuzzyfuzzyfungus · · Score: 3, Interesting

      Less of an issue among people/organizations who exclusively buy new, from manufacturer or authorized retailer; but (at least on the PC side, I don't deal much with mac procurement), refurbished off-lease units are an enormous market. Very, very, popular with organizations that can't afford to ride the latest-and-greatest. It's not glamorous (something like the Optiplex 780 is nothing to write home about; but if you need a few computer labs or a cube farm on a tight budget, the fact that you can get units with an adequate 3rd party warranty, no DOA, 4GB of RAM, and an adequately punchy CPU for ~$150, sometimes a little less, each, is pretty compelling.

      "Previous owner" isn't a scary vulnerability for exploits that live at the OS level; all the refurb stuff typically gets wiped once by the refurb house during their testing process, and re-imaged when it reaches the customer; but it is damn scary for firmware-level exploits. Especially motherboard firmware(HDD firmware exploits are scary; but taking out the HDD and shredding it, then replacing it with another low-capacity-everything-is-on-the-network-anyway boot disk is at least cheap); which compromises the system at a scary-deep level, and also compromises the component that makes up most of the value of the computer.

      Without a good OS-level vector, preferably with a nice internet infection capability, it isn't a good candidate for a pandemic; but if this sort of firmware fuckery makes the used market about as reliable as buying street drugs, it will have a major impact.

    5. Re:Still needs another vulnerability by Lumpy · · Score: 2

      "Just this space where you can hide and survive an OS wipe and reinstall." IF the user only put the unit to sleep and then woke it. Simply turning off the unit for a short time before OS wipe and reinstall defeats this potential hole.

      I am betting that Windows, BSD, and Linux have a similar vulnerability lurking.

      --
      Do not look at laser with remaining good eye.
    6. Re:Still needs another vulnerability by jabuzz · · Score: 2

      I think you will find that SMM debuted in the 386SL and continued in the 486SL begore becoming mainstream in the Pentium.

      Those processor codes should give you a clue as to what it's original purpose was and why it came about.

    7. Re:Still needs another vulnerability by alex67500 · · Score: 3, Interesting

      still ring-0. quite a big deal...

  2. recent = made before mid 2014 by fpoling · · Score: 5, Informative

    Vilaça believes Apple is aware of the issue - his testing shows the flaw is not found in the firmware of Macs made after mid 2014.

    1. Re:recent = made before mid 2014 by drinkypoo · · Score: 2, Insightful

      VilaÃa believes Apple is aware of the issue - his testing shows the flaw is not found in the firmware of Macs made after mid 2014

      How kind of Apple to publish a security advisory on the issue, like a reputable and scrupulous vendor would have done.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:recent = made before mid 2014 by Anubis+IV · · Score: 2

      Vilaça believes Apple is aware of the issue - his testing shows the flaw is not found in the firmware of Macs made after mid 2014

      How kind of Apple to publish a security advisory on the issue, like a reputable and scrupulous vendor would have done.

      Note the sentence in the article that wasn't quoted by the previous poster but which immediately followed it...

      He did not disclose the flaw to Apple.

      So, this is a flaw that Apple has not been notified about, which only exists in older hardware, and which is fiddly enough that the researcher can't explain why it's being caused, but does know that it needs to be targeted for specific machines. It's entirely likely that because this issue must be targeted at specific versions of firmware for each model that whatever fiddly bits were making it possible in the first place were simply accidentally modified sufficiently enough to make it impossible once again.

      I'll chalk this one up to incompetence, rather than malice.

  3. Time for the BIOS to be EEPROM again? by Viol8 · · Score: 3, Insightful

    That way it can't be overwritten by software. Or at least require an internal jumper to be set before any writes can happen. Any user updating their BIOS would be fairly experienced so taking the lid off an setting a jumper wouldn't be a problem for them and people who arn't technical could just take it to a store.

    1. Re:Time for the BIOS to be EEPROM again? by Registered+Coward+v2 · · Score: 2

      That way it can't be overwritten by software. Or at least require an internal jumper to be set before any writes can happen. Any user updating their BIOS would be fairly experienced so taking the lid off an setting a jumper wouldn't be a problem for them and people who arn't technical could just take it to a store.

      Or, ship each Mac with an encrypted dongle that must be unlocked to do a firmware upgrade. You could even print the key on the dongle so you wouldn't worry about losing the key; if yo lose the dongle then still allow an authorized service center to do firmware upgrades. Of course, this my be a solution in search of a problem.

      --
      I'm a consultant - I convert gibberish into cash-flow.
    2. Re:Time for the BIOS to be EEPROM again? by jones_supa · · Score: 4, Interesting

      It's interesting that a lot of effort has been put into things like SecureBoot, but there is still a plethora of devices in a PC which are ready to accept new (potentially malicious) firmware at any given point in time.

    3. Re:Time for the BIOS to be EEPROM again? by geekmux · · Score: 2

      It's interesting that a lot of effort has been put into things like SecureBoot, but there is still a plethora of devices in a PC which are ready to accept new (potentially malicious) firmware at any given point in time.

      Well, at least now you have an idea of just how bad IoT deployment is going to get.

  4. Re:Will anyone exploit it? by fuzzyfuzzyfungus · · Score: 4, Insightful

    If I'm just harvesting nodes for my botnet, macs are pretty lousy targets, no more capable than PCs and substantially more obscure.

    If I'm attacking systems for the data on them, or to MiTM/trojan/keylog the users of the systems; grab banking credentials and the like; mac users are a conveniently self-selected group of people atypically worth harvesting. Sure, there are a bunch of underemployed baristas with degrees in Individuality using the macbook pro that mommy and daddy bought them to watch movies in their dorm room; but as a whole, thanks to the higher prices, users of OSX devices skew upmarket pretty substantially(iOS devices have some of the same effect; but much less, since at least an iPhone 5c or the like is probably available as the 'free'-with-usurious-contract model on most telcos).

    If you are attempting a corporate/institutional intrusion, macs vary in value: they are way, way, less common, frequently absent entirely; but where they are present, their minority status often means very limited integration into the enterprise's legion of 'security' products, IDSes, and everything else that the Windows users complain is causing logins to take 30 minutes. This makes them handy 'beachhead' systems, especially if they are loaded up with Office, Adobe Malware Runtime, and similar stuff that may well have cross-platform or partially shared libraries of vulnerabilities; but much reduced vigilance on OSX clients.

  5. Re:Will anyone exploit it? by jo_ham · · Score: 4, Insightful

    Targeting OS X is tempting because of 99% of all Mac users *knows* that "Macs can't get infected" (the Apple salespeople told them so), and therefore they don't have any kind of antivirus installed.

    At work, I daily deal with Mac-users who gets their mailaccounts hijacked because of infections. It takes roughly 10-20 minutes to convince them to download and run Avast or something like that, but it's worth the "oh....".

    Out if interest, what "infections"? Do you have any examples. That's clearly a big issue if you're dealing with it daily. What infections are we talking about here?

    Not that I'm doubting your story or anything.

    (NECESSARY DISCLAIMER: I AM NOT CLAIMING THAT OS X CANNOT GET INFECTIONS)

  6. Re:Will anyone exploit it? by Dunkirk · · Score: 3, Informative

    Note that "people" are probably CIO's of Fortune 500's.

    As an engineer who was doing programming and systems work in engineering, I evangelized Linux for a decade and a half at a Fortune 250. When someone in IT finally took a look at it, they, of course, demanded that it have a virus scanner. (To be fair, this was near one of the really big Windows outbreaks.) One of the AV companies had actually released a Linux version, so I just calmly told him about it, and stroked his notion that Linux was actually ready for the desktop, even though I thought the whole idea a complete waste of time. In my opinion, cleaning up whatever MIGHT have been caused by a Linux infection would never have been worth the traded performance and administrative overhead of installing it and keeping it updated.

    Seems to me that this scenario might be playing out again, as OS X is actually a viable corporate desktop now. Again, I don't think the level of risk warrants the level of cost, but that's not my call. Having a "corporatized" AV (like the Symantec monstrosity that frequently stalls this high-end Dell mobile workstation) is a checkbox that would open the door to corporate deployments of Macs.

    --
    Acts 17:28, "For in Him we live, and move, and have our being."
  7. Re: Will anyone exploit it? by jazzdude00021 · · Score: 3, Insightful

    If I had mod points, you'd have em. Institutional policy is the prime reason that AV exists for Macs. AV companies saw Macs coming into the workplace at greater rates due to the proliferation of iDevices and the frustration of using Windows 8 and decided a Mac version of their software might be profitable. No other reason than that. The primary marketing tactic from those companies was to protect your inbox so you didn't accidentally forward a PC virus along. In 8 years of Mac ownership, my AV (yes, I'm a Mac owner with AV on my system) has detected one PUP in an attachment auto-downloaded thru my mail client, and the exploit was for Win32. Job done. AV works and serves its purpose.

    Now, before the torches come out and the chants of "Fanboy!" start, I am sure someone out there somewhere has a Mac virus that could spread and wreak havoc. The darker parts of the Internet know about security exploits long before most /.-ers will. That said, I don't think this exploit will turn into a pandemic precisely because of the fact that >10% of computers are Macs. Hacking is a business, granted it is a criminal business, but business economics still apply, and writing an exploit for 10% is far less profitable than writing for 90% of users. Even if that 10% are totally security unaware.

  8. Re:Will anyone exploit it? by macs4all · · Score: 2

    At work, I daily deal with Mac-users who gets their mailaccounts hijacked because of infections. It takes roughly 10-20 minutes to convince them to download and run Avast or something like that, but it's worth the "oh....".

    How are there mail accounts being hijacked? Because, seriously, I have never heard of a problem with that using OS X Mail.app.

    I have been using Macs since they were Lisas, and OS X since the DP4 Public Beta, and have never heard of a Mac having a "hijacked" email,

    Nothing stops someone from reselling your email address into slavery; but seriously, I have never heard of Macs being unwitting members in a Botnet, etc.

    So, what exactly do you mean by "mailaccounts [sic] hijacked"? Citation, please.

  9. Re:Will anyone exploit it? by macs4all · · Score: 2

    I see your education on macs and OSX is so horribly outdated that your comment is essentially useless. Many do worry about it this is why several virus scanner companies are making products for OSX. Hell you can even get a free Avast for OSX. They would not even bothered if people were not asking for it.

    99.99999999999999999999999999999999% of those people are ex-Windows "Switchers"; who simply CANNOT believe that a computer system doesn't need sixteen-factors of malware protection.

    Sorry. The ONLY reason why those companies are providing those AV products is to serve the perenially-paranoid.

    I'm not saying that Macs CANNOT get viruses; but in over a DECADE of OS X, they just haven't. Period.