收集 Cisco Prime 記錄

剖析器版本:1.0

支援的服務:

本文說明如何使用 Bindplane,將 Cisco Prime 記錄檔擷取至 Google Security Operations。剖析器會使用 Grok 模式,從各種 syslog 訊息格式擷取欄位,並對應至統合式資料模型 (UDM)。可處理不同的記錄檔結構 (包括鍵值組),並根據記錄檔訊息中找到的特定關鍵字和模式,以使用者、主體、目標和安全性資訊擴充資料。

事前準備

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

  • Google SecOps 執行個體
  • Windows 2016 以上版本,或搭載 systemd 的 Linux 主機
  • 如果透過 Proxy 執行,請確認防火牆通訊埠已開啟
  • Cisco Prime 的特殊存取權

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

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

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
  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 與管理」>「設定」,然後複製「專案編號」。匯出工具設定時會用到。

方法 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
    

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
    

其他安裝資源

如需其他安裝選項,請參閱安裝指南。

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

  1. 存取設定檔:
    • 找出 config.yaml 檔案。通常位於 Linux 的 /opt/observiq-otel-collector/ 目錄,或 Windows 的安裝目錄。
    • 使用文字編輯器 (例如 nano、vi 或記事本) 開啟檔案。
  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:
            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
            # 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: chronicle.googleapis.com
            # Add optional ingestion labels for better organization
            log_type: 'CISCO_PRIME'
            raw_log_field: body
            ingestion_labels:
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
    • 視基礎架構需求更換連接埠和 IP 位址。
    • 將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會以這個值做為 chronicle.googleapis.com 的前置字元。
    • 將 <PROJECT_NUMBER> 替換為「IAM 與管理」>「設定」中的專案編號。
    • 將 <customer_id> 替換為實際的客戶 ID。
    • 將 /path/to/ingestion-authentication-file.json 更新為服務帳戶金鑰檔案 (選項 1) 在「取得 Bindplane 代理程式的 Google SecOps 憑證」一節中儲存的路徑。

舊版 Ingestion API 匯出工具

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

    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: 'CISCO_PRIME'
            raw_log_field: body
            ingestion_labels:
    

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

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

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

    net stop BindPlaneAgent && net start BindPlaneAgent
    

設定變更稽核通知和系統記錄接收器

  1. 您可以設定系統,針對與下列事件相關的變更稽核傳送系統記錄通知:

    • 裝置清單更新
    • 設定修改
    • 設定範本變更
    • 範本相關作業
    • 使用者活動,例如登入、登出和帳戶修改
  2. 登入 Cisco Prime 網頁版 UI。

  3. 依序前往「管理」>「設定」>「系統設定」。

  4. 依序選取「郵件和通知」 >「變更稽核通知」。

  5. 勾選「啟用變更稽核通知」核取方塊。

  6. 按一下「+」按鈕,指定系統記錄伺服器。

  7. 提供下列設定詳細資料:

    • 輸入 Bindplane 代理程式 IP 位址。
    • 選取「UDP」UDP通訊協定。
    • 輸入 Bindplane 代理程式通訊埠編號。
  8. 按一下 [儲存]。

設定將系統稽核記錄轉送為系統記錄

  1. 登入 Cisco Prime 網頁版 UI。
  2. 依序前往 「Administration」 > 「Settings」 > 「Logging」 > 「Syslog Logging Options」。
  3. 按一下「啟用系統記錄」核取方塊。
  4. 請提供下列設定詳細資料:
    • 輸入 Bindplane 代理程式 IP 位址。
    • 選取「UDP」UDP通訊協定。
    • 輸入 Bindplane 代理程式通訊埠編號。
    • 選取八個設施或local0之一。
  5. 按一下 [儲存]。

UDM 對應表

記錄欄位 UDM 對應 邏輯
client_ip_address principal.ip、principal.asset.ip 這個值取自 client_ip_address 欄位,該欄位是使用 kv 篩選器從原始記錄中擷取。
日期 metadata.event_timestamp 這個值取自 date 欄位,該欄位是使用 grok 模式從原始記錄中擷取,然後使用日期篩選器轉換為時間戳記。
說明 security_result.description 這個值取自 description 欄位,並使用 grok 模式從原始記錄中擷取。
dest_mac target.mac 這個值取自 dest_mac 欄位,該欄位是使用 grok 模式從原始記錄中擷取,並轉換為小寫。
device_id principal.asset_id 這個值取自 device_id 欄位,並使用 grok 模式從原始記錄中擷取。最終值的格式為「裝置 ID:」。
device_ip principal.ip、principal.asset.ip 這個值取自 device_ip 欄位,該欄位是使用 kv 篩選器從原始記錄中擷取。接著,系統會將該值剖析為 JSON 陣列,並將陣列中的每個 IP 位址新增至 UDM 欄位。
device_type target.resource.attribute.labels.value 這個值取自 device_type 欄位,並使用 grok 模式從原始記錄中擷取。
dst_user target.user.userid 這個值取自 dst_user 欄位,並使用 grok 模式從原始記錄中擷取。
電子郵件 src.hostname 這個值取自 email 欄位,該欄位是使用 grok 模式從原始記錄中擷取而來。
file_path principal.process.file.full_path 這個值取自 file_path 欄位,並使用 grok 模式從原始記錄中擷取。
主機名稱 target.resource.attribute.labels.value 這個值取自 hostname 欄位,並使用 grok 模式從原始記錄中擷取。
id principal.asset_id 這個值取自 id 欄位,並使用 grok 模式從原始記錄中擷取。最終值的格式為「Entity ID:」。
ip_address principal.ip、principal.asset.ip 這個值取自 ip_address 欄位,並使用 grok 模式從原始記錄中擷取。
log_level security_result.severity 這個值取自 log_level 欄位,該欄位是使用 grok 模式從原始記錄中擷取。如果沒有 severity,系統會使用這個值判斷嚴重程度。
mac_address principal.mac、source_mac 這個值取自 mac_address 欄位,該欄位是使用 grok 模式從原始記錄擷取,並轉換為小寫。如果 source_mac 為空白,系統也會使用這個值做為 source_mac 的值。
oid principal.asset.product_object_id 這個值取自 oid 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal_ip principal.ip、principal.asset.ip 這個值取自 principal_ip 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal_port principal.port 這個值取自 principal_port 欄位,該欄位是使用 grok 模式從原始記錄中擷取,並轉換為整數。
process_name principal.resource.name 這個值取自 process_name 欄位,並使用 grok 模式從原始記錄中擷取。
sec_description security_result.description 這個值取自 sec_description 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
session_id network.session_id 這個值取自 session_id 欄位,並使用 grok 模式從原始記錄中擷取。
嚴重性 security_result.severity 這個值取自 severity 欄位,並使用 grok 模式從原始記錄中擷取。用於判斷嚴重性等級 (如有)。
source_mac principal.mac 這個值取自 source_mac 欄位,該欄位是使用 grok 模式從原始記錄中擷取,並轉換為小寫。如果留空,則會採用 mac_address 的值。
摘要 security_result.summary 這個值取自 summary 欄位,並使用 grok 模式從原始記錄中擷取。
target_ip target.ip、target.asset.ip 這個值取自 target_ip 欄位,並使用 grok 模式從原始記錄中擷取。
thread_pool metadata.product_event_type 這個值取自 thread_pool 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
時間戳記 metadata.event_timestamp 這個值取自 timestamp 欄位,該欄位是使用 grok 模式從原始記錄中擷取,然後使用日期篩選器轉換為時間戳記。
類型 metadata.product_event_type 這個值取自 Type 欄位,該欄位是使用 kv 篩選器從原始記錄中擷取。
user_name principal.user.userid 這個值取自 user_name 欄位,該欄位是使用 grok 模式或 kv 篩選器從原始記錄中擷取。
metadata.event_type metadata.event_type 系統會根據原始記錄中特定欄位和模式的存在與否,判斷該值。邏輯包括:
- 預設值:GENERIC_EVENT
- 如果 thread_pool 為「EmailAlertHelper」:EMAIL_TRANSACTION
- 如果 application_name 為「aesSystem」,且 desc 包含「HealthMonitorHelper」:STATUS_HEARTBEAT
- 如果 user_present 和 target_resource_present 皆為 true:USER_RESOURCE_ACCESS
- 如果 user_present 為 true:USER_UNCATEGORIZED
- 如果 principal_present 和 target_present 皆為 true:NETWORK_CONNECTION
- 如果 principal_present 為 true:STATUS_UPDATE
- 如果 dst_user 存在,且 description 包含「logout」:USER_LOGOUT
- 如果 dst_user 存在,且 description 不包含「logout」:USER_LOGIN
metadata.vendor_name metadata.vendor_name 值設為「CISCO」。
metadata.product_name metadata.product_name 值設為「CISCO_PRIME」。
metadata.log_type metadata.log_type 值設為「CISCO_PRIME」。
network.session_id network.session_id 這個值取自 session_id 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal.application principal.application 這個值取自 application_name 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal.asset.ip principal.asset.ip 值可來自下列欄位:client_ip_address、device_ip、ip_address、principal_ip、target_ip。
principal.asset.product_object_id principal.asset.product_object_id 這個值取自 oid 欄位,該欄位是使用 grok 模式從原始記錄中擷取而來。
principal.asset_id principal.asset_id 值可來自下列欄位:device_id、id。
principal.ip principal.ip 值可來自下列欄位:client_ip_address、device_ip、ip_address、principal_ip。
principal.mac principal.mac 值可來自下列欄位:mac_address、source_mac。
principal.port principal.port 這個值取自 principal_port 欄位,該欄位是使用 grok 模式從原始記錄中擷取,並轉換為整數。
principal.process.file.full_path principal.process.file.full_path 這個值取自 file_path 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal.resource.name principal.resource.name 這個值取自 process_name 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
principal.user.userid principal.user.userid 這個值取自 user_name 欄位,該欄位是使用 grok 模式或 kv 篩選器從原始記錄中擷取。
security_result.action security_result.action 如果 description 包含「fail」,值會設為「BLOCK」。
security_result.description security_result.description 值可來自下列欄位:desc、description、sec_description。
security_result.severity security_result.severity 值可來自下列欄位:log_level、severity。
security_result.summary security_result.summary 這個值取自 summary 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
src.hostname src.hostname 這個值取自 email 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
target.asset.ip target.asset.ip 這個值取自 target_ip 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
target.ip target.ip 這個值取自 target_ip 欄位,該欄位是使用 grok 模式從原始記錄中擷取。
target.mac target.mac 這個值取自 dest_mac 欄位,該欄位是使用 grok 模式從原始記錄中擷取,並轉換為小寫。
target.resource.attribute.labels.key target.resource.attribute.labels.key 此值會根據情境設為「裝置類型」或「裝置主機名稱」。
target.resource.attribute.labels.value target.resource.attribute.labels.value 值可來自下列欄位:device_type、hostname。
target.user.userid target.user.userid 這個值取自 dst_user 欄位,該欄位是使用 grok 模式從原始記錄中擷取而來。
extensions.auth.mechanism extensions.auth.mechanism 如果存在 dst_user 且 description 包含「password」,則值會設為「USERNAME_PASSWORD」。
extensions.auth.type extensions.auth.type 如果 dst_user 存在,值會設為「MACHINE」。
ts event.idm.read_only_udm.metadata.event_timestamp 從變更記錄對應
principal_hostname event.idm.read_only_udm.principal.hostname 從變更記錄對應
target_hostname event.idm.read_only_udm.target.hostname 從變更記錄對應
target_port event.idm.read_only_udm.target.port 從變更記錄對應
device_hostname target.resource.attribute.labels 從變更記錄對應

變更記錄

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

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