收集 Ubiquiti Unifi 交換器記錄

支援的國家/地區:

本文說明如何使用 Bindplane,將 Ubiquiti Unifi 交換器記錄檔擷取至 Google Security Operations。剖析器會使用 Grok 模式從系統記錄訊息中擷取欄位,將原始記錄資料轉換為符合統一資料模型 (UDM) 的結構化格式。這個外掛程式會處理各種記錄格式、擷取時間戳記、主機名稱、說明和網路詳細資料等重要資訊,並在將資料合併至最終 UDM 事件前,使用其他內容擴充資料。

事前準備

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

  • Google SecOps 執行個體
  • 搭載 systemd 的 Windows 2016 以上版本或 Linux 主機
  • 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 BindPlane 代理程式需求開啟
  • Ubiquiti Controller UI 的特殊存取權

取得 Google SecOps 擷取驗證檔案

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「收集代理程式」
  3. 下載擷取驗證檔案。將檔案安全地儲存在要安裝 Bindplane 的系統上。

取得 Google SecOps 客戶 ID

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「設定檔」
  3. 複製並儲存「機構詳細資料」專區中的客戶 ID

安裝 Bindplane 代理程式

請按照下列操作說明,在 Windows 或 Linux 作業系統上安裝 Bindplane 代理程式。

Windows 安裝

  1. 以管理員身分開啟「命令提示字元」或「PowerShell」
  2. 執行下列指令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

安裝 Linux

  1. 開啟具備根層級或 sudo 權限的終端機。
  2. 執行下列指令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安裝資源

設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 Google SecOps

  1. 存取設定檔:

    1. 找出 config.yaml 檔案。通常位於 Linux 的 /etc/bindplane-agent/ 目錄,或 Windows 的安裝目錄。
    2. 使用文字編輯器 (例如 nanovi 或記事本) 開啟檔案。
  2. 按照下列方式編輯 config.yaml 檔案:

    receivers:
      udplog:
        # Replace the port and IP address as required
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/chronicle_w_labels:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/path/to/ingestion-authentication-file.json'
        # Replace with your actual customer ID from Step 2
        customer_id: <CUSTOMER_ID>
        endpoint: malachiteingestion-pa.googleapis.com
        # Add optional ingestion labels for better organization
        log_type: 'UBIQUITI_SWITCH'
        raw_log_field: body
        ingestion_labels:
    
    service:
      pipelines:
        logs/source0__chronicle_w_labels-0:
          receivers:
            - udplog
          exporters:
            - chronicle/chronicle_w_labels
    
    • 視基礎架構需求替換通訊埠和 IP 位址。
    • <CUSTOMER_ID 替換為實際的客戶 ID。
    • /path/to/ingestion-authentication-file.json 更新為「取得 Google SecOps 擷取驗證檔案」部分中驗證檔案的儲存路徑。

重新啟動 Bindplane 代理程式,以套用變更

  • 如要在 Linux 中重新啟動 Bindplane 代理程式,請執行下列指令:

    sudo systemctl restart bindplane-agent
    
  • 如要在 Windows 中重新啟動 Bindplane 代理程式,可以使用「服務」控制台,也可以輸入下列指令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

設定 Ubiquiti 交換器,傳送控制層系統記錄檔

  1. 登入 Unifi 控制器使用者介面。
  2. 開啟「Unifi Network」
  3. 依序前往「設定」>「控制平面」>「整合」分頁
  4. 找到「活動記錄」(系統記錄) 專區
  5. 啟用「SIEM Server」選項。
  6. 請提供下列設定詳細資料:
    • 按一下「編輯」類別,然後新增所需的記錄類別。
    • 伺服器位址:輸入 Bindplane 代理程式 IP 位址。
    • 「Port」(通訊埠):輸入 Bindplane 代理程式通訊埠編號 (必須為 UDP)。
  7. 按一下「套用變更」

設定 Ubquiti 交換器,傳送 CyberSecure 系統記錄檔

  1. 登入 Unifi 控制器使用者介面。
  2. 開啟「Unifi Network」
  3. 依序前往「設定」>「CyberSecure」>「流量記錄」分頁標籤
  4. 找到「活動記錄」(系統記錄) 專區
  5. 啟用「SIEM Server」選項。
  6. 請提供下列設定詳細資料:
    • 按一下「編輯」類別,然後新增所需的記錄類別。
    • 伺服器位址:輸入 Bindplane 代理程式 IP 位址。
    • 「Port」(通訊埠):輸入 Bindplane 代理程式通訊埠編號 (必須為 UDP)。
    • 停用「偵錯記錄」
  7. 按一下「套用變更」

UDM 對應表

記錄欄位 UDM 對應 邏輯
anomalies security_result.detection_fields[].key:「anomalies」
security_result.detection_fields[].value:記錄中的 anomalies
直接從原始記錄中的 anomalies 欄位對應。
application observer.application 直接從原始記錄中的 application 欄位對應。
assoc_status security_result.detection_fields[].key:「assoc_status」
security_result.detection_fields[].value:記錄中的 assoc_status
直接從原始記錄中的 assoc_status 欄位對應。
asset_details observer.asset.product_object_id:使用 grok 模式 %{GREEDYDATA:asset_id},%{GREEDYDATA:asset_version} 擷取:使用 grok 模式 %{GREEDYDATA:asset_id},%{GREEDYDATA:asset_version} 擷取
asset_software.version
系統會使用 grok 模式剖析 asset_details 欄位,以擷取 asset_idasset_version
asset_id observer.asset.product_object_id 直接從 asset_details 擷取的 asset_id 欄位對應。
asset_version observer.asset.software.version 直接從 asset_details 擷取的 asset_version 欄位對應。
bssid principal.mac 直接從原始記錄中的 bssid 欄位對應。
description metadata.description 直接從原始記錄中的 description 欄位對應。
device metadata.product_name 直接從原始記錄中的 device 欄位對應。如果沒有 device,系統會使用「UBIQUITI_SWITCH」值。
dns_resp_seen security_result.detection_fields[].key:「dns_resp_seen」
security_result.detection_fields[].value:記錄中的 dns_resp_seen
直接從原始記錄中的 dns_resp_seen 欄位對應。
DST target.ip 直接從原始記錄中的 DST 欄位對應。
DPT principal.port 轉換為整數後,直接從原始記錄中的 DPT 欄位對應。
event_type security_result.detection_fields[].key: "event_type"
security_result.detection_fields[].value: event_type 記錄中的值
直接從原始記錄中的 event_type 欄位對應。
host principal.hostname 直接從原始記錄中的 host 欄位對應。
ID additional.fields[].key:「ID」
additional.fields[].value.string_value:記錄中的 ID
直接從原始記錄中的 ID 欄位對應。
IN additional.fields[].key: "IN"
additional.fields[].value.string_value: 記錄中的 IN
直接從原始記錄中的 IN 欄位對應。
interface additional.fields[].key:「介面」
additional.fields[].value.string_value:記錄中的 interface
直接從原始記錄中的 interface 欄位對應。
LEN additional.fields[].key:「LEN」
additional.fields[].value.string_value:記錄中的 LEN
直接從原始記錄中的 LEN 欄位對應。
mac principal.mac 直接從原始記錄中的 mac 欄位對應。
metadata.event_type metadata.event_type 衍生自剖析器邏輯。如果 state 為「Down」,則設為「STATUS_SHUTDOWN」;如果 state 為「Up」,則設為「STATUS_STARTUP」;如果 kv_msgDST 存在或 principal_present 為 true,則設為「STATUS_UPDATE」;否則設為「GENERIC_EVENT」。
metadata.log_type metadata.log_type:「UBIQUITI_SWITCH」 剖析器設定的常數值。
metadata.vendor_name metadata.vendor_name:「UBIQUITI」 剖析器設定的常數值。
principal_ip principal.ip 直接從原始記錄中的 principal_ip 欄位對應。
process_id observer.process.pid 直接從原始記錄中的 process_id 欄位對應。
product_event_type metadata.product_event_type 直接從原始記錄中的 product_event_type 欄位對應。
PROTO network.ip_protocol 直接從原始記錄中的 PROTO 欄位對應。如果 PROTO 為「ICMPv6」,則值會變更為「ICMP」。
query_1 target.administrative_domain 直接從原始記錄中的 query_1 欄位對應。
query_server_1 target.ip 直接從原始記錄中的 query_server_1 欄位對應。
radio security_result.detection_fields[].key:「radio」
security_result.detection_fields[].value:記錄中的 radio
直接從原始記錄中的 radio 欄位對應。
satisfaction_now security_result.detection_fields[].key:「satisfaction_now」
security_result.detection_fields[].valuesatisfaction_now記錄中的值
直接從原始記錄中的 satisfaction_now 欄位對應。
source_port principal.port 轉換為整數後,直接從原始記錄中的 source_port 欄位對應。
SPT target.port 轉換為整數後,直接從原始記錄中的 SPT 欄位對應。
SRC principal.ipprincipal.hostname 直接從原始記錄中的 SRC 欄位對應。
sta principal.mac 直接從原始記錄中的 sta 欄位對應。
state additional.fields[].key:「state」
additional.fields[].value.string_value:記錄中的 state
直接從原始記錄中的 state 欄位對應。
timestamp metadata.event_timestamp 由日期篩選器剖析後,直接從原始記錄的 timestamp 欄位對應。
TTL additional.fields[].key:「TTL」
additional.fields[].value.string_value:記錄中的 TTL
直接從原始記錄中的 TTL 欄位對應。
vap metadata.ingestion_labels[].key:「Vap」
metadata.ingestion_labels[].value:記錄中的 vap
直接從原始記錄中的 vap 欄位對應。
version metadata.product_version 直接從原始記錄中的 version 欄位對應。

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