【Google Cloud 手把手】四步驟啟用 Security Command Center Premium Tier 服務

摘要

Security Command Center 是 Google Cloud 上一站式的資安服務,透過整合Google情資中心、 Assets、Logging 等服務,讓 Google Cloud 的使用者可以在單一服務內檢視目前雲端環境配置的優化建議、可能遭受攻擊的服務配置,甚至是在威脅發生時馬上收到告警,協助使用者快速修正服務、減輕威脅造成的影響範圍與影響程度,是我們在針對有資安服務需求的客戶會首先推薦使用的服務。

Security Command Center 除了預設啟用的 Standard tier 之外,現在還有提供 Premium, Enterprise 兩個 Service Tier,由窄至廣提供使用者能針對其不同的需求選用不同等級服務的彈性,本文主要針對 Premium Tier SCC 的啟用步驟與技術特點進行介紹。

前置作業

在啟用 SCC 前,我們須先確認目前 Google Cloud 環境的權限與設定 [1]

  • 需要已經建立Organization
  • 是否給予所需的 IAM 權限
      • Organization Admin roles/resourcemanager.organizationAdmin
      • Security Center Admin roles/securitycenter.admin
      • Security Admin roles/iam.securityAdmin
      • Create Service Accounts roles/iam.serviceAccountCreator
  • 確認有無限定網域或是限定可啟用 API 的 Organization Policy

如果有建立 restrict identities by domain 的Organization Policy:

  • 必須以特訂網域內的帳號登入 Console 進行操作
  • Service accounts 也必須於特訂網域內。如此一來我們就可以使用@*.gserviceaccount.com service account 來存取資源

如果有建立 restrict resource usage 的Organization Policy:

確認 securitycenter.googleapis.com 在允許範圍內

環境

儘管 SCC Premium Tier 可以針對單一 Project 啟用,我們還是會建議客戶針對整個 Org 啟用 Premiun Tier,因為部分的 Features 還是需要於整個 Org 啟用 Premium Tier [2]:

  • 特定的 Security Health Analytics Findings, ex:
    • Audit logging disabled
    • KMS role separation
    • Redis role used on org
    • Service account role separation
  • 特定的 Event Threat Detection Findings, ex:
    • Credential access: external member added to privileged group
    • Credential access: privileged group opened to public
    • Credential access: sensitive role granted to hybrid group
    • Defense evasion: modify VPC service control
    • Impair defenses: strong authentication disabled
    • Impair defenses: two step verification disabled
    • Initial access: account disabled hijacked
    • Initial access: disabled password leak
    • Initial access: government based attack
    • Initial access: suspicious login blocked
    • Persistence: new geography
    • Persistence: new user agent
    • Persistence: SSO enablement toggle
    • Persistence: SSO settings changed
    • Privilege escalation: suspicious cross-project permission use
    • Privilege escalation: suspicious token generation
  • 特定的 Sensitive Actions Service Finding, ex:
    • Defense Evasion: Organization Policy Changed
    • Defense Evasion: Remove Billing Admin
    • Persistence: Add Sensitive Role
  • 特定的 Attack Path Simulations
  • Security Posture

但如果客戶只是想要將 Sensitive Data Protection, Google Cloud Armor, Anomaly Detection, 與 Google Security Operations 等相關的 Findings 於 SCC 中呈現,則只需於 Org 層級啟用 Standard Tier 的 SCC 即可 [4]

Steps / 步驟說明

步驟一:選擇 Service Tier

若要啟用SCC,我們會透過 Settings 頁籤中的 Tier Detail 來選擇要啟用的 Service Tier:

若要啟用SCC,我們會透過 Settings 頁籤中的 Tier Detail 來選擇要啟用的 Service Tier
icon/enlarge
選擇要啟用的 Service Tier
icon/enlarge

步驟二:啟用 Services & Integrated Services

在我們選擇要啟用的層級後,我們會逐一針對該層級提供的服務檢視哪些功能要啟用,根據 Best Practice,我們會建議客戶全部啟用來達成更全面的防護:

在我們選擇要啟用的層級後,我們會逐一針對該層級提供的服務檢視哪些功能要啟用,根據 Best Practice,我們會建議客戶全部啟用來達成更全面的防護
icon/enlarge

因為我們是在 Organization 層級啟用 SCC,所以底下的 Projects 都會被預設帶入一樣的設定,但我們可以後續再回到 Settings 中的 Services 頁面來針對個別 Project 做調整,如下圖所示:

因為我們是在 Organization 層級啟用 SCC,所以底下的 Projects 都會被預設帶入一樣的設定,但我們可以後續再回到 Settings 中的 Services 頁面來針對個別 Project 做調整因為我們是在 Organization 層級啟用 SCC,所以底下的 Projects 都會被預設帶入一樣的設定,但我們可以後續再回到 Settings 中的 Services 頁面來針對個別 Project 做調整
icon/enlarge

除了調整啟用的 SCC Service 外,我們也會建議客戶根據需求啟用 Integrated Services:

除了調整啟用的 SCC Service 外,我們也會建議客戶根據需求啟用 Integrated Services
icon/enlarge
除了調整啟用的 SCC Service 外,我們也會建議客戶根據需求啟用 Integrated Services
icon/enlarge

Extra Features

一般在使用 SCC 的過程中,我們往往會有些不希望被判斷為配置錯誤的例外狀況、或是希望在真實事件發生前就先模擬看看有哪些資源可能會受到影響,而 SCC 也針對這樣的需求提供了對應的功能:在設定中,還有幾個我們可以在啟用時跟客戶特別提到的功能:

  • Mute Rules [5]:透過建立規則讓特定 Findings 不再跳出告警,例如有些客戶會不希望特定專案內的 Instances 跳出有對外 IP 的告警,便可以透過這功能一次性的設定,將相關的 Findings 關閉,但要注意 Mute Rules 是有 Scope 的 [6]
  • Attack path simulations [7]:透過先定義資產的價值後 [8],SCC 會根據 Findings 模擬出可能被攻擊的路徑,並且顯示出可能被用來攻擊特定 Resources 的手法,再根據資產價值程度計算出若遭受影響的嚴重程度評分。但這些只是根據可能性呈現的模擬,並不是實際已經發生的攻擊 [9],此外,可提醒客戶目前一天最多可以進行模擬四次 [10]。

步驟三:啟用 SCC Premium 完成,持續協助客戶檢視 Findings

由於 SCC 在啟用後產生 Findings 需要一些時間,我們會在啟用後的下週、下下週再協助檢視客戶環境內有什麼比較需要注意的 Findings, Misconfigurations, Vulnerabilities 等,並且確認期間有沒有發生任何的 Threats。

在 SCC 當中,Findings 被歸類為以下幾個類別 [11]:

  • Threat: 可能的 active attack 或是其他的 malicious activity, 屬於 Threat class 的 Findings應該馬上進行檢視
  • Vulnerability: 可能被用來攻擊或損害 GCP 環境的程式弱點
  • Misconfiguration: programs, assets, 或其他 resources 的錯誤配置
  • Observation: 一些目前不屬於威脅但在未來可能對 GCP 服務與環境造成影響的事件或配置describe resource configurations that don't align with your organization's 
  • Posture Violation: security posture.
  • SCC Error: identify a problem in the configuration of Security Command Center or one of its services that prevents Security Command Center from detecting security issues in your Google Cloud environment.
  • Finding Class Unspecified: identify a problem in the configuration of Security Command Center or one of its services that prevents Security Command Center from detecting security issues in your Google Cloud environment.

除了一次性地從 Findings 頁面檢視全部的 Findings 外,我們也可以透過 Sources, Assets 等頁面來快速篩選出我們想查看的訊息。但從 Findings 頁面可以透過 Quick Filter 或是直接使用 Query [12] 針對 Findings 的類別、嚴重程度過濾需要先解決的告警是比較建議、比較直觀的第一步:

我們也可以透過 Sources, Assets 等頁面來快速篩選出我們想查看的訊息
icon/enlarge

以下簡單介紹於客戶環境內常見的幾個訊息:

  • Public IP Address: 如果不是 Web 3 的客戶,一般來說我們會建議客戶不要直接將 Instance 的 IP 暴露在網路,減少可能受到攻擊的範圍
Public IP Address: 如果不是 Web 3 的客戶,一般來說我們會建議客戶不要直接將 Instance 的 IP 暴露在網路,減少可能受到攻擊的範圍
icon/enlarge
  • Prototype Pollution: Web Security Scanner 爬蟲時發現網頁有使用到可被駭客修改的參數時會產生的告警,Application 層面的問題,需盡快修改避免遭受 XSS 等攻擊

 

Prototype Pollution: Web Security Scanner 爬蟲時發現網頁有使用到可被駭客修改的參數時會產生的告警,Application 層面的問題,需盡快修改避免遭受 XSS 等攻擊
icon/enlarge
  • Compute Project Wide SSH Keys Allowed: 如果 SSH Keys 沒有限定好可被使用的範圍,則會產生此告警
Compute Project Wide SSH Keys Allowed: 如果 SSH Keys 沒有限定好可被使用的範圍,則會產生此告警
icon/enlarge
  • GKE Security Bulletin: 使用的 OS 版本過舊也會有受到攻擊的可能
GKE Security Bulletin: 使用的 OS 版本過舊也會有受到攻擊的可能
icon/enlarge
  • GKE Runtime OS Vulnerability: 客戶若沒有選擇使用 Container-Optimized OS,則容易用到使用到有漏洞的 OS
GKE Runtime OS Vulnerability: 客戶若沒有選擇使用 Container-Optimized OS,則容易用到使用到有漏洞的 OS
icon/enlarge

一般來說,我們都會透過檢視個別 Findings 中顯示的摘要根據建議採取的行動針對受到影響的資源與設定來修正,如下圖所示:

透過檢視個別 Findings 中顯示的摘要根據建議採取的行動
icon/enlarge
透過檢視個別 Findings 中顯示的摘要根據建議採取的行動
icon/enlarge
針對受到影響的資源與設定來修正
icon/enlarge

步驟四:額外設定通知

如果沒有正確設定告警的通知,當事件發生的時候使用者針對事件的反應就會相對延遲。

因此我們會在啟用時,一並建議使用者建立 Nofication Channels,流程如下圖所示:

因此我們會在啟用時,一並建議使用者建立 Nofication Channels
icon/enlarge

若要正確設定上圖的流程,我們需要以下權限:

  • Organization Admin (roles/resourcemanager.organizationAdmin)
  • Security Center Admin (roles/securitycenter.admin)
  • Security Admin (roles/iam.securityAdmin)
  • A role with the serviceusage.services.use permission, such as Owner (roles/owner), Editor (roles/editor), or a custom role
  • Create Service Accounts (roles/iam.serviceAccountCreator)
  • Pub/Sub Editor (roles/pubsub.editor)
  • Billing Account Administrator (roles/billing.admin)

其餘詳細步驟請參考 [13]

總結

透過啟用 SCC Premium,使用者可以對整個 GCP 環境的設置、服務的安全性等平常難以透過人工一一檢視的設定有更快速且全面的掌控,並且在事件發生前、事件發生後都能更快速地介入處理、排查,減少受到攻擊的可能與威脅真的發生時產生的損害,針對 GCP 使用者來說是非常方便的一站式服務。

參考資料

[1] https://cloud.google.com/security-command-center/docs/activate-scc-for-an-organization#prerequisites 

[2] https://cloud.google.com/security-command-center/docs/activate-scc-project-level-limitations#ple-unavailable-features 

[3] https://cloud.google.com/security-command-center/docs/activate-scc-project-level-limitations#pla-feature-enabled-in-parent-gc-svcs

[4] https://cloud.google.com/security-command-center/docs/activate-scc-project-level-limitations#pla-feature-enabled-in-parent-gc-svcs 

[5] https://cloud.google.com/security-command-center/docs/how-to-mute-findings#create_mute_rules 

[6] https://cloud.google.com/security-command-center/docs/how-to-mute-findings#scope_of_mute_rules 

[7] https://cloud.google.com/security-command-center/docs/attack-exposure-learn

[8] https://cloud.google.com/security-command-center/docs/attack-exposure-define-high-value-resource-set

[9] https://cloud.google.com/security-command-center/docs/attack-exposure-learn#attack_paths_represent_possibilities 

[10] https://cloud.google.com/security-command-center/docs/attack-exposure-learn?&_gl=1*16cd46x*_ga*Mzc4NDAyODgxNy4xNjk3NzcwMTA2*_ga_WH2QY8WWF5*MTcxNjk2NDY2OC45MjUuMS4xNzE2OTY4NzU1LjAuMC4w&_ga=2.195577582.-3784028817.1697770106#simulation_schedule 

[11] https://cloud.google.com/security-command-center/docs/finding-classes

[12] https://cloud.google.com/security-command-center/docs/how-to-build-findings-query-console

[13] https://cloud.google.com/security-command-center/docs/how-to-enable-real-time-notifications

-

Hugo Lai, Solution Architect

8x Google Cloud 認證,擅長以雜揉開發者與技術顧問的溝通模式協助客戶規劃最佳雲端解決方案,目前正在努力準備第 9 Google Cloud 認證的 ex 後端工程師。

訂閱 CloudMile 電子報

所有 CloudMile 最新消息、產品動態、活動資訊和特別優惠,立即掌握。