收集 Dell 交換器記錄

剖析器版本:11.0

支援的服務:

本文說明如何使用 Bindplane 代理程式,將 Dell 交換器記錄檔擷取至 Google Security Operations。

這個剖析器會擷取 Dell 交換器記錄、正規化時間戳記,並使用 grok 模式將記錄訊息結構化為鍵/值組合。接著,系統會將這些擷取的欄位對應至統合式資料模型 (UDM),處理各種記錄格式,並使用資產詳細資料和安全性嚴重程度等背景資訊來擴充資料。

事前準備

請確認您符合下列必要條件:

  • Google SecOps 執行個體
  • Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機
  • Bindplane 代理程式與 Dell 交換器之間的網路連線
  • 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式規定開啟
  • Dell 交換器的有效連線和管理憑證

取得 Bindplane 代理程式的 Google SecOps 憑證

如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:在 2027 年 7 月 20 日停用 Ingestion API 前,請繼續使用擷取驗證檔案 (選項 2)。
  1. 登入 Google Cloud 控制台,選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
  3. 按一下「建立服務帳戶」。
  4. 請提供下列設定詳細資料:
    • 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如 bindplane-ingest)。
    • 服務帳戶說明:輸入說明 (例如 Bindplane agent log ingestion)。
  5. 點按「Create and continue」(建立並繼續)。
  6. 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
  7. 依序點選「繼續」和「完成」。
  8. 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
  9. 依序點選「新增金鑰」>「建立新的金鑰」。
  10. 選取「JSON」,然後按一下「建立」。金鑰檔案會下載到電腦。
  11. 將金鑰檔案儲存為 Bindplane 收集器目錄中的 ingestion-auth.json (Linux 上的 /opt/observiq-otel-collector/ingestion-auth.json 或 Windows 上的 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新 config.yaml 中的 creds_file_path,使其與儲存路徑相符。
  12. 依序前往「IAM & Admin」 > 「Settings」,然後複製「Project number」。設定匯出工具時會用到。

方法 2:下載擷取驗證檔案 (舊版)

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM Settings」 > 「Collection Agents」。
  3. 下載擷取驗證檔案。
  4. 將檔案安全地儲存在要安裝 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. 開啟具有 root 或 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
    

    服務應顯示為「active (running)」。

其他安裝資源

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

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

找出設定檔

  • Linux:

    sudo nano /opt/observiq-otel-collector/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/dell_switch:
        protocol: https
        # Region of your instance, for example us, europe, asia-southeast1
        location: <LOCATION>
        # Project number of the Google Cloud project linked to the instance
        project: '<PROJECT_NUMBER>'
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: chronicle.googleapis.com
        log_type: DELL_SWITCH
        raw_log_field: body
    
    service:
      pipelines:
        logs/dell_switch_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/dell_switch
    

設定參數

替換下列預留位置:

  • 接收器設定:

    • listen_address:要接聽的 IP 位址和通訊埠:
      • 0.0.0.0 在所有介面接聽電話 (建議)
      • 通訊埠 514 是標準 syslog 通訊埠 (在 Linux 上需要根目錄;非根目錄請使用 1514)
  • Exporter 設定:

    • creds_file_path:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:從 Google SecOps 控制台複製的客戶 ID
    • location:將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會以這個值做為 chronicle.googleapis.com 的前置字元。如需完整清單,請參閱「區域性端點」。
    • project:依序前往「IAM 與管理」>「設定」,然後將 <PROJECT_NUMBER> 替換為專案編號。
    • endpoint:維持設為 chronicle.googleapis.com。

舊版擷取 API 匯出工具

  • 如果您使用選項 2 的擷取驗證檔案,請將 exporters 區塊替換為下列內容。將 creds_file_path 設為擷取驗證檔案的路徑,如果您的執行個體位於美國境外,請將 malachiteingestion-pa.googleapis.com 替換為區域端點 (例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/dell_switch:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: DELL_SWITCH
        raw_log_field: body
    

儲存設定檔

  • 編輯完畢後,請儲存檔案:
    • Linux:依序按下 Ctrl+O、Enter 和 Ctrl+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"
        

設定從 Dell 交換器匯出系統記錄

  1. 使用 SSH 或主控台通訊埠連線至 Dell 交換器。
  2. 使用管理員憑證登入。
  3. 使用下列指令指定 Syslog 伺服器的 IP 位址或主機名稱 (請將 <syslog-server-ip>、<udp|tcp> 和 <syslog-port-number> 替換為實際詳細資料):

    logging host <syslog-server-ip> transport <udp|tcp> port <syslog-port-number>
    
  4. 選用:定義要傳送至 Syslog 伺服器的訊息最低嚴重性等級。舉例來說,如要記錄資訊訊息和更重要的訊息:

    logging level informational
    
  5. 將執行設定儲存至啟動設定,確保重新啟動後變更仍會保留:

    copy running-config startup-config
    
  6. 儲存設定:

    write memory
    

支援的 Dell 交換器記錄範例

  • SYSLOG

    {
      "priority": 165,
      "version": 1,
      "timestamp": "2023-10-12T12:37:17.249566+00:00",
      "hostname": "switch-lon-01",
      "app_name": "dn_alm",
      "proc_id": "940",
      "message": "Node.1-Unit.1:PRI [event], Dell EMC (OS10) %ALM_AUTH_EVENT: Authentication event was raised MESSAGE=pam_unix(sshd:session): session opened for user service_account by (uid=0)"
    }
    
  • JSON

    {
      "appname": "SNOOP",
      "facility": 23,
      "hostname": "access-switch-a1",
      "message": "snooping.c(2177) 70820228 %% DBG Report from intf Gi6/0/11 ignored -- no router ports on vlan 193",
      "priority": 191,
      "proc_id": "snoopTask"
    }
    
  • KV / 事件格式

    Events: 
      Eventid        = {38812} 
      Occurrencetime = {3 Sept 2024 00:06:06} 
      Eventseverity  = {Minor} 
      Jobid          = {30506} 
      Computer       = {backup-server-01} 
      Program        = {DatabaseAgent} 
      Description    = {Block Change Tracking is found DISABLED on Oracle DB [PROD_DB]. Incremental backups may run slow.}
    
  • 稽核 SYSLOG

    {
        "priority": 110,
        "version": 1,
        "timestamp": "2023-12-12T00:58:26.893679+00:00",
        "hostname": "core-switch-palf",
        "app_name": ".clish",
        "proc_id": "29156",
        "message": "Node.1-Unit.1:PRI [audit], User sec_admin on /dev/pts/0 from 10.0.0.50 used cmd: 'terminal length 0' - completed"
    }
    
  • SNMP 陷阱 / TRAPMGR 格式

    {
      "priority": 189,
      "version": 1,
      "timestamp": "2023-12-28T23:37:27.394Z",
      "hostname": "dist-switch-01",
      "app_name": "TRAPMGR",
      "proc_id": "trapTask",
      "extensions": {
        "origin_ip": "192.168.1.1",
        "software": "N3000_Series",
        "swVersion": "6.3.2.3"
      },
      "message": "traputil.c(721) 1056839 %% Gi1/0/5 is transitioned from the Learning state to the Forwarding state"
    }
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
acct principal.user.userid 如果沒有 user 欄位,則會使用這個欄位做為 userid。
addr principal.asset.ip、principal.ip 如果這是有效 IP 且與主機名稱不同,系統會將其剖析為 IP 位址,並用於主體 IP 和資產 IP。
application principal.application 直接對應。
asset principal.asset.attribute.labels.value 直接對應至資產標籤值,鍵則硬式編碼為「Asset Name」。如果資產欄位空白,且訊息包含「Dell」,資產就會設為「Dell」。
auid principal.resource.attribute.labels.value 直接對應至 principal.resource.attribute.labels 中鍵為 auid 的標籤。
datetime metadata.event_timestamp 從訊息欄位的各種格式剖析,並轉換為時間戳記。
dest_ip target.asset.ip、target.ip 對應至目標 IP 和目標資產 IP。
enterpriseId principal.resource.attribute.labels.value 對應至 enterpriseId 內索引鍵為 principal.resource.attribute.labels 的標籤。
exe sec_result.detection_fields.value 已對應至鍵為 exe 的偵測欄位。
File target.file.full_path 直接對應。
grantors principal.resource.attribute.labels.value 對應至 principal.resource.attribute.labels 中鍵為 grantors 的標籤。
host principal.hostname、principal.asset.hostname、metadata.event_type 做為主體主機名稱和資產主機名稱。如果存在 host,則 metadata.event_type 會設為 STATUS_UPDATE。如果存在 hostname 但不存在 host,則 hostname 會用作 host。
hostname principal.asset.ip、principal.ip、host 如果 IP 有效,則用於主體 IP 和資產 IP。如果 host 為空白,則會做為 host 使用。
ID principal.resource.attribute.labels.value 對應至 ID 內索引鍵為 principal.resource.attribute.labels 的標籤。
ip principal.asset.ip、principal.ip 對應至主要 IP 和資產 IP。
is_synced sec_result.detection_fields.value 已對應至金鑰為 is_synced 的偵測欄位。
local target.asset.ip、target.ip、target.port 經過剖析後,會擷取本機 IP 和通訊埠,並對應至目標 IP、目標資產 IP 和目標通訊埠。
local_ip target.asset.ip、target.ip 從 local 欄位擷取,並對應至目標 IP 和目標資產 IP。
local_port target.port 從 local 欄位擷取,並對應至目標通訊埠。
mac principal.mac 如果是有效的 MAC 位址,則會對應至主要 MAC 位址。
msg metadata.description 如果存在,則會用作活動說明。也會剖析其他欄位。
msg1 metadata.description 如果沒有 msg2,則會做為事件說明。
msg2 sec_result.description、metadata.event_type、extensions.auth.type 做為安全性結果說明。如果包含「opened for user」,事件類型會設為 USER_LOGIN,授權類型則設為 MACHINE。如果包含「closed for user」,事件類型會設為 USER_LOGOUT,授權類型則設為 MACHINE。
op metadata.product_event_type 如果存在,則做為產品事件類型。
pid principal.process.pid 直接對應。
port principal.port 直接對應。
prod_event_type metadata.product_event_type 如果存在,則做為產品事件類型。
res sec_result.summary 直接對應。
sec_description sec_result.description、target.url、target.ip、target.asset.ip、sec_result.action_details 剖析目標網址、IP、動作詳細資料,並做為安全性結果說明。
Server_ID target.resource.product_object_id 直接對應。
server principal.asset.ip、principal.ip、principal.port 剖析後擷取伺服器 IP 和通訊埠,對應至主體 IP、主體資產 IP 和主體通訊埠。
server_ip principal.asset.ip、principal.ip 從 server 欄位擷取,並對應至主體 IP 和主體資產 IP。
server_port principal.port 從 server 欄位擷取,並對應至主體通訊埠。
ses network.session_id 直接對應。
severity sec_result.severity、metadata.product_event_type 用於根據特定值判斷安全結果嚴重程度和產品事件類型。
software principal.asset.software 直接對應。
softwareName software.name 直接對應。
Status sec_result.summary 如果沒有 res,則會做為安全性結果摘要。
subj principal.resource.attribute.labels.value 對應至 principal.resource.attribute.labels 中鍵為 subj 的標籤。
swVersion software.version 直接對應。
target_host target.hostname、target.asset.hostname 直接對應至目標主機名稱和目標資產主機名稱。
target_ip target.asset.ip、target.ip 直接對應至目標 IP 和目標資產 IP。
target_url target.url 直接對應。
target_user_id target.user.userid 直接對應。
terminal principal.resource.attribute.labels.value 對應至 terminal 內索引鍵為 principal.resource.attribute.labels 的標籤。
tzknown sec_result.detection_fields.value 已對應至鍵為 tzknown 的偵測欄位。
uid principal.resource.attribute.labels.value 對應至 uid 內索引鍵為 principal.resource.attribute.labels 的標籤。
user principal.user.userid、metadata.event_type 做為主要使用者 ID。如果 user 存在,metadata.event_type 會設為 USER_UNCATEGORIZED。
username target.user.userid 直接對應至目標使用者 ID。
不適用 metadata.vendor_name 硬式編碼為「Dell」。
不適用 metadata.product_name 硬式編碼為「Dell Switch」。
不適用 extensions.auth.type 針對特定登入/登出事件設為 MACHINE。
不適用 metadata.event_type 系統會根據各種欄位和條件,透過複雜的邏輯判斷預設值,如果未另行設定,預設值為 GENERIC_EVENT。可以是 USER_LOGIN、USER_LOGOUT、USER_UNCATEGORIZED、NETWORK_CONNECTION、NETWORK_UNCATEGORIZED、STATUS_UPDATE 或 GENERIC_EVENT。
reason_code event.idm.read_only_udm.security_result.detection_fields 從變更記錄對應
Eventid metadata.product_log_id 從變更記錄對應
Eventseverity security_result.severity 從變更記錄對應
Computer principal.hostname 從變更記錄對應
Program principal.application 從變更記錄對應
Description security_result.description 從變更記錄對應
tzknown", "is_synced" and "exe security_result.detection_fields 從變更記錄對應
res security_result.summary 從變更記錄對應
status security_result.summary 從變更記錄對應
uid", "enterpriseId", "auid", "terminal", "subj", "grantors", and "ID principal.resource.attribute.labels 從變更記錄對應
sec_description security_result.description 從變更記錄對應
action_details security_result.action_details 從變更記錄對應
softwareName principal.asset.software.name 從變更記錄對應
swVersion principal.asset.software.version 從變更記錄對應
port principal_port 從變更記錄對應

變更記錄

查看這個剖析器的變更記錄

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