收集 NetApp ONTAP 記錄

支援的國家/地區:

本文說明如何透過 Syslog 收集 NetApp ONTAP 記錄。剖析器會使用規則運算式,從系統記錄訊息中擷取欄位。然後將擷取的欄位對應至相應的 UDM (統一資料模型) 欄位,有效將原始記錄資料轉換為結構化格式,以供安全分析。

事前準備

  • 確認您有 Google Security Operations 執行個體。
  • 確認您使用的是 Windows 2016 以上版本,或是搭載 systemd 的 Linux 主機。
  • 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟。
  • 確認您擁有 NetApp ONTAP 叢集的管理員存取權。
  • 確認 ONTAP 能否與 Syslog 伺服器 (Bindplane) 通訊。

取得 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. 存取設定檔:

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

    receivers:
        udplog:
            # Replace the below port <54525> and IP <0.0.0.0> with your specific values
            listen_address: "0.0.0.0:54525" 
    
    exporters:
        chronicle/chronicle_w_labels:
            compression: gzip
            # Adjust the creds location below according the placement of the credentials file you downloaded
            creds: '{ json file for creds }'
            # Replace <customer_id> below with your actual ID that you copied
            customer_id: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # You can apply ingestion labels below as preferred
            ingestion_labels:
            log_type: SYSLOG
            namespace: netapp_ontap
            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
    

在 ONTAP 中設定系統記錄目的地

  1. 使用 SSH 存取 ONTAP 叢集,並將 <ontap-cluster-ip> 替換為 ONTAP 叢集的管理 IP:

    ssh admin@<ontap-cluster-ip>
    
  2. 檢查現有的事件篩選器和通知

    event filter show
    event notification show
    
  3. 建立 Syslog 目的地,將 <syslog-server-ip><syslog-server-port> 替換為 Syslog 伺服器詳細資料 (Bindplane):

    event notification destination create -name syslog-ems -syslog <syslog-server-ip> -syslog-port <syslog-server-port> -syslog-transport udp-unencrypted
    
  4. -syslog-transport 的其他選項:

    • udp-unencrypted (預設)
    • tcp-unencrypted
    • tcp-encrypted (適用於 TLS)。
  5. 驗證系統記錄檔目的地

    event notification destination show
    

設定現有事件篩選器

  • 預設篩選條件連結至 Syslog 目的地:

    event notification create -filter-name no-info-debug-events -destinations syslog-ems
    event notification create -filter-name default-trap-events -destinations syslog-ems
    

選用步驟:建立及設定自訂篩選器

  1. 驗證事件篩選器 (登入/登出):擷取說明符合「登入」或「登出」的記錄:

    event filter create -filter-name auth_events
    event filter rule add -filter-name auth_events -type include -message-name *login* -severity info
    event filter rule add -filter-name auth_events -type include -message-name *logout* -severity info
    
  2. 安全性偵測欄位篩選器:擷取與 nmsdk_language、nmsdk_platform、nmsdk_version 和 netapp_version 相關的記錄:

    event filter create -filter-name security_fields
    event filter rule add -filter-name security_fields -type include -message-name *nmsdk_language* -severity info
    event filter rule add -filter-name security_fields -type include -message-name *nmsdk_platform* -severity info
    event filter rule add -filter-name security_fields -type include -message-name *nmsdk_version* -severity info
    event filter rule add -filter-name security_fields -type include -message-name *netapp_version* -severity info
    
  3. 依嚴重性篩選記錄:擷取嚴重性為資訊的記錄:

    event filter create -filter-name severity_info
    event filter rule add -filter-name severity_info -type include -message-name * -severity info
    
  4. 網路活動篩選器:擷取含有 src_ip 和 src_port 的記錄:

    event filter create -filter-name network_activity
    event filter rule add -filter-name network_activity -type include -message-name *src_ip* -severity info
    event filter rule add -filter-name network_activity -type include -message-name *src_port* -severity info
    
  5. 網址目標記錄篩選器:擷取含有網址資訊的記錄:

    event filter create -filter-name url_target
    event filter rule add -filter-name url_target -type include -message-name *url* -severity info
    
  6. 將每個篩選器套用至系統記錄目的地:

    event notification create -filter-name auth_events -destinations syslog-ems
    event notification create -filter-name security_fields -destinations syslog-ems
    event notification create -filter-name severity_info -destinations syslog-ems
    event notification create -filter-name network_activity -destinations syslog-ems
    event notification create -filter-name url_target -destinations syslog-ems
    
  7. 驗證通知:

    event notification show
    

UDM 對應表

記錄欄位 UDM 對應 邏輯
程式碼 未對應
說明 metadata.description 使用 grok 模式從記錄訊息中擷取。只有在說明為「登出」或「登入」時才會顯示。
intermediary_host intermediary.hostname 使用 grok 模式從記錄訊息中擷取。
nmsdk_language security_result.detection_fields.value 使用 grok 模式從記錄訊息中擷取。這個值會以「value」的形式新增至 detection_fields 物件,且「key」=「nmsdk_language」。
nmsdk_platform security_result.detection_fields.value 使用 grok 模式從記錄訊息中擷取。這個值會以「value」的形式新增至 detection_fields 物件,且「key」=「nmsdk_platform」。
nmsdk_version security_result.detection_fields.value 使用 grok 模式從記錄訊息中擷取。這個值會以「value」的形式新增至 detection_fields 物件,且「key」=「nmsdk_version」。
netapp_version security_result.detection_fields.value 使用 grok 模式從記錄訊息中擷取。這個值會以「value」的形式新增至 detection_fields 物件,且「key」=「netapp_version」。
product_event_type metadata.product_event_type 使用 grok 模式從記錄訊息中擷取。
security_result.summary security_result.summary 使用 grok 模式從記錄訊息中擷取。
嚴重性 security_result.severity 如果嚴重程度為「info」(不區分大小寫),請設為「INFORMATIONAL」。
src_ip principal.ip 使用 grok 模式從記錄訊息中擷取。
src_port principal.port 使用 grok 模式從記錄訊息中擷取。
狀態 security_result.summary 使用 grok 模式從記錄訊息中擷取。
ts metadata.event_timestamp.seconds 使用 grok 模式從記錄訊息中擷取,並轉換為時間戳記。
網址 target.url 使用 grok 模式從記錄訊息中擷取。
使用者 target.user.userid 使用 grok 模式從記錄訊息中擷取。
extensions.auth.type 如果說明為「登出」或「登入」,請設為「AUTHTYPE_UNSPECIFIED」。
metadata.event_type 如果說明為「登入」,請設為「USER_LOGIN」。
metadata.event_type 如果說明為「登出」,請設為「USER_LOGOUT」。
metadata.event_type 如果說明不是「登入」或「登出」,請設為「SCAN_UNCATEGORIZED」。
metadata.log_type 設為「NETAPP_ONTAP」。
metadata.product_name 設為「NETAPP_ONTAP」。
metadata.vendor_name 設為「NETAPP_ONTAP」。
target.platform 如果 nmsdk_platform 包含「windows」(不區分大小寫),請設為「WINDOWS」。

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