收集 Microsoft Sentinel 記錄
總覽
這個剖析器會從 Microsoft Sentinel JSON 記錄中擷取欄位、執行 IP 位址擷取和字串操作等轉換作業,並將擷取的資料對應至 UDM,包括主體、目標、security_result 和中繼資料欄位。此外,這項服務也會處理各種資料類型,並將擷取的實體合併至 UDM 結構。
事前準備
請確認您已完成下列事前準備事項:
- Google SecOps 執行個體。
- Microsoft Sentinel 的存取權。
設定動態饋給
在 Google SecOps 平台中,有兩種不同的進入點可設定動態饋給:
- 「SIEM 設定」>「動態消息」
- 內容中心 > 內容包
依序前往「SIEM 設定」>「動態饋給」,設定動態饋給
如要設定動態消息,請按照下列步驟操作:
- 依序前往「SIEM 設定」>「動態消息」。
- 按一下「新增動態消息」。
- 在下一個頁面中,按一下「設定單一動態饋給」。
- 在「動態饋給名稱」欄位中,輸入動態饋給的名稱,例如「Microsoft Sentinel Logs」。
- 選取「Webhook」做為「來源類型」。
- 選取「Microsoft Sentinel」做為「記錄類型」。
- 點選「下一步」。
- 選用:指定下列輸入參數的值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
- 點選「下一步」。
- 在「Finalize」畫面上檢查新的動態饋給設定,然後按一下「Submit」。
- 按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
- 複製並儲存密鑰,因為您無法再次查看這個密鑰。您可以再次產生新密鑰,但重新產生密鑰會使先前的密鑰失效。
- 在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
- 按一下 [完成]。
從內容中心設定動態饋給
為下列欄位指定值:
- 分割分隔符號:用於分隔記錄行的分隔符號,例如
\n
。
進階選項
- 動態饋給名稱:系統預先填入的值,用於識別動態饋給。
- 來源類型:將記錄收集到 Google SecOps 的方法。
- 資產命名空間:與動態饋給相關聯的命名空間。
擷取標籤:套用至這個動態饋給所有事件的標籤。
按一下「產生密鑰」,產生驗證這個動態消息的密鑰。
複製並儲存密鑰,因為您無法再次查看這個密鑰。您可以再次產生新密鑰,但重新產生密鑰會使先前的密鑰失效。
在「詳細資料」分頁中,從「端點資訊」欄位複製動態消息端點網址。您需要在用戶端應用程式中指定這個端點網址。
為 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
:您產生的密鑰,用於驗證動態饋給。
設定 Microsoft Sentinel 事件的 Logic App
如要設定 Microsoft Sentinel 事件的 Logic App,請按照下列步驟操作:
- 登入 Azure 入口網站。
- 按一下「建立資源」。
- 搜尋 Logic App。
- 按一下「建立」即可開始建立程序。
- 指定下列輸入參數的值:
- 訂閱:選取訂閱方案。
- 資源群組:選取資源群組。
- 名稱:輸入 Logic App 的名稱。
- 區域:選取區域。
- 記錄檔分析工作區:選取記錄檔分析工作區。
- 按一下「Review + create」。
- 點選「建立」。
- 建立 Logic App 後,請按一下「前往資源」。
- 依序點選「開發工具」>「邏輯應用程式設計工具」。
- 按一下「新增觸發條件」。
- 搜尋「Microsoft Sentinel」。
- 選取「Microsoft Sentinel 事件」做為觸發條件。
- 如果尚未建立與 Microsoft Sentinel 的連線,請立即建立。按一下「建立新項目」,然後按照提示進行驗證。
- 按一下「插入新步驟」。
- 按一下「新增動作」。
- 搜尋並選取「HTTP」做為動作。
- 指定下列輸入參數的值:
- URI:動態消息端點網址。
- 方法:POST
- 標頭:新增下列標頭:
- Content-Type: application/json
- X-goog-api-key:用於驗證 Google Security Operations 的 API 金鑰。
- X-Webhook-Access-Key:您產生的密鑰,用於驗證動態饋給。
設定 Microsoft Sentinel 警報的 Logic App
如要設定 Microsoft Sentinel 快訊的 Logic App,請按照下列步驟操作:
- 前往 Azure 入口網站首頁。
- 按一下「建立資源」。
- 搜尋 Logic App。
- 按一下「建立」即可開始建立程序。
- 指定下列輸入參數的值:
- 訂閱:選取訂閱方案。
- 資源群組:選取資源群組。
- 名稱:輸入 Logic App 的名稱。
- 區域:選取區域。
- 記錄檔分析工作區:選取記錄檔分析工作區。
- 按一下「Review + create」。
- 點選「建立」。
- 建立 Logic App 後,請按一下「前往資源」。
- 依序點選「開發工具」>「邏輯應用程式設計工具」。
- 按一下「新增觸發條件」。
- 搜尋「Microsoft Sentinel」。
- 選取「Microsoft Sentinel 快訊」做為觸發條件。
- 如果尚未建立與 Microsoft Sentinel 的連線,請立即建立。按一下「建立新項目」,然後按照提示進行驗證。
- 按一下「插入新步驟」。
- 按一下「新增動作」。
- 搜尋並選取「HTTP」做為動作。
- 指定下列輸入參數的值:
- URI:動態消息端點網址。
- 方法:POST
- 標頭:新增下列標頭:
- Content-Type: application/json
- X-goog-api-key:用於驗證 Google Security Operations 的 API 金鑰。
- X-Webhook-Access-Key:您產生的密鑰,用於驗證動態饋給。
設定 Microsoft Sentinel 的自動化規則
如要設定 Microsoft Sentinel 的自動化規則,請按照下列步驟操作:
- 前往 Microsoft Sentinel Workspace。
- 依序點選「設定」>「自動化」。
- 點選「建立」。
- 選取「自動化規則」。
- 指定下列輸入參數的值:
- 名稱:輸入自動化規則的名稱。
- 觸發條件:選取「When incident is created」(事件建立時)。
- 動作:依序選取「執行劇本」>「為事件建立的 Logic App」。
- 按一下 [套用]。
- 點選「建立」。
- 選取「自動化規則」。
- 指定下列輸入參數的值:
- 名稱:輸入自動化規則的名稱。
- 觸發條件:選取「事件更新時」。
- 條件:依序點選「新增」>「條件 (And)」>「狀態」>「已變更」。
- 動作:依序選取「執行劇本」>「為事件建立的 Logic App」。
- 按一下 [套用]。
- 點選「建立」。
- 選取「自動化規則」。
- 指定下列輸入參數的值:
- 名稱:輸入自動化規則的名稱。
- 觸發條件:選取「建立快訊時」。
- 動作:依序選取「執行劇本」>「為快訊建立的 Logic App」。
- 按一下 [套用]。
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.DestinationDevice 或 target.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.hostname 或 principal.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.ip 或 security_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_id 、target.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_timestamp 、events.timestamp |
直接對應。 |
VendorName |
metadata.vendor_name |
直接對應。 |
VendorOriginalId |
additional.fields.VendorOriginalId |
直接對應。 |
_time |
metadata.event_timestamp 、events.timestamp |
以 UNIX 或 UNIX_MS 格式剖析為時間戳記。 |
(剖析器邏輯) | metadata.event_type |
如果主體、目標和 ResourceId 都存在,請設為「USER_RESOURCE_ACCESS」。否則請設為「GENERIC_EVENT」。 |
(剖析器邏輯) | metadata.log_type |
設為「MICROSOFT_SENTINEL」。 |
(剖析器邏輯) | metadata.product_name |
設為「MICROSOFT_SENTINEL」。 |
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。