收集 A10 網路負載平衡器記錄

支援的國家/地區:

本文說明如何使用 Bindplane 代理程式,將 A10 網路負載平衡器記錄匯出至 Google Security Operations。剖析器會先使用 grok 模式擷取相關欄位。然後,系統會根據條件陳述式 (if) 判斷擷取的欄位是否存在及內容,並將這些欄位對應至統合式資料模型 (UDM),最終將事件類型分類。

事前準備

  • 確認您擁有 Google SecOps 執行個體。
  • 確認您使用的是 Windows 2016 以上版本,或是搭載 systemd 的 Linux 主機。
  • 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
  • 確認您具備 A10 Load Balancer 的特殊權限。

取得 Google SecOps 擷取驗證檔案

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

取得 Google SecOps 客戶 ID

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

安裝 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: '/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
            ingestion_labels:
                log_type: A10_LOAD_BALANCER
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 視基礎架構需求,替換通訊埠和 IP 位址。

  4. <customer_id> 替換為實際的客戶 ID。

  5. /path/to/ingestion-authentication-file.json 更新為「取得 Google SecOps 擷取驗證檔案」一節中儲存驗證檔案的路徑。

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

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

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

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 A10 負載平衡器中設定 Syslog 伺服器

  1. 使用 SSH 用戶端建立與 A10 Load Balancer 的 SSH 連線。
  2. 執行下列指令,進入設定模式:

    config
    
  3. 使用下列指令設定遠端系統記錄檔伺服器:

    logging host <bindplane-server-ip> <port-number>
    
    • <bindplane-server-ip> 替換為 Bindplane IP 位址,並將 <port-number> 替換為在 Bindplane 中設定的位址,例如 514
  4. 設定「嚴重程度」,請使用下列指令:

    logging level information
    
    • 這會將資訊訊息 (例如警告和錯誤) 傳送至 Bindplane 代理程式。
  5. 執行下列指令,確認系統記錄是否已啟用

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

    write memory
    
  • 完整的 CLI 設定範例如下:

    config
    logging host 192.168.1.100 514
    logging level info
    logging enable
    write memory
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
dns additional.fields.dns.value.string_value 這個值取自 grok 模式擷取的 dns 欄位。
dns_server additional.fields.dns_server.value.string_value 這個值取自 grok 模式擷取的 dns_server 欄位。
gslb additional.fields.gslb.value.string_value 這個值取自 grok 模式擷取的 gslb 欄位。
host_name principal.hostname
principal.asset.hostname
這個值取自 grok 模式擷取的 host_name 欄位。
httpmethod network.http.method 這個值取自 grok 模式擷取的 httpmethod 欄位。
partion_id additional.fields.partion_id.value.string_value 這個值取自 grok 模式擷取的 partion_id 欄位。
prin_ip principal.ip
principal.asset.ip
這個值取自 grok 模式擷取的 prin_ip 欄位。
prin_mac principal.mac 這個值取自 grok 模式擷取的 prin_mac 欄位,並移除點,每兩個字元插入半形冒號。
prin_port principal.port 這個值取自 grok 模式擷取的 prin_port 欄位,並轉換為整數。
proto network.ip_protocol 這個值取自 grok 模式擷取的 proto 欄位。如果 message 欄位包含 UDP,則值會設為 UDP
sessionid network.session_id 這個值取自 grok 模式擷取的 sessionid 欄位。
status_code network.http.response_code 這個值取自 grok 模式擷取的 status_code 欄位,並轉換為整數。
tar_ip target.ip
target.asset.ip
這個值取自 grok 模式擷取的 tar_ip 欄位。
tar_mac target.mac 這個值取自 grok 模式擷取的 tar_mac 欄位,並移除點,每兩個字元插入半形冒號。
tar_port target.port 這個值取自 grok 模式擷取的 tar_port 欄位,並轉換為整數。
時間 metadata.event_timestamp.seconds 系統會使用多種可能的日期格式,從 grok 模式擷取的 time 欄位剖析值。
網址 target.url 這個值取自 grok 模式擷取的 url 欄位。
使用者 principal.user.userid 這個值取自 grok 模式擷取的 user 欄位。
不適用 metadata.event_type 由剖析器邏輯根據主體和目標資訊的存在與否決定:
- NETWORK_CONNECTION:如果主體和目標資訊都存在。
- STATUS_UPDATE:如果只有主要資訊。
- GENERIC_EVENT:其他情況。
不適用 metadata.log_type 硬式編碼為 A10_LOAD_BALANCER
不適用 network.application_protocol 如果 proto 欄位為 HTTP,請設為 HTTP

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