收集 ntopng 記錄

支援的國家/地區:

總覽

這個剖析器會以 SYSLOG 或 JSON 格式擷取 ntopng 網路監控記錄。這個外掛程式會剖析記錄訊息、將相關欄位轉換為 UDM 格式,並使用產品和供應商名稱等中繼資料擴充事件。剖析器也會處理巢狀 JSON 結構,並將特定 ntopng 欄位對應至 UDM 網路事件,包括流量快訊和使用者資源存取權。

事前準備

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

  • Google SecOps 執行個體。
  • ntopng 的特殊存取權。

設定動態饋給

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

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

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

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

  1. 依序前往「SIEM 設定」>「動態消息」
  2. 按一下「新增動態消息」
  3. 在下一個頁面中,按一下「設定單一動態饋給」
  4. 在「動態饋給名稱」欄位中,輸入動態饋給的名稱,例如「Ntopng Logs」
  5. 選取「Webhook」做為「來源類型」
  6. 選取「Ntopng」做為「記錄類型」。
  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 金鑰指定為標頭,而非在網址中指定。

  3. 如果 Webhook 用戶端不支援自訂標頭,您可以使用查詢參數指定 API 金鑰和密鑰,格式如下:

    ENDPOINT_URL?key=API_KEY&secret=SECRET
    

    更改下列內容:

    • ENDPOINT_URL:動態消息端點網址。
    • API_KEY:用於向 Google Security Operations 進行驗證的 API 金鑰。
    • SECRET:您產生的密鑰,用於驗證動態饋給。

在 ntopng 上設定 Google SecOps 的 Webhook

  1. 登入 ntopng 網頁介面。
  2. 從下拉式選單中選取「系統」選單。
  3. 依序前往「通知」>「端點」
  4. 按一下「新增」
  5. 指定下列輸入參數的值:
    • 端點名稱:提供獨一無二的描述性名稱 (例如「Google SecOps」)。
    • 端點類型:從清單中選取「Webhook」
    • Webhook 網址:輸入 Google SecOps ENDPOINT_URL,並提供 API_KEYSECRET
  6. 按一下「新增」
  7. 依序前往「通知」>「收件者」
  8. 按一下「新增」
  9. 指定下列輸入參數的值:
    • 收件者名稱:提供容易識別且不重複的名稱 (例如「Google SecOps」)。
    • 選取端點:選取先前建立的端點。
    • 嚴重程度:選取要傳送至 Google SecOps 的嚴重程度 (例如「資訊」、「警告」和「錯誤」)。
    • 類別篩選器:選取要傳送至 Google SecOps 的項目。
  10. 按一下「測試收件者」,驗證連線。
  11. 按一下「新增」即可儲存 Webhook。

設定 ntopng Webhook 資源訂閱者

  1. 前往「集區」
  2. 選取要分享事件的資源

  3. 按一下「動作」欄中的鉛筆圖示

  4. 按一下「收件者」下拉式選單。

  5. 選取「Google SecOps」Webhook 收件者。

  6. 按一下「編輯」即可儲存設定。

  7. 針對其他資源重複執行上述程序。

UDM 對應表

記錄欄位 UDM 對應 邏輯
action security_result.detection_fields.key=actionsecurity_result.detection_fields.value=%{action} 原始記錄中的 action 值會對應至含有「action」鍵的 security_result.detection_fields 物件。
alert_generation.host_info.broadcast_domain_host security_result.detection_fields.key=host_info broadcast_domain_hostsecurity_result.detection_fields.value=%{alert_generation.host_info.broadcast_domain_host} 巢狀 JSON 中的 alert_generation.host_info.broadcast_domain_host 值會對應至 security_result.detection_fields 物件,且索引鍵為「host_info broadcast_domain_host」。
alert_generation.host_info.dhcpHost security_result.detection_fields.key=host_info dhcpHostsecurity_result.detection_fields.value=%{alert_generation.host_info.dhcpHost} 巢狀 JSON 中的 alert_generation.host_info.dhcpHost 值會對應至 security_result.detection_fields 物件,且索引鍵為「host_info dhcpHost」。
alert_generation.host_info.is_blacklisted security_result.detection_fields.key=host_info is_blacklistedsecurity_result.detection_fields.value=%{alert_generation.host_info.is_blacklisted} 巢狀 JSON 中的 alert_generation.host_info.is_blacklisted 值會對應至 security_result.detection_fields 物件,並以「host_info is_blacklisted」做為鍵。
alert_generation.host_info.is_broadcast security_result.detection_fields.key=host_info is_broadcastsecurity_result.detection_fields.value=%{alert_generation.host_info.is_broadcast} 巢狀 JSON 中的 alert_generation.host_info.is_broadcast 值會對應至 security_result.detection_fields 物件,並以「host_info is_broadcast」做為鍵。
alert_generation.host_info.is_multicast security_result.detection_fields.key=host_info is_multicastsecurity_result.detection_fields.value=%{alert_generation.host_info.is_multicast} 巢狀 JSON 中的 alert_generation.host_info.is_multicast 值會對應至 security_result.detection_fields 物件,且鍵為「host_info is_multicast」。
alert_generation.host_info.localhost security_result.detection_fields.key=host_info localhostsecurity_result.detection_fields.value=%{alert_generation.host_info.localhost} 巢狀 JSON 中的 alert_generation.host_info.localhost 值會對應至 security_result.detection_fields 物件,且鍵為「host_info localhost」。
alert_generation.host_info.privatehost security_result.detection_fields.key=host_info privatehostsecurity_result.detection_fields.value=%{alert_generation.host_info.privatehost} 巢狀 JSON 中的 alert_generation.host_info.privatehost 值會對應至 security_result.detection_fields 物件,且索引鍵為「host_info privatehost」。
alert_generation.host_info.systemhost security_result.detection_fields.key=host_info systemhostsecurity_result.detection_fields.value=%{alert_generation.host_info.systemhost} 巢狀 JSON 中的 alert_generation.host_info.systemhost 值會對應至 security_result.detection_fields 物件,並以「host_info systemhost」做為鍵。
alert_generation.script_key security_result.category_details=%{alert_generation.script_key} 巢狀 JSON 中的 alert_generation.script_key 值會對應至 security_result.category_details
alert_generation.subdir security_result.detection_fields.key=alert_generation_subdirsecurity_result.detection_fields.value=%{alert_generation.subdir} 巢狀 JSON 中的 alert_generation.subdir 值會對應至 security_result.detection_fields 物件,且鍵為「alert_generation_subdir」。
alert_id security_result.detection_fields.key=alert_idsecurity_result.detection_fields.value=%{alert_id} 原始記錄中的 alert_id 值會對應至含有「alert_id」鍵的 security_result.detection_fields 物件。
alerts_map security_result.detection_fields.key=alerts_mapsecurity_result.detection_fields.value=%{alerts_map} 原始記錄中的 alerts_map 值會對應至以「alerts_map」為鍵的 security_result.detection_fields 物件。
cli2srv_bytes network.sent_bytes 原始記錄中的 cli2srv_bytes 值會轉換為無正負號整數,並對應至 network.sent_bytes
cli_asn principal.resource.attribute.labels.key=cli_asnprincipal.resource.attribute.labels.value=%{cli_asn} 原始記錄中的 cli_asn 值會轉換為字串,並對應至鍵為「cli_asn」的 principal.resource.attribute.labels 物件。
cli_blacklisted principal.resource.attribute.labels.key=cli_blacklistedprincipal.resource.attribute.labels.value=%{cli_blacklisted} 原始記錄中的 cli_blacklisted 值會轉換為字串,並對應至含有「cli_blacklisted」鍵的 principal.resource.attribute.labels 物件。
cli_city_name principal.location.city 原始記錄中的 cli_city_name 值會對應至 principal.location.city
cli_continent_name principal.resource.attribute.labels.key=cli_continent_nameprincipal.resource.attribute.labels.value=%{cli_continent_name} 原始記錄中的 cli_continent_name 值會對應至鍵為「cli_continent_name」的 principal.resource.attribute.labels 物件。
cli_country_name principal.location.country_or_region 原始記錄中的 cli_country_name 值會對應至 principal.location.country_or_region
cli_host_pool_id principal.resource.attribute.labels.key=cli_host_pool_idprincipal.resource.attribute.labels.value=%{cli_host_pool_id} 原始記錄中的 cli_host_pool_id 值會轉換為字串,並對應至含有「cli_host_pool_id」鍵的 principal.resource.attribute.labels 物件。
cli_ip principal.ipprincipal.asset.ip 原始記錄中的 cli_ip 值會對應至 principal.ipprincipal.asset.ip
cli_localhost principal.resource.attribute.labels.key=cli_localhostprincipal.resource.attribute.labels.value=%{cli_localhost} 原始記錄中的 cli_localhost 值會轉換為字串,並對應至鍵為「cli_localhost」的 principal.resource.attribute.labels 物件。
cli_location principal.location.name 原始記錄中的 cli_location 值會轉換為字串。如果不是「0」,則會對應至 principal.location.name
cli_name principal.hostnameprincipal.asset.hostname 原始記錄中的 cli_name 值會對應至 principal.hostnameprincipal.asset.hostname
cli_network principal.resource.attribute.labels.key=cli_networkprincipal.resource.attribute.labels.value=%{cli_network} 原始記錄中的 cli_network 值會轉換為字串,並對應至以「cli_network」為鍵的 principal.resource.attribute.labels 物件。
cli_port principal.port 原始記錄中的 cli_port 值會轉換為整數,並對應至 principal.port
entity_id principal.resource.attribute.labels.key=entity_idprincipal.resource.attribute.labels.value=%{entity_id} 原始記錄中的 entity_id 值會轉換為字串,並對應至以「entity_id」為鍵的 principal.resource.attribute.labels 物件。
entity_val principal.resource.attribute.labels.key=entity_valprincipal.resource.attribute.labels.value=%{entity_val} 除非等於 ip 的值,否則原始記錄中的 entity_val 值會對應至含有「entity_val」鍵的 principal.resource.attribute.labels 物件。
event.type metadata.event_type 由剖析器邏輯根據 principaltargetnetwork 欄位是否存在而決定。可能的值:NETWORK_FLOWNETWORK_UNCATEGORIZEDUSER_RESOURCE_ACCESSGENERIC_EVENT
first_seen principal.asset.first_seen_time 原始記錄中的 first_seen 值會轉換為字串,並剖析為 Epoch 紀元時間起算的毫秒數,然後對應至 principal.asset.first_seen_time
flow_risk_bitmap security_result.detection_fields.key=flow_risk_bitmapsecurity_result.detection_fields.value=%{flow_risk_bitmap} 原始記錄中的 flow_risk_bitmap 值會轉換為字串,並對應至含有「flow_risk_bitmap」鍵的 security_result.detection_fields 物件。
granularity security_result.detection_fields.key=granularitysecurity_result.detection_fields.value=%{granularity} 原始記錄中的 granularity 值會轉換為字串,並對應至鍵為「granularity」的 security_result.detection_fields 物件。
hash_entry_id security_result.detection_fields.key=hash_entry_idsecurity_result.detection_fields.value=%{hash_entry_id} 巢狀 JSON 中的 hash_entry_id 值會對應至具有「hash_entry_id」鍵的 security_result.detection_fields 物件。
host_ip principal.ipprincipal.asset.ip 從郵件的 <INT>Oct 20 15:34:53 1.1.1.1 部分擷取的 IP 位址會對應至 principal.ipprincipal.asset.ip
ifid principal.asset_id 原始記錄中的 ifid 值會轉換為字串,並對應至 principal.asset_id,前置字元為「ifid: 」。
ip principal.ipprincipal.asset.iptarget.iptarget.asset.ip 如果 is_client 為 true,原始記錄中的 ip 值會對應至 principal.ipprincipal.asset.ip。如果 is_server 為 true,則會對應至 target.iptarget.asset.ip
is_cli_attacker security_result.detection_fields.key=is_cli_attackersecurity_result.detection_fields.value=%{is_cli_attacker} 原始記錄中的 is_cli_attacker 值會轉換為字串,並對應至含有「is_cli_attacker」鍵的 security_result.detection_fields 物件。
is_cli_victim security_result.detection_fields.key=is_cli_victimsecurity_result.detection_fields.value=%{is_cli_victim} 原始記錄中的 is_cli_victim 值會轉換為字串,並對應至含有「is_cli_victim」鍵的 security_result.detection_fields 物件。
is_flow_alert security_result.detection_fields.key=is_flow_alertsecurity_result.detection_fields.value=%{is_flow_alert}security_result.detection_fields.key=alert typesecurity_result.detection_fields.value=flow 原始記錄中的 is_flow_alert 值會轉換為字串,並對應至含有「is_flow_alert」鍵的 security_result.detection_fields 物件。如果 is_flow_alert 為 true,系統也會建立 security_result.detection_fields 物件,其中包含「alert type」鍵和「flow」值。
is_srv_attacker security_result.detection_fields.key=is_srv_attackersecurity_result.detection_fields.value=%{is_srv_attacker} 原始記錄中的 is_srv_attacker 值會轉換為字串,並對應至含有「is_srv_attacker」鍵的 security_result.detection_fields 物件。
is_srv_victim security_result.detection_fields.key=is_srv_victimsecurity_result.detection_fields.value=%{is_srv_victim} 原始記錄中的 is_srv_victim 值會轉換為字串,並對應至含有「is_srv_victim」鍵的 security_result.detection_fields 物件。
metadata.product_name metadata.product_name=NTOPNG 硬式編碼為「NTOPNG」。
metadata.vendor_name metadata.vendor_name=%{vendor_name} 訊息中的 vendor_name 值會對應至 metadata.vendor_name
name principal.hostnameprincipal.asset.hostnametarget.hostnametarget.asset.hostname 如果 is_client 為 true,原始記錄中的 name 值會對應至 principal.hostnameprincipal.asset.hostname。如果 is_server 為 true,則會對應至 target.hostnametarget.asset.hostname
ntopng_key security_result.detection_fields.key=ntopng_keysecurity_result.detection_fields.value=%{ntopng_key} 巢狀 JSON 中的 ntopng.key (已重新命名為 ntopng_key) 值會對應至含有「ntopng_key」鍵的 security_result.detection_fields 物件。
observation_point_id observer.asset_id 原始記錄中的 observation_point_id 值會轉換為字串。如果不是「0」,則會對應至 observer.asset_id,並加上「id: 」前置字串。
pool_id principal.resource.attribute.labels.key=pool_idprincipal.resource.attribute.labels.value=%{pool_id} 原始記錄中的 pool_id 值會轉換為字串,並對應至鍵為「pool_id」的 principal.resource.attribute.labels 物件。
probe_ip intermediary.ip 原始記錄中的 probe_ip 值會對應至 intermediary.ip
proto.confidence security_result.confidence_details 原始記錄中的 proto.confidence 值會轉換為字串,並對應至 security_result.confidence_details
proto.http.last_method network.http.method 原始記錄中的 proto.http.last_method 值會對應至 network.http.method
proto.http.last_return_code network.http.response_code 原始記錄中的 proto.http.last_return_code 值會轉換為整數,並對應至 network.http.response_code
proto.http.last_server_name network.tls.client.server_name 原始記錄中的 proto.http.server_name 值會對應至 network.tls.client.server_name
proto.http.last_url network.http.referral_url 原始記錄中的 proto.http.last_url 值會對應至 network.http.referral_url
proto.http.last_user_agent network.http.user_agent 原始記錄中的 proto.http.last_user_agent 值會對應至 network.http.user_agent
proto.http.server_name network.tls.client.server_name 原始記錄中的 proto.http.server_name 值會對應至 network.tls.client.server_name
proto.l4 network.ip_protocol 原始記錄中的 proto.l4 值會對應至 network.ip_protocol
proto_ndpi additional.fields.key=proto ndpiadditional.fields.value.string_value=%{proto_ndpi}network.application_protocol 原始記錄中的 proto.ndpi 值 (已重新命名為 proto_ndpi) 會對應至索引鍵為「proto ndpi」的 additional.fields 物件。此外,系統也會根據「NTP」和「HTTP」等關鍵字,判斷 network.application_protocol 的值。
proto_ndpi_app principal.application 原始記錄中的 proto_ndpi_app 值會對應至 principal.application
proto_ndpi_breed security_result.detection_fields.key=proto_ndpi_breedsecurity_result.detection_fields.value=%{proto_ndpi_breed} 原始記錄中的 proto_ndpi_breed 值會轉換為字串,並對應至以「proto_ndpi_breed」為鍵的 security_result.detection_fields 物件。
proto_ndpi_cat security_result.category_details 原始記錄中的 proto_ndpi_cat 值會對應至 security_result.category_details
proto_ndpi_cat_id security_result.detection_fields.key=proto_ndpi_cat_idsecurity_result.detection_fields.value=%{proto_ndpi_cat_id} 原始記錄中的 proto_ndpi_cat_id 值會轉換為字串,並對應至以「proto_ndpi_cat_id」為鍵的 security_result.detection_fields 物件。
score security_result.detection_fields.key=scoresecurity_result.detection_fields.value=%{score} 原始記錄中的 score 值會轉換為字串,並對應至含有「score」鍵的 security_result.detection_fields 物件。
srv2cli_bytes network.received_bytes 原始記錄中的 srv2cli_bytes 值會轉換為無正負號整數,並對應至 network.received_bytes
srv_asn target.resource.attribute.labels.key=srv_asntarget.resource.attribute.labels.value=%{srv_asn} 原始記錄中的 srv_asn 值會轉換為字串,並對應至含有「srv_asn」鍵的 target.resource.attribute.labels 物件。
srv_blacklisted target.resource.attribute.labels.key=srv_blacklistedtarget.resource.attribute.labels.value=%{srv_blacklisted} 原始記錄中的 srv_blacklisted 值會轉換為字串,並對應至含有「srv_blacklisted」鍵的 target.resource.attribute.labels 物件。
srv_city_name target.location.city 原始記錄中的 srv_city_name 值會對應至 target.location.city
srv_continent_name target.resource.attribute.labels.key=srv_continent_nametarget.resource.attribute.labels.value=%{srv_continent_name} 原始記錄中的 srv_continent_name 值會對應至含有「srv_continent_name」鍵的 target.resource.attribute.labels 物件。
srv_country_name target.location.country_or_region 原始記錄中的 srv_country_name 值會對應至 target.location.country_or_region
srv_host_pool_id target.resource.attribute.labels.key=srv_host_pool_idtarget.resource.attribute.labels.value=%{srv_host_pool_id} 原始記錄中的 srv_host_pool_id 值會轉換為字串,並對應至以「srv_host_pool_id」為鍵的 target.resource.attribute.labels 物件。
srv_ip target.iptarget.asset.ip 原始記錄中的 srv_ip 值會對應至 target.iptarget.asset.ip
srv_localhost target.resource.attribute.labels.key=srv_localhosttarget.resource.attribute.labels.value=%{srv_localhost} 原始記錄中的 srv_localhost 值會轉換為字串,並對應至鍵為「srv_localhost」的 target.resource.attribute.labels 物件。
srv_location target.location.name 原始記錄中的 srv_location 值會轉換為字串。如果不是「0」,則會對應至 target.location.name
srv_location_lat target.location.region_coordinates.latitude 原始記錄中的 srv_location_lat 值會對應至 target.location.region_coordinates.latitude
srv_location_lon target.location.region_coordinates.longitude 原始記錄中的 srv_location_lon 值會對應至 target.location.region_coordinates.longitude
srv_name target.hostnametarget.asset.hostname 原始記錄中的 srv_name 值會對應至 target.hostnametarget.asset.hostname
srv_network target.resource.attribute.labels.key=srv_networktarget.resource.attribute.labels.value=%{srv_network} 原始記錄中的 srv_network 值會轉換為字串,並對應至含有「srv_network」鍵的 target.resource.attribute.labels 物件。
srv_port target.port 原始記錄中的 srv_port 值會轉換為整數,並對應至 target.port
tstamp additional.fields.key=tstampadditional.fields.value.string_value=%{tstamp} 原始記錄中的 tstamp 值會轉換為字串,並對應至鍵為「tstamp」的 additional.fields 物件。
vlan_id principal.resource.attribute.labels.key=vlan_idprincipal.resource.attribute.labels.value=%{vlan_id} 原始記錄中的 vlan_id 值會轉換為字串,並對應至鍵為「vlan_id」的 principal.resource.attribute.labels 物件。
when metadata.event_timestamp 系統會將原始記錄中的 when 值剖析為時間戳記,並對應至 metadata.event_timestamp

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