收集 Microsoft Defender for Cloud 快訊記錄

支援的國家/地區:

總覽

這個剖析器會從 Microsoft Defender for Cloud 的 JSON 格式記錄檔中擷取安全警示資料。這項服務會將原始記錄欄位轉換並對應至 Google SecOps UDM,處理各種資料類型和巢狀結構,同時為資料加上額外的內容和標籤,以利進行更深入的分析。

事前準備

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

  • Google SecOps 執行個體。
  • Microsoft Defender for Cloud 的特殊存取權。

設定動態饋給

在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:

  • 「SIEM 設定」>「動態消息」
  • 內容中心 > 內容包

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

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

  1. 依序前往「SIEM 設定」>「動態消息」
  2. 按一下「新增動態消息」
  3. 在下一個頁面中,按一下「設定單一動態饋給」
  4. 在「動態饋給名稱」欄位中,輸入動態饋給的名稱,例如「Microsoft Defender for Cloud alert logs」(Microsoft Defender for Cloud 快訊記錄)。
  5. 選取「Webhook」做為「來源類型」
  6. 選取「Microsoft Defender for Cloud」做為「記錄類型」
  7. 點選「下一步」
  8. 選用:指定下列輸入參數的值:
    • 分割分隔符號:用於分隔記錄行的分隔符號,例如 \n
  9. 點選「下一步」
  10. 在「Finalize」畫面中檢查動態饋給設定,然後按一下「Submit」
  11. 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
  12. 複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
  13. 在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
  14. 按一下 [完成]

從內容中心設定動態饋給

為下列欄位指定值:

  • 分割分隔符號:用於分隔記錄行的分隔符號,例如 \n

進階選項

  • 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
  • 來源類型:將記錄收集到 Google SecOps 的方法。
  • 資產命名空間:與動態饋給相關聯的命名空間。
  • 擷取標籤:套用至這個動態饋給所有事件的標籤。

  • 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。

  • 複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。

  • 在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。

為 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:您產生的密鑰,用於驗證動態饋給。

建立 Azure Logic App

  1. 登入 Azure 入口網站 (https://portal.azure.com)。
  2. 按一下「建立資源」,然後搜尋「Logic App」
  3. 按一下「建立」即可開始部署程序。
  4. 設定 Logic App:
    • 名稱:為 Logic App 提供描述性名稱 (例如 GoogleSecOpsWebhook)。
    • 訂閱:選取適當的訂閱方案。
    • 資源群組:選擇現有資源群組或建立新群組。
    • 位置:選擇最接近您環境的位置。
    • 記錄檔分析:如要記錄 Logic App 的診斷資料,請啟用這個選項。
  5. 按一下「檢閱 + 建立」,建立 Logic App。
  6. 按一下「建立」即可部署 Logic App。

設定 Azure 邏輯應用程式 Webhook 連線

  1. 前往上一個步驟中建立的 Logic App。
  2. 依序點選「開發工具」>「邏輯應用程式設計工具」
  3. 按一下「新增觸發條件」
  4. 搜尋「Microsoft Defender for Cloud」>「When a Microsoft Defender for Cloud alert is created or triggered」(在建立或觸發 Microsoft Defender for Cloud 快訊時) 做為觸發條件。

  5. 按一下「建立新項目」,然後按照提示進行驗證。

  6. 按一下「插入新步驟」,在工作流程中新增步驟。

  7. 按一下「新增動作」

  8. 搜尋「HTT」HTT

  9. 選取「HTTP」做為動作。

  10. 設定 HTTP 動作:

    • URI:您可以在這裡輸入 Google SecOps API 端點網址。
    • 方法POST
    • 新增 Content-Type 標頭:將 Content-Type 設為標頭鍵,並將 application/json 設為標頭值。這會告知 Google SecOps 傳送資料的格式。
    • 在查詢中加入 API 金鑰:將 key 設為第一個查詢鍵,並將 <API_KEY> 設為查詢值。API_KEY 是在設定 Google SecOps 資訊提供時產生的 API 金鑰值。
    • 在查詢中新增密鑰:將 secret 設為第二個查詢鍵,並將 <SECRET_KEY> 設為查詢值。SECRET_KEY 是在設定 Google SecOps 資訊提供時產生的密鑰。
    • 從上一個步驟設定主體:依序點選「輸入要求內容」>「輸入上一個步驟的資料」 (輸入欄位左側的閃電圖示按鈕)。
  11. 按一下 [儲存]

設定 Microsoft Defender Cloud Alerts Webhook

  1. 前往 Microsoft Defender for Cloud
  2. 依序點選「管理」>「工作流程自動化」
  3. 按一下「新增工作流程自動化」
    • 名稱:為自動化規則提供描述性名稱 (例如 ForwardAlertsToGoogleSecOps)。
    • 資源群組:選擇現有資源群組。
    • Defender for Cloud 資料類型:選擇「安全性快訊」
    • 快訊嚴重程度:選擇「全選」
    • 顯示下列訂閱項目的 Logic Apps 執行個體:選擇建立 Logic Apps 的訂閱項目。
    • 選取 Logic App:選擇在上一個步驟中建立的 Logic App。
  4. 按一下「建立」,即可儲存工作流程自動化動作。

UDM 對應表

記錄欄位 UDM 對應 邏輯
AlertLink principal.resource.attribute.labels.AlertLink.value 直接對應。
AlertName security_result.rule_name 直接對應。
AlertSeverity security_result.severity 如果值為 HIGH、MEDIUM、LOW、CRITICAL、UNKNOWN_SEVERITY,則會直接對應。否則會對應至 security_result.severity_details。系統會先將值轉換為大寫,再進行比較。
AlertType security_result.threat_name 直接對應。
CompromisedEntity principal.resource.attribute.labels.CompromisedEntity.value 直接對應。
Description security_result.description 直接對應。
DisplayName security_result.summary 直接對應。
EndTime about.resource.attribute.labels.EndTime.value 直接對應。
Entities[].Location.City principal.location.city 直接對應。
Entities[].Location.CountryName principal.location.country_or_region 直接對應。
ExtendedLinks[].Category about.resource.attribute.labels.extendedLink_Category.value 直接對應。
ExtendedLinks[].Href about.resource.attribute.labels.extendedLink_Href.value 直接對應。
ExtendedLinks[].Label about.resource.attribute.labels.extendedLink_Label.value 直接對應。
ExtendedLinks[].Type about.resource.attribute.labels.extendedLink_Type.value 直接對應。
ExtendedProperties.Account Session Id network.session_id 重新命名為 accountSessionId 後直接對應。
ExtendedProperties.Alert Id metadata.product_log_id 重新命名為 alertId 後直接對應。
ExtendedProperties.Authentication type extensions.auth.auth_details 重新命名為 authenticationType 後直接對應。
ExtendedProperties.Client Application principal.application 重新命名為 clientApplication 後直接對應。
ExtendedProperties.Client Hostname principal.asset.hostnameprincipal.hostname 重新命名為 clientHostName 後直接對應。
ExtendedProperties.Client IP address principal.asset.ipprincipal.ip 重新命名為 clientIpAddress 後直接對應。
ExtendedProperties.Client IP location principal.location.country_or_region 重新命名為 clientIpLocation 後直接對應。
ExtendedProperties.Client Location principal.location.country_or_region 重新命名為 clientLocation 後直接對應。
ExtendedProperties.Client Principal Name principal.user.userid 重新命名為 clientPrincipalName 後直接對應。
ExtendedProperties.Compromised Host principal.asset.hostnameprincipal.hostname 重新命名為 compromisedHost 後直接對應。
ExtendedProperties.Suspicious Command Line target.process.command_line 重新命名為 suspiciousCommandLine 後直接對應。
ExtendedProperties.Suspicious Process target.process.file.full_path 重新命名為 suspiciousProcess 後直接對應。
ExtendedProperties.Suspicious Process Id target.process.pid 重新命名為 suspiciousProcessId 後直接對應。
ExtendedProperties.User agent network.http.user_agent 重新命名為 userAgent 後直接對應。
ExtendedProperties.User Name principal.user.user_display_name 重新命名為 userName 後直接對應。
ExtendedProperties.resourceType principal.resource.name 直接對應。
IsIncident security_result.detection_fields.IsIncident.value 直接對應。已轉換為字串。
ProcessingEndTime about.resource.attribute.labels.ProcessingEndTime.value 直接對應。
ProductName metadata.product_name 直接對應。
ResourceId principal.resource.product_object_id 直接對應。
SourceSystem security_result.detection_fields.SourceSystem.value 直接對應。
StartTime about.resource.attribute.labels.StartTime.value 直接對應。
Status security_result.detection_fields.Status.value 直接對應。
SystemAlertId metadata.product_log_id 直接對應。
Tactics security_result.attack_details.tactics.name 直接對應。
TenantId additional.fields.TenantId.string_value 直接對應。
TimeGenerated about.resource.attribute.labels.TimeGenerated.value 直接對應。
VendorName metadata.vendor_name 直接對應。
WorkspaceResourceGroup target.resource.attribute.labels.WorkspaceResourceGroup.value 直接對應。
WorkspaceSubscriptionId target.resource.attribute.labels.WorkspaceSubscriptionId.value 直接對應。
_Internal_WorkspaceResourceId target.resource.product_object_id 直接對應。
properties.alertDisplayName security_result.rule_name 直接對應。
properties.alertType security_result.threat_name 直接對應。
properties.alertUri principal.resource.attribute.labels.AlertUri.value 直接對應。
properties.correlationKey principal.resource.attribute.labels.correlationKey.value 直接對應。
properties.description security_result.description 直接對應。
properties.endTimeUtc additional.fields.EndTime.string_value 直接對應。
properties.entities[].location.city principal.location.city 直接對應。
properties.entities[].location.countryName principal.location.country_or_region 直接對應。
properties.entities[].location.latitude principal.location.region_coordinates.latitude 直接對應。已轉換為浮點數。
properties.entities[].location.longitude principal.location.region_coordinates.longitude 直接對應。已轉換為浮點數。
properties.extendedProperties.alert_Id metadata.product_log_id 直接對應。
properties.extendedProperties.clientApplication principal.application 直接對應。
properties.extendedProperties.clientIpAddress principal.asset.ipprincipal.ip 直接對應。剖析為 IP 位址。
properties.extendedProperties.clientLocation principal.location.country_or_region 直接對應。
properties.extendedProperties.clientPrincipalName principal.user.userid 直接對應。
properties.extendedProperties.compromisedEntity principal.resource.attribute.labels.CompromisedEntity.value 直接對應。
properties.extendedProperties.resourceType principal.resource.name 直接對應。
properties.IsIncident security_result.detection_fields.isIncident.value 直接對應。已轉換為字串。
properties.productName metadata.product_name 直接對應。
properties.resourceIdentifiers[].<key> additional.fields.<key>_<index>.string_value 直接對應。索引鍵 $idtype 會附加陣列中元素的索引。
properties.severity security_result.severity 如果值為 HIGH、MEDIUM、LOW、CRITICAL、UNKNOWN_SEVERITY,則會直接對應。否則會對應至 security_result.severity_details。系統會先將值轉換為大寫,再進行比較。
properties.startTimeUtc additional.fields.StartTime.string_value 直接對應。
properties.status security_result.detection_fields.Status.value 直接對應。
properties.timeGeneratedUtc additional.fields.TimeGenerated.string_value 直接對應。如果記錄中未提供,請設為「MICROSOFT_DEFENDER_CLOUD_ALERTS」。設為「MICROSOFT_DEFENDER_CLOUD_ALERTS」。如果主體或目標存在,請設為「USER_RESOURCE_ACCESS」,否則請設為「GENERIC_EVENT」。

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