Microsoft Sentinel Workspace

部署 Microsoft Sentinel 環境涉及設計工作區(workspace)配置以滿足組織的安全性和合規性要求。設定流程包括建立 Log Analytics 工作區和設定 Microsoft Sentinel 選項。

規劃

在部署 Microsoft Sentinel 之前,了解工作區選項至關重要。 Microsoft Sentinel 解決方案安裝在 Log Analytics 工作區中,大多數實作注意事項都集中在 Log Analytics 工作區建立。建立新 Log Analytics 工作區時最重要的選項是區域(Regions)。此區域指定日誌資料將存放的位置。

三種實施方案:

  • Single-Tenant with a single Microsoft Sentinel Workspace
  • Single-Tenant with regional Microsoft Sentinel Workspaces
  • Multi-Tenant

Single-tenant single workspace

具有單一 Microsoft Sentinel 工作區的單一teant將成為同一個tenant內所有資源的日誌的中央儲存庫。

此工作區接收來自同一tenant內其他區域的資源的日誌。由於日誌資料(收集後)將跨區域傳輸並儲存在另一個區域中,因此這會產生兩個可能的問題。首先,它可能會產生頻寬成本。其次,如果存在將資料保存在特定區域的資料治理要求,則單一工作區選項將不是實施選項。

具有單一工作空間權衡的單一tenants包括:

Single-tenant with regional Microsoft Sentinel workspaces

Regional Microsoft Sentinel 工作區的單一tenant將擁有多個 Sentinel 工作區,需要建立和設定多個 Microsoft Sentinel 和 Log Analytics 工作區。

若要跨工作區查詢數據,請在table名稱之前使用workspace()函數。

TableName

| union workspace("WorkspaceName").TableName

Multi-tenant workspaces

如果需要管理不在tenant中的 Microsoft Sentinel 工作區,則可以使用 Azure Lighthouse 實作Multi-Tenant工作區。此安全性配置會授予我們對tenant的存取權限。tenant內的tenant configuration(regional or multi-regional)與先前的考慮因素相同

對 Microsoft Sentinel 和 Microsoft Defender for Cloud 使用相同的工作區,以便 Microsoft Defender for Cloud 收集的所有日誌也可以由 Microsoft Sentinel 引入和使用。 Microsoft Defender for Cloud 所建立的預設工作區不會顯示為 Microsoft Sentinel 的可用工作區。

建立

設計完工作區架構後,登入 Azure 網站。在搜尋欄中,搜尋 Sentinel,然後選擇 Microsoft Sentinel。 Microsoft Sentinel 工作區顯示目前工作區的清單。選擇 + add按鈕開始建立過程。

要開始玩這個之前需要計算兩種價錢:

  1. Sentinel + Azure Monitor Log Analytics 的價錢(基本上是資料的儲存與分析)
  2. Azure Monitor(這是將資料引入Sentinel)

先決要件

若要啟用 Microsoft Sentinel

  1. 需要在 Microsoft Sentinel 工作區所在Subscription的contributor權限。若要使用 Microsoft Sentinel
  2. 需要工作區所屬資源群組的contributor或reader權限。

建立Log Analytics Workspace

  1. 下一頁「Add Microsoft Sentinel to a workspace」將顯示可用於新增 Microsoft Sentinel 的 Log Analytics 工作區的清單。選擇 + create a new workspace按鈕以啟動「Create Log Analytics workspace」流程。
  2. 基本選項包括:

3. Select the Review + Create button and then select the Create button.

將Sentinel加入工作區

完成前面的步驟後,現在將顯示「Add Microsoft Sentinel to Workspace」畫面。

  1. 等待新建立的「Log Analytics 工作區」出現在清單中。此操作可能需要幾分鐘。
  2. 選擇新建的 Log Analytics 工作區。並選擇新增按鈕。

新的 Microsoft Sentinel 工作區現在是活動畫面。 Microsoft Sentinel 左側導覽有四個區域:

  • General
  • Threat management
  • Content management
  • Configuration

概述頁籤顯示有關所擷取的資料、告警和事故的資訊的標準儀表板。

使用 Azure Lighthouse 管理跨tenants的工作區

如果需要管理多個 Microsoft Sentinel 工作區或不在tenant中的工作區,我們有兩個選擇:

  • Microsoft Sentinel Workspace manager
  • Azure Lighthouse

Microsoft Sentinel Workspace manager

Microsoft Sentinel 的 Workspace manager讓我們能夠集中管理一個或多個 Azure tenant內的多個 Microsoft Sentinel 工作區。中央工作區(啟用Workspace manager)可以合併要大規模發佈到Member workspaces的內容項目。Member workspaces是在"Configuration settings"中啟用。

Azure Lighthouse

Azure Lighthouse 提供了允許我們存取tenant的選項。啟用 Azure Lighthouse 後,使用 Azure 網站上的目錄 + subscription selector來選擇包含管理的工作區的所有訂閱。

Azure Lighthouse 可以更靈活地管理多個客戶的資源,而無需登入不同tenant中的不同帳號。例如,服務提供者可能有兩個具有不同職責和存取等級的客戶。透過使用 Azure Lighthouse,授權使用者可以登入服務提供者的tenant來存取這些資源。

權限與角色

Microsoft Sentinel 使用 Azure 基於角色的存取控制 (Azure RBAC) 提供可指派給 Azure 中的使用者、群組和服務的內建角色。

使用 Azure RBAC 在安全維運團隊中建立和指派角色,以授予對 Microsoft Sentinel 的適當存取權。不同的角色對 Microsoft Sentinel 使用者可以看到的內容和執行的操作進行精細控制。 Azure 角色可以直接在 Microsoft Sentinel 工作區中分配,也可以在工作區所屬的訂閱或資源群組中分配,Microsoft Sentinel 將繼承該工作區。

內建角色

所有 Microsoft Sentinel 內建角色都授予 Microsoft Sentinel 工作區中資料的讀取存取權限:

  • Microsoft Sentinel Reader:
    can view data, incidents, workbooks, and other Microsoft Sentinel resources.
  • Microsoft Sentinel Responder:
    can, in addition to the above, manage incidents (assign, dismiss, etc.)
  • Microsoft Sentinel Contributor:
    can, in addition to the above, create and edit workbooks, analytics rules, and other Microsoft Sentinel resources.
  • Microsoft Sentinel Automation Contributor:
    allows Microsoft Sentinel to add playbooks to automation rules. It isn’t meant for user accounts.

為了獲得最佳結果,應將這些角色指派給包含 Microsoft Sentinel 工作區的資源群組。然後,這些角色將應用於部署以支援 Microsoft Sentinel 的所有資源(如果這些資源位於相同資源組中)。

具有特定工作要求的使用者可能需要被指派其他角色或特定權限才能完成其任務。

  • 使用playbooks自動回應威脅
    Microsoft Sentinel 使用 playbook 進行自動威脅回應。 Playbook 建構在 Azure Logic Apps之上,並且是單獨的 Azure 資源。我們可能希望為安全維運團隊的特定成員分配使用Logic Apps進行SOAR操作的能力。可以使用Logic App Contributor角色來指派使用 playbook 的明確權限。
  • 授予 Microsoft Sentinel 執行 playbook 的權限
    Microsoft Sentinel 使用特殊service account手動執行incident-trigger playbooks或從自動化規則呼叫它們。使用此帳號(而不是使用者帳號)可以提高服務的安全等級。
    為了讓自動化規則執行 playbook,必須向此帳號授予 playbook 所在資源組的明確權限。那時,任何自動化規則都將能夠運行該資源組中的任何playbook。若要向此service account授予這些權限,帳號必須對包含 playbook 的資源群組具有擁有者權限。
  • 將資料來源連接到 Microsoft Sentinel
    對於要新增資料連接器的使用者,必須為使用者指派 Microsoft Sentinel 工作區的寫入權限。請同時注意每個連接器所需的其他權限。
  • Guest users assigning incidents
    如果Guest users需要能夠指派事故,那麼除了 Microsoft Sentinel Responder 角色之外,還需要為該使用者指派 Directory Reader 角色。此角色不是 Azure 角色,而是 Microsoft Entra 角色,並且預設為常規(非來賓)使用者指派此角色。
  • 建立和刪除workbooks
    若要建立和刪除 Microsoft Sentinel workbooks,使用者需要 Microsoft Sentinel Contributor 角色或較小的 Microsoft Sentinel 角色加上 Workbook Contributor 的 Azure Monitor 角色。使用workbooks時不需要此角色,僅在建立和刪除時才需要此角色。

Azure roles and Azure Monitor Log Analytics roles

除了 Microsoft Sentinel 專用的 Azure RBAC 角色之外,其他 Azure 和 Log Analytics Azure RBAC 角色還可以授予更廣泛的權限集。這些角色包括對 Microsoft Sentinel 工作區和其他資源的存取權限。

  • Azure 角色授予對所有 Azure 資源的存取權。它們包括 Log Analytics 工作區和 Microsoft Sentinel 資源
    — Owner
    — Contributor
    — Reader
  • Log Analytics 角色授予對所有 Log Analytics 工作區的存取權限:
    — Log Analytics Contributor
    — Log Analytics Reader

例如,指派有 Microsoft Sentinel Reader 和 Azure Contributor(而非 Microsoft Sentinel Contributor)角色的使用者可以編輯 Microsoft Sentinel 中的資料。如只想向 Microsoft Sentinel 授予權限,則應小心刪除使用者先前的權限。確保不會破壞其他資源所需的任何權限角色。

Microsoft Sentinel roles and allowed actions

下表總結了 Microsoft Sentinel 中的角色和允許的操作。

設定

Microsoft Sentinel 環境設定在兩個方面進行管理。在 Microsoft Sentinel 和 Microsoft Sentinel 所在的 Log Analytics 工作區中。在 Microsoft Sentinel 中,左側導覽有一個「設定」選項。設定包括定價、設定和工作區設定標籤 — 設定會根據目前和預覽中的功能集隨時間而變化。大多數 Microsoft Sentinel 環境設定都是在 Log Analytics 工作區中管理的。 Microsoft Sentinel 網站中的其他區域會將連結 Log Analytics 網站。一個範例是在日誌分析工作區中執行的特定資料連接器配置。

對於所有工作區,工作區層級的資料保留時間可以配置為 30 到 730 天(兩年),除非它們使用舊版免費定價層。若要調整保留天數,請在「Microsoft Sentinel 設定」區域中選擇工作區設定。下一個畫面位於 Log Analytics 網站中。選擇“Usage and estimated costs”標籤。在頁面頂部,選擇“保留”按鈕。將打開一個視窗,允許調整保留天數。

日誌(Logs)

Microsoft Sentinel有三種主要log類型:

  • Analytics Logs
  • Basic Logs
  • Archive Logs

Log Analytics 工作區中每個table中的資料都會保留指定的時間區間,之後會被刪除或以較低的保存費用進行歸檔。設定保留時間以平衡資料可用的要求與降低資料保留成本。

若要存取歸檔資料,必須先使用下列方法之一從分析日誌表中擷取資料:

  • Search Jobs
  • Restore

Analytical logs
預設情況下,工作區中的所有tables都是 Analytics Logs 類型,這些tables可用於 Log Analytics 工作區的所有功能以及使用該工作區的任何其他服務。

Basic logs
可以將某些tables配置為基本日誌,以降低儲存用於偵錯、故障排除和稽核(但不用於分析和告警)的大量詳細日誌的成本。為基本日誌配置的tables具有較低的資料擷取成本,以換取減少的功能。基本日誌僅保留8天。

KQL 語言限制
針對基本日誌的查詢針對使用 KQL 語言子集的簡單資料檢索進行了最佳化,包括以下operators:

  • where
  • extend
  • project
  • project-away
  • project-keep
  • project-rename
  • project-reorder
  • parse
  • parse-where

以下則不支援

  • join
  • union
  • aggregates (summarize)

Table support Basic Logs

預設情況下,Log Analytics 中的所有table都是 Analytics tables。我們可以配置特定tables以使用基本日誌。如果 Azure Monitor 有使用到基本日誌tables的特定功能,則無法設定該table。

目前可以為基本日誌配置以下tables:

  • 使用基於DCR(Data Collection Rule) 的自訂日誌 API 建立的所有tables。
  • ContainerLogV2,Container Insights 使用它,其中包括基於詳細文字的日誌記錄。
  • AppTraces,其中包含 Application Insights 中應用程式追蹤的freeform log日誌記錄。

若要調整符合條件的tables的日誌類型,在「Microsoft Sentinel setting」區域中選擇工作區設定。在於 Log Analytics 網站中。

  1. Select the “Tables” tab.
  2. Select the table then … at the end of the row.
  3. Select Manage table
  4. Change the Table plan.
  5. Select Save

Archive Logs

歸檔可讓我們以更低的成本將舊的、較少使用的資料保留在工作空間中。每個工作區都有一個套用於所有tables的預設保留政策(retention policy)。可以對各個table設定不同的保留政策。

在互動式保留期內,資料可用於監控、故障排除和分析。當不再使用日誌,但仍需要保留資料以供合規或偶爾調查時,將日誌存檔以節省成本。可以透過執行搜尋作業或還原存檔日誌來存取存檔資料。在Log Analytics portal設定保留政策:

  1. Select the “Tables” tab.
  2. Select the table then … at the end of the row.
  3. Select Manage table
  4. Change the Total retention period.
  5. Select Save

--

--

運用"雲端服務"加速企業的數位轉型願景
運用"雲端服務"加速企業的數位轉型願景

Written by 運用"雲端服務"加速企業的數位轉型願景

我們協助您駕馭名為"雲端運算"的怪獸,馴服它為您所用。諮詢請來信jason.kao@suros.com.tw. https://facebook.com/jason.kao.for.cloud

No responses yet