收集 Microsoft Sentinel 記錄

支援以下發布途徑:

總覽

這個剖析器會從 Microsoft Sentinel JSON 記錄中擷取欄位,執行 IP 位址擷取和字串操作等轉換作業,並將擷取的資料對應至 UDM,包括主要使用者、目標、security_result 和中繼資料欄位。它也會處理各種資料類型,並將擷取的實體合併至 UDM 結構。

事前準備

請確認您已完成下列事前準備:

  • Google SecOps 執行個體。
  • 存取 Microsoft Sentinel。

設定動態饋給

在 Google SecOps 平台中,有兩個不同的入口可用來設定動態消息:

  • SIEM 設定 > 動態饋給
  • 內容中心 > 內容包

依序前往「SIEM 設定」>「動態饋給」,設定動態饋給

如要設定動態饋給,請按照下列步驟操作:

  1. 依序前往「SIEM 設定」>「動態」
  2. 按一下「新增動態消息」
  3. 在下一頁中,按一下「設定單一動態饋給」
  4. 在「動態饋給名稱」欄位中輸入動態饋給的名稱,例如「Microsoft Sentinel Logs」
  5. 將「來源類型」設為「Webhook」
  6. 選取「Microsoft Sentinel」做為「記錄類型」
  7. 點選「下一步」
  8. 選用:指定下列輸入參數的值:
    • 分隔符號:用於分隔記錄行 (例如 \n) 的分隔符號。
  9. 點選「下一步」
  10. 在「完成」畫面中查看新的動態饋給設定,然後按一下「提交」
  11. 按一下「產生密鑰」,即可產生密鑰來驗證這項動態饋給。
  12. 您無法再次查看密鑰,因此請複製並儲存密鑰。您可以再次產生新的密鑰,但重新產生密鑰會使先前的密鑰失效。
  13. 在「Details」分頁中,從「Endpoint Information」欄位複製動態饋給端點網址。您必須在用戶端應用程式中指定這個端點網址。
  14. 按一下 [完成]

透過內容中心設定動態饋給

指定下列欄位的值:

  • 分隔符號:用於分隔記錄行 (例如 \n) 的分隔符號。

進階選項

  • 動態饋給名稱:預先填入的值,用於識別動態饋給。
  • 來源類型:用於收集記錄並匯入 Google SecOps 的方法。
  • 素材資源命名空間:與動態饋給相關聯的命名空間。
  • 攝入標籤:套用至這個動態饋給中所有事件的標籤。

  • 按一下「產生密鑰」,即可產生密鑰來驗證這項動態饋給。

  • 您無法再次查看密鑰,因此請複製並儲存密鑰。您可以再次產生新的密鑰,但重新產生密鑰會使先前的密鑰失效。

  • 在「Details」分頁中,從「Endpoint Information」欄位複製動態饋給端點網址。您必須在用戶端應用程式中指定這個端點網址。

為 webhook 動態饋給建立 API 金鑰

  1. 依序前往 Google Cloud 主控台 >「憑證」

    前往「憑證」

  2. 按一下 [Create credentials] (建立憑證),然後選取 [API key] (API 金鑰)

  3. 限制 API 金鑰存取 Google Security Operations API。

指定端點網址

  1. 在用戶端應用程式中,指定 webhook 動態饋給中提供的 HTTPS 端點網址。
  2. 請按照下列格式,將 API 金鑰和密鑰指定為自訂標頭的一部分,啟用驗證機制:

    X-goog-api-key = API_KEY
    X-Webhook-Access-Key = SECRET
    

    建議:請將 API 金鑰指定為標頭,而非在網址中指定。如果 webhook 用戶端不支援自訂標頭,您可以使用查詢參數指定 API 金鑰和密鑰,格式如下:

    ENDPOINT_URL?key=API_KEY&secret=SECRET
    

更改下列內容:

  • ENDPOINT_URL:動態饋給端點網址。
  • API_KEY:用於向 Google Security Operations 驗證的 API 金鑰。
  • SECRET:您用來驗證動態饋給而產生的密鑰。

為 Microsoft Sentinel 事件設定 Logic App

如要設定 Logic App for Microsoft Sentinel Incidents,請按照下列步驟操作:

  1. 登入 Azure 入口網站
  2. 按一下「建立資源」
  3. 搜尋「Logic App」。
  4. 按一下「Create」,即可開始建立程序。
  5. 指定下列輸入參數的值:
    • 訂閱:選取訂閱項目。
    • 資源群組:選取資源群組。
    • 名稱:輸入邏輯應用程式的名稱。
    • 區域:選取區域。
    • Log Analytics 工作區:選取 Log Analytics 工作區。
  6. 按一下「Review + create」
  7. 按一下 [建立]。
  8. 建立邏輯應用程式後,按一下「前往資源」
  9. 依序點選「開發人員工具」>「邏輯應用程式設計工具」
  10. 按一下「新增觸發條件」
  11. 搜尋「Microsoft Sentinel」
  12. 選取「Microsoft Sentinel 事件」做為觸發條件。
  13. 如果您尚未建立與 Microsoft Sentinel 的連結,請立即建立。按一下「建立新帳戶」,然後按照提示驗證。
  14. 按一下「插入新步驟」
  15. 按一下「新增動作」
  16. 搜尋並選取「HTTP」HTTP做為動作。
  17. 指定下列輸入參數的值:
    • URI:動態消息端點網址。
    • 方法:POST
    • 標頭:新增下列標頭:
      • Content-Type: application/json
      • X-goog-api-key:用於向 Google Security Operations 驗證的 API 金鑰。
      • X-Webhook-Access-Key:您產生用於驗證動態饋給的密鑰。

為 Microsoft Sentinel 警示設定邏輯應用程式

如要設定 Logic App for Microsoft Sentinel Alerts,請按照下列步驟操作:

  1. 前往 Azure 入口網站首頁
  2. 按一下「建立資源」
  3. 搜尋「Logic App」。
  4. 按一下「Create」,即可開始建立程序。
  5. 指定下列輸入參數的值:
    • 訂閱:選取訂閱項目。
    • 資源群組:選取資源群組。
    • 名稱:輸入邏輯應用程式的名稱。
    • 區域:選取區域。
    • Log Analytics 工作區:選取 Log Analytics 工作區。
  6. 按一下「Review + create」
  7. 按一下 [建立]。
  8. 建立邏輯應用程式後,按一下「前往資源」
  9. 依序點選「開發人員工具」>「邏輯應用程式設計工具」
  10. 按一下「新增觸發條件」
  11. 搜尋「Microsoft Sentinel」
  12. 選取「Microsoft Sentinel 快訊」做為觸發條件。
  13. 如果您尚未建立與 Microsoft Sentinel 的連結,請立即建立。按一下「建立新帳戶」,然後按照提示驗證。
  14. 按一下「插入新步驟」
  15. 按一下「新增動作」
  16. 搜尋並選取「HTTP」HTTP做為動作。
  17. 指定下列輸入參數的值:
    • URI:動態消息端點網址。
    • 方法:POST
    • 標頭:新增下列標頭:
      • Content-Type: application/json
      • X-goog-api-key:用於向 Google Security Operations 驗證的 API 金鑰。
      • X-Webhook-Access-Key:您產生用於驗證動態饋給的密鑰。

設定 Microsoft Sentinel 的自動化規則

如要設定 Microsoft Sentinel 的自動化規則,請按照下列步驟操作:

  1. 前往 Microsoft Sentinel Workspace
  2. 依序點選「設定」>「自動化」
  3. 按一下 [建立]。
  4. 選取「自動化動作規則」
  5. 指定下列輸入參數的值:
    • 名稱:輸入自動化規則的名稱。
    • 觸發條件:選取「當事件建立時」
    • 動作:依序選取「執行 Playbook」「為事件建立的邏輯應用程式」。
  6. 按一下 [套用]
  7. 按一下 [建立]。
  8. 選取「自動化動作規則」
  9. 指定下列輸入參數的值:
    • 名稱:輸入自動化規則的名稱。
    • 觸發條件:選取「當事件更新時」
    • 條件:依序點選「新增」>「條件 (且)」>「狀態」>「已變更」
    • 動作:依序選取「執行 Playbook」「為事件建立的邏輯應用程式」。
  10. 按一下 [套用]
  11. 按一下 [建立]。
  12. 選取「自動化動作規則」
  13. 指定下列輸入參數的值:
    • 名稱:輸入自動化規則的名稱。
    • 觸發條件:選取「建立快訊時」
    • 動作:依序選取「執行 playbook」「建立用於警示的邏輯應用程式」。
  14. 按一下 [套用]

UDM 對應表

記錄欄位 UDM 對應 邏輯
AlertGenerationStatus security_result.detection_fields.AlertGenerationStatus 在 JSON 剖析後,直接從 ExtendedProperties 欄位對應。
AlertLink principal.labels.AlertLink 直接對應。
AlertName security_result.rule_name 直接對應。
AlertSeverity security_result.severity 直接對應,並轉換為大寫。如果值為 HIGH、MEDIUM、LOW、CRITICAL 或 UNKNOWN_SEVERITY,則會對應至 security_result.severity。否則會對應至 security_result.severity_details
AlertType security_result.threat_name 直接對應。
Category security_result.detection_fields.Category 在 JSON 剖析後,直接從 ExtendedProperties 欄位對應。
CompromisedEntity principal.resource.attribute.labels.CompromisedEntity 直接對應。
CompromisedEntityId security_result.detection_fields.CompromisedEntityId 在 JSON 剖析後,直接從 ExtendedProperties 欄位對應。
ConfidenceLevel security_result.confidence_details 直接對應。
ConfidenceScore security_result.detection_fields.ConfidenceScore 直接對應。
cribl_pipe additional.fields.cribl_pipe 直接對應。
Description security_result.description 直接對應。
DestinationDevice security_result.detection_fields.DestinationDevicetarget.ip 在 JSON 剖析後,從 ExtendedProperties 欄位對應而來。如果值是有效的 IP 位址,則會對應至 target.ip。否則會將其對應為偵測欄位。
DestinationDeviceAddress target.ip 在 JSON 剖析後從 ExtendedProperties 欄位對應,但只有在 IP 位址有效時才會執行。
DeviceId security_result.detection_fields.DeviceId 在 JSON 剖析後,直接從 ExtendedProperties 欄位對應。
DisplayName security_result.summary 直接對應。
EndTime about.labels.EndTime 直接對應。
Entities.Address principal.asset.ip 在剖析 JSON 後從 Entities 陣列中擷取。系統只會對應 IP 位址。
Entities.HostName principal.asset.hostnameprincipal.asset.ip 在剖析 JSON 後從 Entities 陣列中擷取。如果值是有效的 IP 位址,則會對應至 principal.asset.ip。否則會對應至 principal.asset.hostname
Entities.IoTDevice.DeviceId security_result.detection_fields.IoTDeviceID 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.DeviceType security_result.detection_fields.IoTDeviceType 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.DeviceTypeId security_result.detection_fields.IoTDeviceTypeId 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.Importance security_result.detection_fields.IoTDeviceImportance 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.IoTSecurityAgentId security_result.detection_fields.IoTSecurityAgentId 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.Manufacturer security_result.detection_fields.IoT Manufacturer 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.OperatingSystem principal.asset.platform_software.platform_version 在 JSON 剖析後從 Entities 陣列中擷取,並移除結尾空格。
Entities.IoTDevice.PurdueLayer security_result.detection_fields.IoT PurdueLayer 在剖析 JSON 後,從 Entities 陣列中擷取。
Entities.IoTDevice.Sensor security_result.detection_fields.IoT Sensor 在剖析 JSON 後,從 Entities 陣列中擷取。
ExtendedProperties.Protocol security_result.detection_fields.Protocol 在 JSON 剖析後,直接從 ExtendedProperties 欄位對應。
ExtendedProperties.SensorId security_result.detection_fields.SensorId 在剖析 JSON 後,直接從 ExtendedProperties 欄位對應。
ExtendedProperties.SourceDevice principal.ipsecurity_result.detection_fields.SourceDevice 在 JSON 剖析後,從 ExtendedProperties 欄位對應而來。如果值是有效的 IP 位址,則會對應至 principal.ip。否則會將其對應為偵測欄位。
ExtendedProperties.SourceDeviceAddress principal.ip 在 JSON 剖析後從 ExtendedProperties 欄位對應,但僅限有效的 IP 位址。
IsIncident security_result.detection_fields.IsIncident 直接對應,並轉換為字串。
ProcessingEndTime about.labels.ProcessingEndTime 直接對應。
ProductComponentName principal.resource.attribute.labels.ProductComponentName 直接對應。
ProductName principal.resource.attribute.labels.ProductName 直接對應。
ProviderName principal.resource.attribute.labels.ProviderName 直接對應。
ResourceId principal.resource.product_object_idtarget.resource.name 直接對應。
SourceComputerId principal.asset.asset_id 直接對應,開頭為「SourceComputerId:」。
SourceSystem security_result.detection_fields.SourceSystem 直接對應。
StartTime about.labels.StartTime 直接對應。
Status security_result.detection_fields.Status 直接對應。
SystemAlertId metadata.product_log_id 直接對應。
Tactics security_result.attack_details.tactics.name 在 JSON 剖析及移除反斜線後,從 Tactics 欄位中擷取。
Techniques security_result.attack_details.techniques.id 在 JSON 剖析及移除反斜線後,從 Techniques 欄位中擷取。
TenantId additional.fields.TenantId 直接對應。
TimeGenerated about.labels.TimeGenerated 直接對應。
timestamp metadata.event_timestampevents.timestamp 直接對應。
VendorName metadata.vendor_name 直接對應。
VendorOriginalId additional.fields.VendorOriginalId 直接對應。
_time metadata.event_timestampevents.timestamp 使用 UNIX 或 UNIX_MS 格式剖析為時間戳記。
(剖析器邏輯) metadata.event_type 如果主體、目標和 ResourceId 都存在,請將其設為「USER_RESOURCE_ACCESS」。否則,請將其設為「GENERIC_EVENT」。
(剖析器邏輯) metadata.log_type 設為「MICROSOFT_SENTINEL」。
(剖析器邏輯) metadata.product_name 設為「MICROSOFT_SENTINEL」。

異動

2023-11-03

  • 將「ResourceId」對應至「target.resource.name」。
  • 如果「ResourceId」不是「空值」,且事件的「principal」或「target」其中一個不是「空值」,請將「metadata.event_type」對應至「USER_RESOURCE_ACCESS」。

2023-08-31

  • 新建的剖析器。

還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。