收集 Microsoft Defender for Cloud 快訊記錄檔
總覽
這個剖析器會從 Microsoft Defender for Cloud 的 JSON 格式記錄中擷取安全警示資料。這項工具會轉換並將原始記錄欄位對應至 Google SecOps UDM,處理各種資料類型和巢狀結構,同時透過額外的背景資訊和標籤豐富資料,以利進一步分析。
事前準備
請確認您已完成下列事前準備:
- Google SecOps 執行個體。
- 具備 Microsoft Defender for Cloud 的特殊權限存取權。
設定動態饋給
在 Google SecOps 平台中,有兩個不同的入口可用來設定動態消息:
- SIEM 設定 > 動態饋給
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態饋給」,設定動態饋給
如要設定動態饋給,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態」。
- 按一下「新增動態消息」。
- 在下一頁中,按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中輸入動態饋給的名稱,例如「Microsoft Defender for Cloud 快訊記錄」。
- 將「來源類型」設為「Webhook」。
- 選取「Microsoft Defender for Cloud」做為「記錄類型」。
- 點選「下一步」。
- 選用:指定下列輸入參數的值:
- 分隔符號:用於分隔記錄行 (例如
\n
) 的分隔符號。
- 分隔符號:用於分隔記錄行 (例如
- 點選「下一步」。
- 在「Finalize」畫面中查看動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,即可產生密鑰來驗證這項動態饋給。
- 複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
- 在「Details」分頁中,從「Endpoint Information」欄位複製動態饋給端點網址。您必須在用戶端應用程式中指定這個端點網址。
- 按一下 [完成]。
透過內容中心設定動態饋給
指定下列欄位的值:
- 分隔符號:用於分隔記錄行 (例如
\n
) 的分隔符號。
進階選項
- 動態饋給名稱:預先填入的值,用於識別動態饋給。
- 來源類型:用於收集記錄並匯入 Google SecOps 的方法。
- 素材資源命名空間:與動態饋給相關聯的命名空間。
攝入標籤:套用至這個動態饋給中所有事件的標籤。
按一下「產生密鑰」,即可產生密鑰來驗證這項動態饋給。
複製並儲存密鑰。您無法再次查看這個密鑰。如有需要,您可以重新產生新的密鑰,但這項操作會使先前的密鑰失效。
在「Details」分頁中,從「Endpoint Information」欄位複製動態饋給端點網址。您必須在用戶端應用程式中指定這個端點網址。
為 webhook 動態饋給建立 API 金鑰
依序前往 Google Cloud 主控台 >「憑證」。
按一下 [Create credentials] (建立憑證),然後選取 [API key] (API 金鑰)。
將 API 金鑰的存取權限制在 Google Security Operations API。
指定端點網址
- 在用戶端應用程式中,指定 webhook 動態饋給中提供的 HTTPS 端點網址。
請按照下列格式,將 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 Apps
- 登入 Azure 入口網站 (https://portal.azure.com)。
- 按一下「建立資源」,然後搜尋「Logic App」。
- 按一下「建立」即可開始部署程序。
- 設定 Logic App:
- 名稱:為邏輯應用程式提供描述性名稱 (例如「GoogleSecOpsWebhook」)。
- 訂閱:選取適當的訂閱項目。
- 資源群組:選擇現有資源群組或建立新群組。
- 位置:請選擇最接近您環境的位置。
- 記錄檔分析:如果您想記錄 Logic Apps 的診斷資料,請啟用這個選項。
- 按一下「Review + Create」,建立邏輯應用程式。
- 按一下「建立」,即可部署邏輯應用程式。
設定 Azure 邏輯應用程式 Webhook 連線
- 前往先前步驟中建立的邏輯應用程式。
- 依序點選「開發人員工具」>「邏輯應用程式設計工具」。
- 按一下「新增觸發條件」。
搜尋「Microsoft Defender for Cloud」>「當 Microsoft Defender for Cloud 警示建立或觸發時」做為觸發條件。
按一下「建立新帳戶」,然後按照提示驗證。
按一下「插入新步驟」,即可在工作流程中新增步驟。
按一下「新增動作」。
搜尋「HTT」。
選取「HTTP」HTTP做為動作。
設定 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 動態饋給設定期間產生的密鑰。 - 設定上一個步驟中的主體:依序按一下「輸入要求內容」>「輸入上一個步驟中的資料」 (輸入欄位左側有閃電圖示的按鈕)。
按一下 [儲存]。
設定 Microsoft Defender Cloud Alerts Webhook
- 前往 Microsoft Defender for Cloud。
- 依序按一下「管理」>「工作流程自動化」。
- 按一下「新增工作流程自動化」。
- 名稱:提供自動化規則的描述性名稱 (例如「ForwardAlertsToGoogleSecOps」)。
- 資源群組:選擇現有資源群組。
- Defender for Cloud 資料類型:選擇「安全性警示」。
- 警示嚴重程度:選擇「全選」。
- 顯示下列訂閱項目中的邏輯應用程式執行個體:選擇建立邏輯應用程式的訂閱項目。
- 選取 Logic App:選擇先前步驟中建立的 Logic App。
- 按一下「建立」,即可儲存工作流程自動化動作。
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.hostname 、principal.hostname |
重新命名為 clientHostName 後,直接對應。 |
ExtendedProperties.Client IP address |
principal.asset.ip 、principal.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.hostname 、principal.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.ip 、principal.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 |
直接對應。鍵 $id 和 type 會附加陣列中元素的索引。 |
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」。 |
異動
2024-07-05
- 將「isInteractive」對應至「security_result.detection_fields」。
2024-04-02
- 將「properties.createdDateTime」對應至「metadata.event_timestamp」。
- 將「properties.resourceServicePrincipalId」和「resourceServicePrincipalId」對應至「target.resource.attribute.labels」。
- 將「properties.authenticationProcessingDetails」、「authenticationProcessingDetails」和「properties.networkLocationDetails」對應至「additional.fields」。
- 將「properties.userAgent」對應至「network.http.user_agent」和「network.http.parsed_user_agent」。
- 已將「properties.authenticationRequirement」對應至「additional.fields」。
還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。