當系統架構過於龐雜,或是權限派發沒有邊界時,我們付出的代價不僅是被攻擊的「爆炸半徑」擴大,還包含了日常維運中無止盡的稽核、除錯與效能浪費。
英國伯明罕監獄(HMP Birmingham)發生嚴重暴動。起因是一名獄警遭到囚犯突襲,身上的鑰匙被搶走,這串被搶走的鑰匙,權限不僅僅是打開原本區域的幾間牢房而已。囚犯拿到鑰匙後,竟然能夠解鎖通往其他監區的大門,導致監獄面臨極大的暴動風險,整個監獄被迫進入封鎖狀態。
(e.g., access control, need-to-know, run-time privileges, Zero Trust)
A subject should have only the necessary rights and privileges to perform its current task — nothing more.
零信任對所有主體強制執行相同等級的嚴格驗證,無論在網路內部或外部。沒有隱含的信任。
(e.g., multi-party control, secret sharing, split knowledge)
No single subject should be given enough privileges to misuse the system on their own. Critical functions must be divided among subjects.
分割知識 (Split Knowledge) = 密碼學金鑰被分割成 n 個組件,每個個別組件不提供原始金鑰的任何知識,但可重新組合以重建原始金鑰。 (NIST SP 800-57 Part 1 Rev. 5)
(e.g., layered controls, geographical diversity, technical diversity, distributed systems)
(e.g., fail safe, fail secure, no single point of failure, failover)
(e.g., single sign-on (SSO), password vaults, resource efficiency)
(e.g., cookie management, session management, caching of credentials)
每一次存取資源的行為,都必須經過授權檢查。
| 領域 | 實踐 |
|---|---|
| Cookie 管理 | 每次請求重新驗證會話 Cookie |
| 會話管理 | 持續驗證會話狀態和權限 |
| 憑證快取 | 避免長期快取的憑證 |
| API 呼叫 | 對每個 API 請求進行認證和授權 |
(e.g., Kerckhoffs’s principle, peer review, open source, crowd source)
系統的安全不應依賴於其設計、實作或元件的保密性。
(e.g., compartmentalization/isolation, allow/accept list)
(e.g., password complexity, passwordless authentication, screen layouts, Completely Automated Public Turing test to tell Computers and Humans Apart (CAPTCHA))
安全功能應該易於使用且對使用者透明。如果安全成為障礙,使用者會繞過它。
| 領域 | 良好實踐 | 不良實踐 |
|---|---|---|
| 密碼複雜度 | 合理要求,搭配密碼管理器 | 政策太複雜以至於使用者需要寫下密碼 |
(e.g., common controls, libraries)
重用現有且經過測試的元件,避免引入新的漏洞和增加攻擊面。
開發團隊自行編寫密碼學演算法,而不使用經驗證的標準如 AES。自訂加密實作幾乎總是被發現是最薄弱的環節,導致敏感資訊洩露。
HM Prison Birmingham 2016 prison riot
https://en.wikipedia.org/wiki/HM_Prison_Birmingham