2021年8月14日 星期六

快速認識 PFR (Platform Firmware Resiliency )

開始談PFR前,我們先把時間條滑回 2017 年,當年有個病毒 "BrickerBot" 很有名,他是透過網路刷機將IoT設備上的韌體變成磚頭(Brick),這種攻擊手法被稱作PDoS (Permanent denial-of-service attacks / phlashing),和DDoS 讓伺服器暫時癱瘓的攻擊手法相比,這是永久性的讓硬體癱瘓,必須重新更新才能復原

隔年,在2018年,美國國家標準暨技術研究院(NIST)發布了NIST SP 800 193標準(Platform Firmware Resiliency Guidelines),裡面提及平台上的Firmware 應該要符合三項安全措施

  • Protection
  • Detection
  • Recovery

之後幾年,各大廠商就陸續推出自家的PFR方案,這邊貼一下Guideline裡面對這三個項目的描述

  • Protection(保護)
    Mechanisms for ensuring that Platform Firmware code and critical data remain in a state of integrity and are protected from corruption, such as the process for ensuring the authenticity and integrity of firmware updates.
    確保平台固件代碼和關鍵數據保持完整性並防止損壞的機制,例如確保固件更新的真實性和完整性的過程。

  • Detection(檢測):
    Mechanisms for detecting when Platform Firmware code and critical data have been corrupted or otherwise changed from an authorized state.
    用於檢測平台固件代碼和關鍵數據何時已損壞或以其他方式從授權狀態更改的機制。

  • Recovery(恢復):
    Mechanisms for restoring Platform Firmware code and critical data to a state of integrity in the event that any such firmware code or critical data are detected to have been corrupted, or when forced to recover through an authorized mechanism. Recovery is limited to the ability to recover firmware code and critical data
    在檢測到任何此類固件代碼或關鍵數據已損壞或通過授權機制強制恢復時,將平台固件代碼和關鍵數據恢復到完整性狀態的機制。 恢復僅限於恢復固件代碼和關鍵數據的能力

這些機制可以透過韌體(例如BMC)本身完成,也可以透過外部第三方(例如FPGA)來協助完成,只要符合最終目標即可,其中 Intel 提出的Solution 就是以FPGA 來協助實現PFR的,我們可以從官方釋出的介紹影片來看一下

Intel® Platform Firmware Resilience Overview (影片滑到最底下)

DETECT:PFR FPGA 會驗證 SPI flash 中的數位簽章,再比對每個Region的Hash value,確認Image是否被竄改


RECOVERY:PFR FPGA可以自動恢復損壞的韌體

(Intel 將Flash 切成不同的區塊例如 stage、recovery和 active,上電載入的程式碼會放在Active 區塊,如果這個BMC/BIOS開不了機或一直重啟,這樣PFR FPGA就會自動將Recovery區塊放的Image 燒到 Active 區塊)


PROTECT:PFR FPGA監控和過濾系統總線上的惡意流量

 (原本很多I2C Device是直接對接BMC的,但現在會先經過PFR FPGA,只有白名單上的指令才可以By pass給BMC)

(PROTECT應該還有Secure Update,但影片沒看到)


最後,其實目前台灣業界也有針對IoT 設備有類似的規定,例如TAICS提出的"物聯網裝置安全檢測標準",就有說明IoT 設備需要做到哪些部分

這樣應該更好理解,PFR 是一份為了防範惡意攻擊所設計的安全性規範

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。