Center for Internet Security(CIS) 基準是針對 25 個以上供應商產品系列的規範配置建議。它們代表了全球網路安全專家基於共識的努力,旨在幫助保護系統免受威脅。[1]
CIS benchmark 針對不同的 OS (Linux, Windows, MacOs) 以及對應的位置(Cloud, Mobile, Network, Desktop) 都有對應的說明文件
除了可以透過文件對照外,也可以透過工具CIS-CAT直接進行掃描,掃描後會提供對應的報告以及發現的問題該如何解決的建議。
目前會需求針對 Kubernetes 作說明,CIS benchmark 關於kubernetes的說明可以在這個網站中下載
https://www.cisecurity.org/benchmark/kubernetes
CIS benchmark主要會關注的是對於Control Plane 以及 Work Node的設定
Node 類型 | 關注的Service |
---|---|
Control Plane | API, Controller Manager, Schedule, ETCD |
Worke Node | Kubelet, Kube-Proxy |
上方提到的 CIS-CAT 的工具目前免費版僅能夠提供 Windows, Ubuntu, Google Chrome, Mac OS,若要掃描 Kubernetes 相關會需要額外使用pro版本。
因此會使用另外的免費開源軟體進行,該算體是由 Aqua Security 提供的 kube-bench[2]。
kube-bench 官方中有提到該服務會盡量貼齊 CIS benchmark,但是仍可能存在誤差。
另外 kube-bench 只會提供 Automated 項目進行檢驗,除外的項目會將其列出但是需要手動去檢驗。
[INFO] 1.3 Controller Manager
[WARN] 1.3.1 Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Manual)
[FAIL] 1.3.2 Ensure that the --profiling argument is set to false (Automated)
[PASS] 1.3.3 Ensure that the --use-service-account-credentials argument is set to true (Automated)
[PASS] 1.3.4 Ensure that the --service-account-private-key-file argument is set as appropriate (Automated)
[PASS] 1.3.5 Ensure that the --root-ca-file argument is set as appropriate (Automated)
[FAIL] 1.3.6 Ensure that the RotateKubeletServerCertificate argument is set to true (Automated)
例如 1.3.1 就會需要手動去確認是否正確
考試注意
Ref
[1] https://www.cisecurity.org/cis-benchmarks
[2] https://github.com/aquasecurity/kube-bench