收集 CA ACF2 記錄

剖析器版本:2.0

支援:

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

Broadcom ACF2 (Access Control Facility 2) for z/OS 是大型主機安全性產品,可為 IBM z/OS 系統提供存取控管、驗證和稽核功能。ACF2 會將安全事件記錄到 IBM 系統管理設施 (SMF) 記錄 (預設類型為 230),包括驗證嘗試、資料集存取違規、資源存取事件、TSO 指令記錄和資料庫修改。這些 SMF 記錄必須使用第三方代理程式 (例如 BMC AMI Defender for z/OS) 轉送至 Chronicle。

事前準備

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

  • Google SecOps 執行個體
  • Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機
  • Bindplane 代理程式與 BMC AMI Defender for z/OS 代理程式之間的網路連線
  • 如果透過 Proxy 執行,請確保防火牆通訊埠已根據 Bindplane 代理程式需求開啟
  • 在啟用 ACF2 的 z/OS LPAR 上,安裝並執行 BMC AMI Defender for z/OS
  • 修改 amihlq.CZAGENT.PARM 資料集中 BMC AMI Defender 參數檔案的權限
  • 在 z/OS 上啟動或修改 CZAGENT 啟動工作的授權

取得 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. 提供下列設定詳細資料:
    • 服務帳戶名稱:輸入帳戶名稱 (例如 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」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。匯出工具設定時會用到。

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

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM 設定」>「收集代理程式」。
  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"
    

編輯設定檔

  1. 將 config.yaml 的全部內容替換為下列設定:

    receivers:
      udplog:
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/acf2_logs:
        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: 'YOUR_CUSTOMER_ID'
        endpoint: chronicle.googleapis.com
        log_type: CA_ACF2
        raw_log_field: body
        ingestion_labels:
          env: production
          source: acf2
    
    service:
      pipelines:
        logs/acf2_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/acf2_logs
    
  2. 替換下列預留位置:

    • 接收端設定:

      • listen_address:設為 0.0.0.0:514,即可監聽 UDP 通訊埠 514 上的所有介面

        • 如果 Linux 系統以非根身分執行,請使用通訊埠 1514 以上版本
        • 將這個通訊埠與 BMC AMI Defender SERVER 陳述式設定相符
    • 匯出工具設定:

      • 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:將 YOUR_CUSTOMER_ID 替換為您的 customer ID。詳情請參閱「取得 Google SecOps 客戶 ID」。

      • location:將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會以這個值做為 chronicle.googleapis.com 的前置字元。如需完整清單,請參閱「區域性端點」。

      • project:將 <PROJECT_NUMBER> 替換為「IAM 與管理」>「設定」中的專案編號。

      • endpoint:維持設為 chronicle.googleapis.com。

      • log_type:設為 CA_ACF2 (ACF2 記錄的 Chronicle 擷取標籤)

      • ingestion_labels:用於分類記錄的選用標籤 (可視需要自訂)

舊版 Ingestion API 匯出工具

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

    exporters:
      chronicle/acf2_logs:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: 'YOUR_CUSTOMER_ID'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: CA_ACF2
        raw_log_field: body
        ingestion_labels:
          env: production
          source: acf2
    

儲存設定檔

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

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

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

  • 如要在 Linux 重新啟動 Bindplane 代理程式,請按照下列步驟操作:

    1. 執行下列指令:

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

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

      sudo journalctl -u observiq-otel-collector -f
      
  • 如要在 Windows 重新啟動 Bindplane 代理程式,請按照下列步驟操作:

    1. 您可以選擇下列其中一個選項:

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

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

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

      sc query observiq-otel-collector
      
    3. 查看記錄檔是否有錯誤:

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

設定 BMC AMI Defender for z/OS,轉送 ACF2 SMF 記錄

編輯 $$$SERVR parameter member

  1. Sign in to the z/OS system using TSO/ISPF or a 3270 emulator.
  2. Navigate to the BMC AMI Defender parameter library:
    1. Enter ISPF at the TSO READY prompt.
    2. Select option 2 (Edit).
    3. In the ISPF Library field, enter the data set name: amihlq.CZAGENT.PARM (replace amihlq with your installation high-level qualifier).
    4. Press Enter.
  3. Edit the $$$SERVR 成員:
    1. 在 $$$SERVR member.
    2. Press Enter.
  4. Locate the SERVER statement section (approximately line 40-60).
  5. Uncomment one of the SERVER statements by removing the leading semicolon (;).
  6. Configure the SERVER statement with the Bindplane agent IP address and port:

    SERVER bindplane-host-ip:514 TRANS(UDP) MAXMSG(2000)
    
    • Replace bindplane-host-ip with the IP address of the Bindplane agent host (for example, 192.168.1.100).
    • If using a non-standard port (for example, 1514), specify: bindplane-host-ip:1514.
    • TRANS(UDP) specifies UDP transport protocol (recommended for syslog).
    • MAXMSG(2000) sets the maximum message length to 2000 bytes (ACF2 records may require larger sizes).
  7. Verify the OPTIONS statement for syslog format:

    1. Scroll up to locate the OPTIONS statements (approximately line 10-30).
    2. Ensure one of the following OPTIONS statements is uncommented based on your preferred format:

      OPTIONS IF(RFC 3164) SIEM(RFC 3164) TIMESTAMP INSTNAME(SIEM.Agent)
      
      • RFC 3164: Standard syslog format (recommended for Chronicle)
      • CEF: Common Event Format (alternative)
      • LEEF: Log Event Extended Format (alternative)
      • JSON: JSON format (alternative)
  8. Save the changes:

    1. Press F3 to exit the editor.
    2. Type SAVE when prompted.
    3. Press Enter.

Edit the $$$CONFG 參數成員旁邊輸入 E,啟用 ACF2 SMF 記錄收集功能

  1. 在 amihlq.CZAGENT.PARM 資料集成員清單中,編輯 $$$CONFG member:

    1. Type E next to the $$$CONFG 成員。

    2. 按下 Enter 鍵。
  2. 找出 ACF2 SMF 記錄選取切換鈕 (搜尋 ACF2 或 SMF 230)。

  3. 取消註解 ACF2 的 SELECT 陳述式:

    SELECT IF(ACF2) SMF(ACF2)
    
    • 這會啟用 ACF2 SMF 記錄的收集作業 (預設類型為 230)。
    • 如果網站使用其他 SMF 記錄類型做為 ACF2,請在 TSO 中使用 ACF SHOW SYSTEMS 指令驗證類型。
  4. 儲存變更:

    1. 按下 F3 鍵即可退出編輯器。
    2. 在系統提示時輸入 SAVE。
    3. 按下 Enter 鍵。
  5. 建立或編輯 SMF ACF2 陳述式參數成員

    1. 在 amihlq.CZAGENT.PARM 資料集成員清單中,檢查是否有成員名為 $$$ACF2 or SMFACF2 exists.
    2. If the member does not exist, create it:

      1. Type C (Create) on the command line.
      2. Enter the member name: $$$ACF2.
      3. 按下 Enter 鍵。
    3. 編輯成員,並新增下列 SMF ACF2 陳述式:

      SMF ACF2(230) FACILITY(SECURITY4) SEVERITY(INFORMATIONAL)
      
      • ACF2(230):指定 ACF2 的 SMF 記錄類型 (預設為 230,請使用 ACF SHOW SYSTEMS 驗證)。
      • FACILITY(SECURITY4):將系統記錄功能設為「Security」(4)。
      • SEVERITY(INFORMATIONAL):將預設嚴重性設為「資訊」。

        • 系統會自動傳送嚴重程度為「ERROR」的無效密碼或授權違規事項。
        • 系統會自動傳送資源違規事項,嚴重程度為「ERROR」。
    4. 視需要設定特定 ACF2 子類型和嚴重性:

      SMF ACF2(230) +
        FACILITY(SECURITY4) +
        SEVERITY(INFORMATIONAL) +
        SUBTYPES(P SEV(ERROR)) +
        SUBTYPES(V SEV(ERROR)) +
        SUBTYPES(D SEV(ERROR))
      
      • 子類型 P:密碼或授權事件無效 (嚴重性:錯誤)
      • 子類型 V:資源違規事項 (嚴重性:錯誤)
      • 子類型 D:資料集存取違規 (嚴重程度為「錯誤」)
    5. 儲存變更:

      1. 按下 F3 鍵即可退出編輯器。
      2. 在系統提示時輸入 SAVE。
      3. 按下 Enter 鍵。
    6. 重新整理 BMC AMI Defender 參數檔案

      1. 退出 ISPF 並返回 TSO READY 提示。
      2. 發出 MODIFY 指令,重新載入參數檔案:

        F CZAGENT,PARMS
        
        • 如果 BMC AMI Defender 啟動工作名稱不同,請將 CZAGENT 替換為該名稱。
        • 這個指令會重新載入參數檔案,但不會停止代理程式。
      3. 檢查 CZAPRINT 輸出內容,驗證設定:

        1. 在 ISPF 中,選取選項 3.4 (DSLIST)。
        2. 輸入資料集名稱模式:CZAGENT.CZAPRINT (或您網站專屬的命名慣例)。
        3. 按下 Enter 鍵。
        4. 在最新的 CZAPRINT 資料集旁輸入 B (瀏覽)。
        5. 按下 Enter 鍵。
        6. 搜尋指出已成功連線至 syslog 伺服器的訊息:

          • CZA0070I Connected to server bindplane-host-ip:514
          • CZA0100I SMF ACF2 statement processed
      4. 如果 CZAGENT 啟動工作未執行,請啟動:

        S CZAGENT
        

      驗證 ACF2 記錄轉送

      1. 產生測試 ACF2 安全性事件:

        1. 在 TSO 中,嘗試存取您沒有權限存取的資料集。
        2. 嘗試使用無效密碼登入 (使用測試帳戶)。
        3. 執行 ACF2 記錄的 TSO 指令。
      2. 查看 Bindplane 代理程式記錄,確認是否收到 ACF2 syslog 訊息:

        • Linux:

          sudo journalctl -u observiq-otel-collector -f | grep ACF2
          
        • Windows:

          type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log" | findstr ACF2
          
      3. 登入 Google SecOps 控制台,確認系統正在擷取 ACF2 記錄:

        1. 依序前往「搜尋」>「UDM 搜尋」。
        2. 輸入下列查詢:

          metadata.log_type = "CA_ACF2"
          
        3. 確認搜尋結果中顯示 ACF2 安全性事件。

      UDM 對應表

      記錄欄位 UDM 對應 邏輯
      extensions.auth.mechanism 所用驗證機制。
      extensions.auth.type 驗證類型。
      總和 metadata.description 事件說明。
      metadata.event_type 事件類型。
      event_type, cat metadata.product_event_type 產品專屬的事件類型。
      product_version metadata.product_version 產品版本。
      終端機 principal.hostname 與主體相關聯的主機名稱。
      名稱 principal.user.user_display_name 使用者的顯示名稱。
      usrName principal.user.userid 使用者 ID。
      security_result.action 保全系統採取的動作。
      security_result.category 安全結果的類別。
      類別 security_result.category_details 安全性結果類別的其他詳細資料。
      原因 security_result.severity 安全性結果的嚴重性等級。
      reason security_result.severity_details 嚴重程度詳細資訊。
      logstr security_result.summary 安全性結果摘要。
      job_id target.application 指定的應用程式。
      job_group target.group.group_display_name 群組的顯示名稱。
      target.namespace 目標的命名空間。
      dsn target.resource.name 資源的名稱。
      vol target.resource.parent 父項資源。
      res、dsn target.resource.product_object_id 產品專屬物件 ID。
      target.resource.resource_type 資源的類型。
      名稱 target.user.user_display_name 目標使用者的顯示名稱。
      usrName target.user.userid 目標使用者的使用者 ID。
      product_name metadata.product_name 產生事件的產品名稱。
      vendor_name metadata.vendor_name 供應商名稱。

      變更記錄

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

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