2014年製より前のMacBookシリーズにスリープから復帰後フラッシュロムのロックが解除されてしまう脆弱性が発見される。

記事内に広告が含まれています。
スポンサーリンク
スポンサーリンク
スポンサーリンク

 2014年製より前のMacBookシリーズにスリープから復帰後フラッシュロムのロックが解除されてしまう脆弱性が発見されたそうです。詳細は以下から。


MacBook-Sleep-Issue


 この脆弱性はセキュリティ研究者のPedro Vilaca(@osxreverser)さんによって発見され「Apple帝国の逆襲」として公開された記事の内容は「AppleのS3スリープの実装は狂っていて、サスペンドとレジュームサイクル後にフラッシュのロックが解除されてしまいます」というもので、(タイトルはスターウォーズの”帝国の逆襲“をもじっており、記事にもスターウォーズネタが多いです…)

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. !?#$&#%&!#%&!#

[The Empire Strikes Back Apple – how your Mac firmware security is completely broken – Reverse Engineering Mac OS X]

 実際にMacBook Pro Retina 10,1を使用した実験では「スリープ前にはフラッシュロムのロック(FLOCKDN=1)がかかっており、BIOS領域(PR0/PR1)はread-onlyとなっているものの、MacBookを閉じて数秒スリープさせるというダーク・ジェダイの攻撃を行った後、ロックが解除(FLOCKDN=0)されPR0/PR1が無くなっている」ということが確認されており、


sudo-pmset-sleepnow-read-only

What we can see here is that the flash lockdown is active (FLOCKDN=1) and that the BIOS region is mostly read-only. The hole that is writable is the NVRAM portion that is necessary for setting boot options, crash logs and so on. The addresses where EFI binaries are located is lock down by the flash protections (PR0/PR1). The Dark Jedi attack would allow to unlock these areas and make them writable.

After I close the MacBook and let it sleep for a few seconds (30 seconds or something is best, sometimes it doesn’t work and needs to sleep some extra time), we get the following flashrom output after waking up the machine:

This time we have FLOCKDN=0 and the protected range registers (PR0/PR1) without any contents. The flash is unlocked and now you can use flashrom to update its contents from userland, including EFI binaries. It means Thunderstrike like rootkit strictly from user land.
[The Empire Strikes Back Apple – how your Mac firmware security is completely broken – Reverse Engineering Mac OS X]

 これを利用すれば「攻撃者がSafariなどを使用し、実際にMacに触ること無くリモートでEFI rootkitを仕込むことも可能だ」とコメントしています。

P.S.: The bug can be used with a Safari or other remote vector to install an EFI rootkit without physical access. The only requirement is that a suspended happened in the current session. I haven’t researched but you could probably force the suspend and trigger this, all remotely. That’s pretty epic ownage ;-).

[The Empire Strikes Back Apple – how your Mac firmware security is completely broken – Reverse Engineering Mac OS X]

2014年製より前のMacBookに存在

 「Thunderstrike Rootkit」の脆弱性を発見したTrammell Hudsonさんが検証した結果、この脆弱性はIntel HM77チップセットを搭載したMacBook Air/Proシリーズで確認&再現されたそうで、

* Thunderstrikeやダーク・ジェダイの攻撃より”sudo pmset sleepnow”を使えば簡単だよ


 2014年以降製造のMacBook Air/Proではこの脆弱性は再現されない(修正されている)という報告もされており、DarwinDumperを使用したテスト方法もfG!さんのサイトに公開されているので興味のある方は関連リンクからどうぞ。


246
[Confirmed, this is not working on a late 2014 15″ rMBP running 10.10.2]

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, just sayin’.

[The Empire Strikes Back Apple – how your Mac firmware security is completely broken – Reverse Engineering Mac OS X]

おまけ

 この脆弱性はroot権限を使用するため、Macを管理者として使用しているユーザー以外は脅威になりませんが(もちろん2014年製より後のMacBookユーザーも)、iMoreではシステム環境設定.appの[省エネルギー]からスリープをさせないように設定することを勧めています。


MacBook-Sleep-Settings

If you think you may be targeted, you can mitigate the risk by running as a standard user rather than as an admin. If you have to run as admin, disable sleep and shut down your Mac when you’re done with it instead. You can do that in System Preferences > Energy Savings.

[UEFI attack and the Mac: What you need to know – iMore]

関連リンク:

コメント

  1. Apple7743 より:

    サムネワロタ

  2. Apple7743 より:

    最後に表示されている環境設定が最新の10.10系では無さそうですけど、バージョンいくつのですか?

  3. Apple7743 より:

    ※2 確かに。 ウィンドウ下部にカギが無かったりして微妙に違うし。

  4. Apple7743 より:

    The Empire Strikes Back Apple < 帝国がAppleに逆襲するんよ。英語勉強し直してね。

タイトルとURLをコピーしました