收集 H3C Comware Platform Switch 記錄

支援的國家/地區:

本文說明如何使用 Bindplane,將 H3C Comware Platform Switch 記錄檔擷取至 Google Security Operations。

H3C Comware Platform Switches 是企業級網路交換器,透過 Comware 作業系統提供第 2 層和第 3 層交換功能、進階安全防護功能,以及全方位的網路管理。交換器透過資訊中心功能支援廣泛的記錄功能,可監控網路作業、安全事件和系統診斷。

事前準備

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

  • Google SecOps 執行個體
  • Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機
  • Bindplane 代理程式與 H3C Comware 平台交換器之間的網路連線
  • 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
  • 透過主控台、Telnet 或 SSH 取得 H3C Comware Platform Switch 管理控制台的特殊權限
  • 啟用資訊中心功能的 H3C Comware 平台交換器 (預設為啟用)

取得 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
    
  3. 等待安裝完成。

  4. 執行下列指令來驗證安裝:

    sc query observiq-otel-collector
    

服務應顯示為「RUNNING」(執行中)

Linux 安裝

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

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    
  3. 等待安裝完成。

  4. 執行下列指令來驗證安裝:

    sudo systemctl status observiq-otel-collector
    

服務應顯示為啟用 (執行中)

其他安裝資源

如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南

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

找出設定檔

  • Linux:

    sudo nano /etc/bindplane-agent/config.yaml
    
  • Windows:

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

編輯設定檔

  • config.yaml 的所有內容替換為下列設定:

    receivers:
      udplog:
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/h3c_switch:
        compression: gzip
        creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: H3C_SWITCH
        raw_log_field: body
        ingestion_labels:
          env: production
    
    service:
      pipelines:
        logs/h3c_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/h3c_switch
    

設定參數

  • 請替換下列預留位置:

    • 接收器設定:

      • listen_address:設為 0.0.0.0:514,即可在 UDP 通訊埠 51 的所有介面上接聽。如果您在 Linux 上以非根身分執行,可以使用其他通訊埠,例如 1514
    • 匯出工具設定:

      • creds_file_path:擷取驗證檔案的完整路徑:
        • Linux/etc/bindplane-agent/ingestion-auth.json
        • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
      • customer_id:將 YOUR_CUSTOMER_ID 替換為上一步中的客戶 ID。
      • endpoint:區域端點網址:
        • 美國malachiteingestion-pa.googleapis.com
        • 歐洲europe-malachiteingestion-pa.googleapis.com
        • 亞洲asia-southeast1-malachiteingestion-pa.googleapis.com
        • 如需完整清單,請參閱「區域端點
      • log_type:設為 H3C_SWITCH,與顯示內容完全一致。
      • ingestion_labels:YAML 格式的選用標籤 (例如 env: production)。

儲存設定檔

編輯完成後,請儲存檔案:

  • Linux:依序按下 Ctrl+OEnterCtrl+X
  • Windows:依序點選「檔案」>「儲存」

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

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

    sudo systemctl restart observiq-otel-collector
    
    1. 確認服務正在執行:

        sudo systemctl status observiq-otel-collector
      
    2. 檢查記錄中是否有錯誤:

        sudo journalctl -u observiq-otel-collector -f
      
  • 如要在 Windows 中重新啟動 Bindplane 代理程式,請選擇下列任一做法:

    • 以管理員身分開啟命令提示字元或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服務控制台:

      1. 按下 Win+R 鍵,輸入 services.msc,然後按下 Enter 鍵。
      2. 找出 observIQ OpenTelemetry Collector
      3. 按一下滑鼠右鍵,然後選取「重新啟動」

      4. 確認服務正在執行:

        sc query observiq-otel-collector
        
      5. 檢查記錄中是否有錯誤:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

設定 H3C Comware 平台交換器 Syslog 轉送

設定 H3C Comware Platform Switch,將系統記錄檔訊息傳送至 Bindplane 代理程式。

存取交換器 CLI

  1. 使用下列任一方法登入 H3C Comware Platform Switch:
    • 連接控制台通訊埠
    • Telnet
    • SSH
  2. 輸入下列指令,進入系統檢視畫面:

    <H3C> system-view
    

提示會變更為 [H3C],表示您已進入系統檢視畫面。

確認資訊中心已啟用

  • H3C Comware Platform Switch 預設會啟用資訊中心。如要驗證或啟用資訊中心,請輸入下列指令:

    [H3C] info-center enable
    
  • 如果資訊中心已啟用,系統會顯示:

    Info: Information center is enabled.
    

設定時間戳記格式 (選用)

  • 傳送至記錄主機的系統資訊預設時間戳記格式為日期。如要設定時間戳記格式,請使用下列指令:

    [H3C] info-center timestamp loghost date
    
  • 可用的時間戳記格式:

    • date:格式為「Mmm dd hh:mm:ss:ms yyyy」(例如 Dec 8 10:12:21:708 2012)
    • iso:ISO 8601 格式 (例如 2012-09-21T15:32:55)
    • no-year-date:目前的系統日期和時間 (不含年份)
    • none:沒有時間戳記資訊

設定記錄主機

  • 將 Bindplane 代理程式主機指定為記錄主機。設施參數可設為 local0 到 local7,預設值為 local7。

    [H3C] info-center loghost BINDPLANE_AGENT_IP port 514 facility local7
    
    • BINDPLANE_AGENT_IP 替換為執行 Bindplane 代理程式的主機 IP 位址。

      • 舉例來說,如果 Bindplane 代理程式在主機 192.168.1.100 上執行:

        [H3C] info-center loghost 192.168.1.100 port 514 facility local7
        
      • 參數:

        • BINDPLANE_AGENT_IP:Bindplane 代理程式主機的 IP 位址
        • port 514:UDP 通訊埠編號 (必須與 Bindplane 代理程式中設定的通訊埠相符)
        • facility local7:系統記錄設施 (有效值為 local0 至 local7;預設值為 local7)

設定來源介面 (選用)

  • 只有在透過 info-center enable 指令啟用資訊中心後,資訊中心記錄主機來源指令才會生效。如要指定記錄訊息的來源介面,請按照下列步驟操作:

    [H3C] info-center loghost source INTERFACE_TYPE INTERFACE_NUMBER
    
    • 舉例來說,如要使用 VLAN 介面 1 做為來源:

      [H3C] info-center loghost source vlan-interface 1
      

停用預設記錄輸出至記錄主機

  • 根據預設,系統會將所有模組的資訊輸出至記錄主機。如要控管哪些模組會傳送記錄,請先停用預設輸出內容:

    [H3C] undo info-center source default loghost
    

設定記錄輸出規則

設定哪些模組和嚴重性等級應將記錄傳送至記錄主機。系統資訊分為八個嚴重程度等級,從 0 到 7 依序遞減。交換器會輸出嚴重程度等於或高於指定等級的系統資訊。舉例來說,如果您設定輸出規則的嚴重程度值為 6 (資訊),系統就會輸出嚴重程度值介於 0 到 6 的資訊。

  • 嚴重性等級 (0 到 7):

    • 0:緊急情況
    • 1:快訊
    • 2:重大
    • 3:錯誤
    • 4:警告
    • 5:通知
    • 6:資訊
    • 7:偵錯
  • 如要為所有模組設定資訊層級以上的記錄輸出,請執行下列操作:

    [H3C] info-center source default loghost level informational
    
  • 如要設定特定模組 (例如 ARP 和 IP) 的記錄輸出內容,請按照下列步驟操作:

    [H3C] info-center source arp loghost level informational
    [H3C] info-center source ip loghost level informational
    
  • 如要查看可用的來源模組,請使用:

    [H3C] info-center source ?
    

儲存設定

  1. 儲存設定,確保設定在重新啟動後仍有效:

    [H3C] save
    
  2. 系統顯示提示訊息時,請輸入 Y 確認。

驗證設定

  • 如要驗證資訊中心設定,請使用下列指令:

    [H3C] display info-center
    

這項指令會顯示目前的資訊中心設定,包括記錄主機設定、輸出規則和管道設定。

完整設定範例

  • 以下範例顯示完整設定,可將所有模組的記錄 (資訊層級以上) 傳送至 192.168.1.100 的記錄主機:

    <H3C> system-view
    [H3C] info-center enable
    [H3C] info-center timestamp loghost date
    [H3C] info-center loghost 192.168.1.100 port 514 facility local7
    [H3C] undo info-center source default loghost
    [H3C] info-center source default loghost level informational
    [H3C] save
    

特定模組的設定範例

  • 以下範例顯示將資訊層級的 ARP 和 IP 模組記錄傳送至記錄主機的設定:

    <H3C> system-view
    [H3C] info-center enable
    [H3C] info-center loghost 192.168.1.100 port 514 facility local7
    [H3C] undo info-center source default loghost
    [H3C] info-center source arp loghost level informational
    [H3C] info-center source ip loghost level informational
    [H3C] save
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
extensions.auth.type 事件中使用的驗證類型
主機名稱 intermediary.asset.hostname 與中介程式相關聯的資產主機名稱
主機名稱 intermediary.hostname 中介實體的主機名稱
inter_ip intermediary.asset.ip 與中介裝置相關聯的資產 IP 位址
inter_ip intermediary.ip 中介實體的 IP 位址
IPAddr、prin_ip principal.asset.ip 與主體相關聯的資產 IP 位址
IPAddr、prin_ip principal.ip 主體的 IP 位址
prin_port principal.port 與主體相關聯的通訊埠編號
使用者、使用者 principal.user.userid 主體的使用者 ID
tar_host target.asset.hostname 與目標相關聯的資產主機名稱
tar_host target.hostname 目標實體的主機名稱
tar_ip target.asset.ip 與目標相關聯的資產 IP 位址
tar_ip target.ip 目標實體的 IP 位址
tar_port target.port 與目標相關聯的通訊埠編號
tar_user target.user.userid 目標的使用者 ID
Line、OperateType、OperateTime、OperateState、OperateEndTime、EventIndex、CommandSource、ConfigSource、ConfigDestination additional.fields 標準 UDM 欄位未涵蓋的其他中繼資料欄位
遞減 metadata.description 事件說明
時間戳記 metadata.event_timestamp 事件發生的時間戳記
metadata.event_type 事件類型 (例如USER_LOGIN、NETWORK_CONNECTION)
event_type metadata.product_event_type 產品專屬事件類型 ID
metadata.product_name 產生事件的產品名稱
metadata.vendor_name 產品供應商名稱

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