分析報表,取得更豐富的背景資料
為支援安全調查,Google Security Operations 會擷取不同來源的比對內容資料、分析擷取的資料,並提供客戶環境中構件的其他背景資訊。本文提供範例,說明分析師如何在 BigQuery 的資訊主頁和 Google SecOps 結構定義中,使用脈絡豐富的資料。
如要進一步瞭解資料充實,請參閱「Google SecOps 如何充實事件和實體資料」。
使用地理位置豐富資料
UDM 事件可能包含地理位置強化資料,可在調查期間提供額外背景資訊。將 UDM 事件匯出至 BigQuery 時,這些欄位也會一併匯出。本節說明如何在建立報表時使用地理位置資訊欄位。
查詢 events 結構定義中的資料
您可以使用 BigQuery 中的 Google SecOps events 結構定義,查詢地理位置資料。以下 SQL 查詢範例會傳回所有 USER_LOGIN 事件的匯總結果,並依使用者、國家/地區以及首次和最後一次觀察時間排序。
SELECT
ip_geo_artifact.location.country_or_region,
COUNT(ip_geo_artifact.location.country_or_region) AS count_country,
ip_geo_artifact.location.state,
COUNT(ip_geo_artifact.location.state) AS count_state,
target.user.email_addresses[ORDINAL(1)] AS principal_user,
TIMESTAMP_SECONDS(MIN(metadata.event_timestamp.seconds)) AS first_observed,
TIMESTAMP_SECONDS(MAX(metadata.event_timestamp.seconds)) AS last_observed,
FROM `datalake.events`,
UNNEST (principal.ip_geo_artifact) as ip_geo_artifact
WHERE DATE(hour_time_bucket) = "2023-01-11"
AND metadata.event_type = 15001
AND metadata.vendor_name IN ("Google Cloud Platform","Google Workspace")
GROUP BY 1,3,5
HAVING count_country > 0
ORDER BY count_country DESC
下表列出可能傳回的結果範例。
| country_or_region | count_country | state | count_state | principal_user | first_observed | last_observed |
|---|---|---|---|---|---|---|
Netherlands |
5 | North Holland |
5 | admin@acme.com |
2023-01-11 14:32:51 UTC | 2023-01-11 14:32:51 UTC |
Israel |
1 | Tel Aviv District |
1 | omri@acme.com |
2023-01-11 10:09:32 UTC | 2023-01-11 15:26:38 UTC |
下列 SQL 查詢說明如何偵測兩個位置之間的距離。
SELECT
DISTINCT principal_user,
(ST_DISTANCE(north_pole,user_location)/1000) AS distance_to_north_pole_km
FROM (
SELECT
ST_GeogPoint(135.00,90.00) AS north_pole,
ST_GeogPoint(ip_geo_artifact.location.region_coordinates.longitude, ip_geo_artifact.location.region_coordinates.latitude) AS user_location,
target.user.email_addresses[ORDINAL(1)] AS principal_user
FROM `datalake.events`,
UNNEST (principal.ip_geo_artifact) as ip_geo_artifact
WHERE DATE(hour_time_bucket) = "2023-01-11"
AND metadata.event_type = 15001
AND metadata.vendor_name IN ("Google Cloud Platform","Google Workspace")
AND ip_geo_artifact.location.country_or_region != ""
)
ORDER BY 2 DESC
下表列出可能傳回的結果範例。
principal_user |
distance_to_north_pole_km |
|---|---|
omri@acme.com |
6438.98507 |
admin@acme.com |
4167.527018 |
您可以利用區域多邊形,計算從某個位置出發,在指定時間間隔內可抵達的合理區域,進而取得更實用的查詢結果。您也可以檢查多個地理位置值是否相符,找出不可能的旅行偵測結果。這些解決方案需要準確且一致的地理位置資料來源。
在資訊主頁中查看經過補充的欄位
您也可以使用地理位置資訊豐富的 UDM 欄位建構資訊主頁。圖表會顯示每個 UDM 事件的城市。您可以變更圖表類型,以不同格式查看資料。
後續步驟
如要瞭解如何搭配使用擴充資料與其他 Google SecOps 功能,請參閱下列說明:
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。