收集 BMC AMI Defender 日志

解析器版本:1.0

支持:

本文档介绍了如何使用 Bindplane 代理将 BMC AMI Defender 日志注入 Google Security Operations。

BMC AMI Datastream for z/OS 是一款大型主机代理程序,可监控 z/OS 系统活动,并实时收集、处理系统管理设施 (SMF) 记录并将其传送到分布式 SIEM 系统。该代理会将来自 RACF、ACF2、Top Secret、TCP/IP、CICS、IMS 以及其他 z/OS 系统和应用事件的 SMF 记录重新格式化为符合 RFC 3164 的 syslog 消息,并通过 UDP、TCP 或 TLS 协议传输这些消息。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者安装了 systemd 的 Linux 主机(用于 Bindplane 代理)
  • Bindplane 代理主机与运行 BMC AMI Datastream 的 z/OS LPAR 之间的网络连接
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • 在 z/OS LPAR 上安装并运行 BMC AMI Datastream for z/OS 6.1 版或更高版本
  • 有权在 z/OS 上的 amihlq.PARM 数据集中修改参数文件(通常需要 TSO/ISPF 访问权限或批量作业提交权限)
  • 修改 BMC AMI Datastream 配置的权限(通常需要对参数数据集具有 RACF READ 访问权限)

获取 Bindplane 代理的 Google SecOps 凭据

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

  • 新部署:使用 Chronicle API(选项 1)。
  • 旧版部署:继续使用数据注入身份验证文件(方法 2),直到 Ingestion 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
      

      该服务应显示为正在运行。

  • 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
      

      该服务应显示为有效(正在运行)。

其他安装资源

如需了解其他安装选项和问题排查,请参阅 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:
      tcplog:
        listen_address: "0.0.0.0:1514"
    
    exporters:
      chronicle/bmc_datastream:
        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-here'
        endpoint: chronicle.googleapis.com
        log_type: BMC_AMI_DEFENDER
        raw_log_field: body
    
    service:
      pipelines:
        logs/datastream_to_chronicle:
          receivers:
            - tcplog
          exporters:
            - chronicle/bmc_datastream
    
  2. 替换以下占位符:

    • 接收器配置:

      listen_address:要监听的 IP 地址和端口:

      • 0.0.0.0:1514 在端口 1514 上监听所有接口(建议用于 Linux 非 root 用户)
      • 0.0.0.0:514 在标准 syslog 端口上监听所有接口(在 Linux 上需要 root 权限)
      • 在某个接口上监听的特定 IP 地址
    • 导出器配置:

      • 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:您的 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:BMC_AMI_DEFENDER

UDP syslog 的配置示例

  • 如果您更喜欢 UDP 传输(延迟时间更短、即发即弃):

    receivers:
      udplog:
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/bmc_datastream:
        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: 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6'
        endpoint: chronicle.googleapis.com
        log_type: BMC_AMI_DEFENDER
        raw_log_field: body
    
    service:
      pipelines:
        logs/datastream_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/bmc_datastream
    

旧版提取 API

  • 如果您使用选项 2 中的数据注入身份验证文件,请将 exporters 代码块替换为以下内容。将 creds_file_path 设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将 malachiteingestion-pa.googleapis.com 替换为您的区域端点(例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/bmc_datastream:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: 'your-customer-id-here'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: BMC_AMI_DEFENDER
        raw_log_field: body
    

保存配置文件

修改后,保存文件:

  • 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 syslog 转发

使用 TSO/ISPF 修改参数文件

  1. 登录安装了 BMC AMI Datastream 的 z/OS LPAR 上的 TSO/ISPF。
  2. 在 ISPF Primary Option Menu 中,输入 2 以选择 EDIT。
  3. 在修改 - 条目面板中,输入以下内容:

    • ISPF 库:输入参数数据集名称,格式为 'amihlq.PARM',其中 amihlq 是安装期间选择的高级限定符(例如 'PROD.CZAGENT.PARM')。
    • 成员:输入 $$$CONFG.
  4. Press Enter to open the member for editing.

Configure the SIEM type

  1. In the $$$CONFG 成员,找到标有用于设置 SIEM 类型的开关的部分。
  2. 通过移除相应行开头的分号,取消注释一种 SIEM 类型:

    • 对于标准 syslog 格式,请取消注释:SWITCH ON(RFC 3164)
    • 对于通用事件格式,请取消注释:SWITCH ON(CEF)
    • 对于 JSON 格式,请取消注释:SWITCH ON(JSON)
    • 对于 IBM QRadar LEEF 格式,请取消注释:SWITCH ON(LEEF)
    • 对于 Splunk 格式,请取消注释:SWITCH ON(Splunk)
  3. 按 F3 保存并退出会员。

配置 syslog 服务器

  1. 在修改 - 条目面板中,输入以下内容:

    • ISPF 库:输入 'amihlq.PARM'(与之前相同)。
    • 会员:输入 $$$SERVR.
  2. Press Enter to open the member for editing.

  3. Locate the section corresponding to your selected SIEM type. For example:

    • For RFC 3164: Locate the section labeled ; RFC 3164
    • For CEF: Locate the section labeled ; CEF - TRANS(TCP) Recommended
    • For JSON: Locate the section labeled ; JSON - TRANS(TCP) Recommended
  4. Uncomment the SERVER statement by removing the leading semicolon.

  5. Edit the SERVER statement with the following values:

    • Replace ip.addr.example with the IP address of the Bindplane agent host (for example, 192.168.1.100).
    • If using TCP (recommended), the statement should look like:

      SERVER 192.168.1.100:1514 TRANS(TCP) MAXMSG(2000)
      
    • If using UDP, the statement should look like:

      SERVER 192.168.1.100:514 TRANS(UDP) MAXMSG(2000)
      
  6. If you selected CEF, JSON, or Splunk format and are using TCP transport, locate the OPTIONS statement section and uncomment the FRAMING parameter:

    OPTIONS FRAMING(OCTETCOUNT)
    
  7. Press F3 to save and exit the member.

Refresh the BMC AMI Datastream configuration

  1. From the ISPF Primary Option Menu, enter 6 to select COMMAND.
  2. On the TSO Command Processor screen, enter the following MVS console command:

    F czagentname,PARMS
    

    Replace czagentname with the name of the BMC AMI Datastream started task (typically CZAGENT or the instance name configured during installation).

  3. Press Enter to execute the command.

  4. Verify the configuration was refreshed by checking the system log for message CZA0001I indicating the parameter file was successfully processed.

Verify syslog transmission

  1. From the ISPF Primary Option Menu, enter 6 to select COMMAND.
  2. Enter the following command to display BMC AMI Datastream statistics:

    F czagentname,STATS
    
  3. Press Enter to execute the command.

  4. Check the system log for message CZA0350I showing the number of messages sent to the syslog server.

  5. Verify the Bindplane agent is receiving messages by checking the Bindplane agent logs:

    • Linux: sudo journalctl -u observiq-otel-collector -f
    • Windows: Check C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log

Alternative: Edit parameter file using batch job

If you do not have TSO/ISPF access, you can edit the parameter files using a batch job:

  1. Create a batch job with the following JCL:

    //EDITPARM JOB (ACCT),'EDIT DATASTREAM PARMS',
    //         CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
    //STEP1    EXEC PGM=IEBGENER
    //SYSPRINT DD SYSOUT=*
    //SYSIN    DD DUMMY
    //SYSUT1   DD *
    SWITCH ON(RFC 3164)
    /*
    //SYSUT2   DD DSN=amihlq.PARM($$$CONFG),DISP=SHR
    //STEP2    EXEC PGM=IEBGENER
    //SYSPRINT DD SYSOUT=*
    //SYSIN    DD DUMMY
    //SYSUT1   DD *
    SERVER 192.168.1.100:1514 TRANS(TCP) MAXMSG(2000)
    /*
    //SYSUT2   DD DSN=amihlq.PARM($$$SERVR),DISP=SHR
    
  2. 将 amihlq 替换为 BMC AMI Datastream 安装的高级限定符。

  3. 将 192.168.1.100:1514 替换为 Bindplane 代理主机的 IP 地址和端口。

  4. 提交作业并验证是否成功完成(返回代码 0)。

  5. 发出 MODIFY 命令以刷新配置,如上一部分中所述。

UDM 映射表

日志字段 UDM 映射 逻辑
aceeadsp security_result.detection_fields 用于确定安全结果的字段
accea security_result.detection_fields 用于确定安全结果的字段
aceeflg1 security_result.detection_fields 用于确定安全结果的字段
aceelogu security_result.detection_fields 用于确定安全结果的字段
aceeoper security_result.detection_fields 用于确定安全结果的字段
aceepriv security_result.detection_fields 用于确定安全结果的字段
aceeracf security_result.detection_fields 用于确定安全结果的字段
aceeroa security_result.detection_fields 用于确定安全结果的字段
aceespec security_result.detection_fields 用于确定安全结果的字段
additional.fields additional.fields 有关活动的更多信息
auth security_result.detection_fields 用于确定安全结果的字段
auth_audit security_result.detection_fields 用于确定安全结果的字段
auth_bypass security_result.detection_fields 用于确定安全结果的字段
auth_exit security_result.detection_fields 用于确定安全结果的字段
auth_normal security_result.detection_fields 用于确定安全结果的字段
auth_oper security_result.detection_fields 用于确定安全结果的字段
auth_soft security_result.detection_fields 用于确定安全结果的字段
auth_special security_result.detection_fields 用于确定安全结果的字段
auth_trusted security_result.detection_fields 用于确定安全结果的字段
authinfo security_result.description 安全结果说明
事件 metadata.product_event_type 特定产品的事件类型
event_type metadata.event_type 事件类型(例如 USER_LOGIN、NETWORK_CONNECTION)
eventdesc metadata.description 事件的说明
群组 additional.fields 事件的其他信息
主机名 principal.hostname、principal.asset.hostname 主账号的主机名、资产的主机名
jobid security_result.detection_fields 用于确定安全结果的字段
jobnm additional.fields 事件的其他信息
jsauth security_result.detection_fields 用于确定安全结果的字段
name principal.user.user_display_name 用户的显示名称
pgm security_result.detection_fields 用于确定安全结果的字段
privstatd security_result.detection_fields 用于确定安全结果的字段
reas_always security_result.detection_fields 用于确定安全结果的字段
reas_audit security_result.detection_fields 用于确定安全结果的字段
reas_cmdviol security_result.detection_fields 用于确定安全结果的字段
reas_globalaudit security_result.detection_fields 用于确定安全结果的字段
reas_setropts security_result.detection_fields 用于确定安全结果的字段
reas_special security_result.detection_fields 用于确定安全结果的字段
reas_user security_result.detection_fields 用于确定安全结果的字段
reas_verify security_result.detection_fields 用于确定安全结果的字段
rtype additional.fields 事件的其他信息
saf additional.fields 有关活动的更多信息
safd additional.fields 有关活动的更多信息
security_result.detection_fields security_result.detection_fields 用于确定安全结果的字段
和程度上减少 security_result.severity, security_result.severity_details 安全结果的严重程度,详细的严重程度信息
sid additional.fields 事件的其他信息
时间戳 metadata.event_timestamp 事件发生时的时间戳
tokflg1 security_result.detection_fields 用于确定安全结果的字段
tokflg3 security_result.detection_fields 用于确定安全结果的字段
tokpriv security_result.detection_fields 用于确定安全结果的字段
toksus security_result.detection_fields 用于确定安全结果的字段
tokudus security_result.detection_fields 用于确定安全结果的字段
userid principal.user.userid 用户 ID
违规 security_result.detection_fields 用于确定安全结果的字段
user_warning security_result.detection_fields 用于确定安全结果的字段
worktyped additional.fields 事件的其他信息
metadata.product_name 商品名称
metadata.vendor_name 供应商/公司名称

更新日志

查看相应解析器的更新日志

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