搜尋實體背景資訊資料

支援的國家/地區:

使用者可以在 Google Security Operations 帳戶中搜尋及查看與實體相關的背景資訊事件,藉此加強安全調查和事件回應。這項功能與僅限於標準統合式資料模型 (UDM) 事件結構定義的搜尋不同,可滿足搜尋 UDM 事件資料以外內容的需求,包括 UDM 實體背景資訊,並深入瞭解安全性事件。

主要優點

  • 資安分析師和威脅獵人可以查詢實體的背景資訊。
  • 協助進行根本原因分析、威脅搜尋和鑑識。
  • 使用者可以對實體背景資訊執行統計搜尋,透過遙測分析瞭解遙測模式和受影響的實體。

您可以透過實體背景資訊,以以下方式從搜尋結果中取得洞察資料:

  • 使用 UDM 實體欄位名稱進行搜尋:使用 UDM 實體欄位名稱建立搜尋查詢。舉例來說,如要找出與特定主機名稱相關聯的所有內容事件,請使用 graph.entity.hostname 建立搜尋。
  • 存取「總覽」分頁:「總覽」分頁會根據使用者輸入的查詢,顯示搜尋結果中找到的實體摘要資訊。「總覽」頁面會顯示實體類型的資訊,例如 DOMAIN_NAMEIP_ADDRESSASSETUSERFILEGROUPRESOURCE
  • 使用「實體」分頁:「實體」分頁會列出收到的所有實體內容事件,包括「隨時間變化的趨勢」、「快照篩選器」、「匯總」和「事件」等子元件。實體會分為「有時間性」和「無時間性」實體,並顯示在不同分頁中。
  • 查看匯總:系統會顯示欄位的匯總,與 UDM 事件搜尋類似。這些匯總資料會進一步分類為情境類型:實體情境、衍生情境和全域情境。

用途:調查遭入侵的使用者帳戶

設想以下情境:安全分析師需要調查可能遭盜用的使用者帳戶 (email@company.com)。請按照下列步驟進行調查:

  1. 找出遭盜用的使用者:系統發出快訊,指出使用者 email@company.com 的帳戶疑似遭到盜用。

  2. 收集實體內容資訊:取得使用者的內容比對資料,瞭解範圍和影響。

  3. 執行查詢:使用在搜尋中使用實體背景資訊,執行下列查詢:

    • graph.entity.user.email_addresses = "email@company.com" 擷取使用者資訊。
    • graph.entity.user.email_addresses = "email@company.com" AND graph.metadata.product_name = "Google Cloud Compute Context",即可查看產品名稱和其他中繼資料。
  4. 分析「總覽」分頁:「總覽」分頁會顯示使用者的實體摘要,包括:

    • 檢查 First Seen HourLast Seen Hour 時間戳記。
  • 查看主機名稱、IP 位址和 MAC 位址 (如有)。
  • 檢查硬體型號、OS 平台和平台版本。
  1. 檢查「事件」分頁:查看與這位使用者相關的事件,包括登入嘗試和異常情況。

  2. 查看匯總資料:找出實體內容資料中的模式和異常狀況,這些資料會分配到實體內容、衍生內容和全域內容中。

如要搜尋實體背景資訊資料,請在搜尋查詢中使用 UDM 實體欄位名稱:

  • graph.entity.hostname
  • graph.entity.ip = "8.8.8.8" and graph.metadata.entity_type = "ASSET"

搜尋結果會顯示實體的關鍵資訊,包括:

  • 實體中繼資料
  • 指標 (First Seen HourLast Seen Hour)
  • 關係 (EntityDirectionEntity_labelEntity_typeRelationship)
  • 視實體類型而定,特定欄位,例如資產的 Principal_ip、使用者的 Mail_id、雜湊/檔案的 File_name,以及網域的 Domain_nameIP_address

搜尋中的實體背景資訊範例

本節提供實用範例,說明如何運用 UDM 實體背景資訊功能分析實體統計資料。

如要查看可用的內容來源和類型,請在 UDM 搜尋中執行下列 UDM 實體統計資料搜尋:

graph.metadata.source_type = $sourceType
graph.metadata.entity_type = $entityType
match:
  $sourceType, $entityType
outcome:
  $total = count(graph.metadata.product_entity_id)
order:
  $sourceType, $total desc
limit:
  100

「時間挑選器」會顯示實體圖表中的有效資料,而非情境資料的擷取時間。

由於 UDM 實體搜尋功能使用標準 UDM 搜尋介面,因此您可以運用各種功能,例如「彙整」面板 (查看最高或最低值)、結果表格,以及 UDM 統計資料展開結果。

範例:查看不重複的 ENTITY_TYPE

如要擴充 UDM 實體搜尋功能,可以加入記錄來源、命名空間和結果陣列,顯示觀察到的不同 ENTITY_TYPE,如下所示:

graph.metadata.source_type = "ENTITY_CONTEXT"
$logType = strings.to_upper(graph.metadata.event_metadata.base_labels.log_types)
$namespace = strings.to_upper(graph.metadata.event_metadata.base_labels.namespaces)
match:
  $logType, $namespace
outcome:
  $total = count(graph.metadata.product_entity_id)
  $entityTypes = array_distinct(graph.metadata.entity_type)
order:
  $logType, $total desc
limit:
  100

範例:調整實體集

您可以使用 UDM 搜尋樞紐功能,縮小特定實體集的範圍。 接著,這項修正會產生類似下列內容的 YARA-L 查詢:

graph.metadata.source_type = "ENTITY_CONTEXT"
$logType = strings.to_upper( graph.metadata.event_metadata.base_labels.log_types )
$namespace = strings.to_upper( graph.metadata.event_metadata.base_labels.namespaces )
AND strings.to_upper( graph.metadata.event_metadata.base_labels.log_types ) = "WINDOWS_AD"
AND strings.to_upper( graph.metadata.event_metadata.base_labels.namespaces ) = "ACME"

衍生環境

Google SecOps 提供下列類型的衍生情境:

  • 每個 ENTITY_TYPEfirst_seenlast_seen 時間戳記
  • Prevalence:存取特定 ENTITY_TYPE 的資產數量

First Seen HourLast Seen Hour 時間戳記

Google SecOps 會對傳入資料執行統計分析,並在實體背景資訊記錄中加入 first_seenlast_seen 時間戳記:

  • first_seen_hour 欄位會擷取實體首次出現在客戶環境中的時間 (以小時為單位)。
  • last_seen_hour 欄位會記錄最近一次觀察到該實體的小時。

過去 7 天內首次看到廣告的使用者:

graph.metadata.entity_type = "USER"
graph.entity.user.userid != ""
graph.entity.user.first_seen_time.hours >= timestamp.current_hours()-(86400 * 7)

過去 7 天內首次出現的網域:

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "DOMAIN_NAME"
//optional, filter to only return FQDN
graph.entity.domain.name = /^([a-zA-Z0–9]([a-zA-Z0–9-]{0,61}[a-zA-Z0–9])?\.)+[a-zA-Z]{2,}$/
graph.entity.domain.first_seen_time.hours >= timestamp.current_hours()-(86400 * 7)

過去 7 天內觀察到的檔案 (雜湊):

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "FILE"
//graph.entity.file.md5 != ""
//graph.entity.file.sha1 != ""
graph.entity.file.sha256 != ""
graph.entity.file.first_seen_time.hours >= timestamp.current_hours() - (86400 * 7)

ENTITY_TYPE 代表 FILE 雜湊,例如 entity.file.hash。 在 hash 物件中,類型可以是下列其中一種:

  • md5
  • sha1
  • sha256

如要搜尋特定雜湊值,您可以針對指定雜湊類型執行 UDM 實體搜尋:

// This will search ENTITY, DERIVED, and GLOBAL Source Types
graph.metadata.entity_type = "FILE"
graph.entity.file.sha256 = "eb5db1feadda5351c3b8fc0770e9f4c173484df5dc4a785bd1bdce7806a9e498"

IP 位址

衍生 ENTITY_TYPESIP_ADDRESS 可代表內部或外部實體。

下列 UDM 實體統計資料搜尋會找出最近觀察到的 IP_ADDRESSES,並使用彙整函式 (在結果部分) 依 CIDR 區塊計算這些項目:

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "IP_ADDRESS"
//note, for IP addresses the first seen is under artifact, not ip
graph.entity.artifact.first_seen_time.hours >= timestamp.current_hours()-(86400 * 7)
outcome:
  $total = count(graph.metadata.product_entity_id)
  $classA = sum(if(net.ip_in_range_cidr(graph.entity.ip, "10.0.0.0/8"),1,0))
  $classB = sum(if(net.ip_in_range_cidr(graph.entity.ip, "172.16.0.0/12"),1,0))
  $classC = sum(if(net.ip_in_range_cidr(graph.entity.ip, "192.168.0.0/16"),1,0))
  $classD = sum(if(net.ip_in_range_cidr(graph.entity.ip, "224.0.0.0/4"),1,0))
  // we shouldn't see results here…
  $classE = sum(if(net.ip_in_range_cidr(graph.entity.ip, "240.0.0.0/4"),1,0))
  $thisNetwork = sum(if(net.ip_in_range_cidr(graph.entity.ip, "0.0.0.0/8"),1,0))
  $loopback = sum(if(net.ip_in_range_cidr(graph.entity.ip, "127.0.0.0/8"),1,0))
  $linklocal = sum(if(net.ip_in_range_cidr(graph.entity.ip, "169.254.0.0/16"),1,0))
  $benchmark = sum(if(net.ip_in_range_cidr(graph.entity.ip, "198.18.0.0/15"),1,0))
  $cgnat = sum(if(net.ip_in_range_cidr(graph.entity.ip, "10.64.0.0/10"),1,0))

如要進一步調查異常或非預期的範圍,可以執行 UDM 實體搜尋:

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "IP_ADDRESS"
net.ip_in_range_cidr(graph.entity.ip, "198.18.0.0/15")

出現次數

盛行率一律為 DERIVED_CONTEXT 類型。

以下 UDM 實體搜尋會找出很少觀察到的網域名稱。這些網域在查詢的時間範圍 (day_max = 1) 內,每天最多與一個不同的資產相關聯,且在過去 10 天 (rolling_max = 1) 內最多與一個不同的資產相關聯。

這個模式有助於偵測環境中互動有限的網域:

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "DOMAIN_NAME"
//optional, filter to only return specific TLDs where the FQDN is more than X characters
//graph.entity.domain.name = /^.{40,}\.(?:sx|cc|st|ac|lc|wd|vg|tv|cm|gd)$/
graph.entity.domain.prevalence.rolling_max = 1
graph.entity.domain.prevalence.day_max = 1

或者,您也可以將這項搜尋轉換為匯總 UDM 實體統計資料搜尋,並匯總結果:

graph.metadata.source_type = "DERIVED_CONTEXT"
graph.metadata.entity_type = "DOMAIN_NAME"
//optional, filter to only return FQDN
graph.entity.domain.name = /^.{40,}\.(?:sx|cc|st|ac|lc|wd|vg|tv|cm|gd)$/
$domain = graph.entity.domain.name
$length = strings.length(graph.entity.domain.name)
$tld = strings.extract_domain(graph.entity.domain.name)
graph.entity.domain.prevalence.day_max = 1
graph.entity.domain.prevalence.rolling_max = 1
match:
  $domain, $tld, $length
limit:
  10

基本 UDM 實體欄位搜尋

以下是根據可用來源,在 Google SecOps 中使用「在搜尋中使用實體背景資訊」功能的其他範例:

  • graph.entity.hostname
  • graph.entity.ip = "8.8.8.8" and graph.metadata.entity_type = "ASSET"
  • principal.ip
  • principal.hostname="baz"
  • principal.ip="1.2.3.4"
  • network.dns.questions.name="youtube.com"

從實體欄位透視

使用實體欄位透視及探索相關資料。樞紐欄位的範例包括:

  • network.email.to
  • network.email.cc
  • principal.process.file.fileMetadata.pe.importHash
  • principal.process.file.sha256
  • network.dns.questions.name

瞭解動態欄位

來源會參照前置字串為 additional 的動態結構化欄位。您可以在 UDM 事件中搜尋這些欄位。

存取權控管注意事項

全域環境資料的事件數量上限為 50 個,並移除存取控制的參照。

下列來源提供全域環境支援:

  • 安全瀏覽
  • VirusTotal 關係
  • WHOIS
  • Uppercase
  • 開放原始碼情報 IOC (OPEN_SOURCE_INTEL_IOC)
  • Mandiant Active Breach IoC (MANDIANT_ACTIVE_BREACH_IOC)
  • Mandiant Fusion IoC (MANDIANT_FUSION_IOC)

限制

  • 數量限制:時間相關和時間無關的資料,累計結果數量上限皆為 100 萬。
  • 全域情境資料:對於敏感的全域情境資料 (例如 UPPERCASE_VT_PROTECTED、MANDIANT_ACTIVE_BREACH_IOC、MANDIANT_FUSION_IOC 和 VIRUS_TOTAL_CONNECTIONS),系統最多只會顯示 50 列,且僅限具有全域資料存取範圍的使用者。
  • 資料一致性:上次上線時間資料最多可能會延遲 2 小時。 相關實體可能只會顯示活動中列出的部分實體。
  • 不支援的功能

    • 實體欄位的反向查詢、分組欄位搜尋、低盛行率和熱度圖。
    • 您無法在實體內容和事件查詢之間進行聯結。

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