收集 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 代理之间的网络连接
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • BMC AMI Defender for z/OS 已安装并正在 ACF2 处于有效状态的 z/OS LPAR 上运行
  • 访问权限,用于修改 amihlq.CZAGENT.PARM 数据集中的 BMC AMI Defender 参数文件
  • 在 z/OS 上启动或修改 CZAGENT 启动的任务的权限

获取 Bindplane 代理的 Google SecOps 凭证

如需向 Google SecOps 验证 Bindplane 代理的身份,请选择以下方法之一:

  • 新部署:使用 Chronicle API(选项 1)。
  • 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 API 于 2027 年 7 月 20 日停用。
  1. 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
  2. 前往 IAM 和管理 > 服务账号。
  3. 点击创建服务账号。
  4. 提供以下配置详细信息:
    • 服务账号名称:输入账号的名称(例如 bindplane-ingest)。
    • 服务账号说明:输入说明(例如 Bindplane agent log ingestion)。
  5. 点击创建并继续。
  6. 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
  7. 点击继续,然后点击完成。
  8. 点击您创建的服务账号,然后前往密钥标签页。
  9. 依次点击添加密钥> 创建新密钥。
  10. 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
  11. 将密钥文件另存为 Bindplane 收集器目录(Linux 上的 /opt/observiq-otel-collector/ingestion-auth.json 或 Windows 上的 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的 ingestion-auth.json,或更新 config.yaml 中的 creds_file_path 以匹配您保存该文件的路径。
  12. 前往 IAM 和管理 > 设置,然后复制项目编号。您需要此信息才能配置导出器。

方法 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 代理以注入 syslog 并将其发送到 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 上监听所有接口

        • 对于以非 root 身份运行的 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:用于对日志进行分类的可选标签(可根据需要自定义)

旧版提取 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 收集器。
        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)的收集。
    • 如果您的网站为 ACF2 使用不同的 SMF 记录类型,请在 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):将 syslog 设施设置为“安全”(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:数据集访问违规(严重级别为 ERROR)
    5. 保存更改:

      1. 按 F3 退出编辑器。
      2. 出现提示时,请输入 SAVE。
      3. 按 Enter 键。
    6. 刷新 BMC AMI Defender 参数文件

      1. 退出 ISPF 并返回到 TSO READY 提示。
      2. 发出 MODIFY 命令以重新加载参数文件:

        F CZAGENT,PARMS
        
        • 将 CZAGENT 替换为您的 BMC AMI Defender 启动任务名称(如果不同)。
        • 此命令会重新加载参数文件,而不会停止代理。
      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 与主账号关联的主机名。
      name principal.user.user_display_name 用户的显示名称。
      usrName principal.user.userid 用户 ID。
      security_result.action 安防系统采取的操作。
      security_result.category 安全结果的类别。
      class security_result.category_details 关于安全结果类别的其他详细信息。
      reason 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 产品专属对象标识符。
      target.resource.resource_type 资源类型。
      name target.user.user_display_name 目标用户的显示名称。
      usrName target.user.userid 目标用户的用户 ID。
      product_name metadata.product_name 生成相应事件的产品的名称。
      vendor_name metadata.vendor_name 供应商的名称。

      更新日志

      查看此解析器的更新日志

      需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。