收集 BMC AMI Defender 日志

支持的平台:

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

BMC AMI Datastream for z/OS 是一款大型机代理程序,可监控 z/OS 系统活动,并实时收集、处理和向分布式 SIEM 系统传送系统管理设施 (SMF) 记录。该代理会将来自 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 代理要求打开
  • BMC AMI Datastream for z/OS 版本 6.1 或更高版本已安装并运行在 z/OS LPAR 上
  • 在 z/OS 上访问 amihlq.PARM 数据集以修改参数文件(通常需要 TSO/ISPF 访问权限或批量作业提交权限)
  • 修改 BMC AMI Datastream 配置的权限(通常需要对参数数据集具有 RACF READ 访问权限)

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将该文件安全地保存在要安装 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
      

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

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps

找到配置文件

  • Linux:

    sudo nano /etc/bindplane-agent/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:
        compression: gzip
        creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
        customer_id: 'your-customer-id-here'
        endpoint: malachiteingestion-pa.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:提取身份验证文件的完整路径:

        • Linux/etc/bindplane-agent/ingestion-auth.json
        • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
      • customer_id:您的 customer ID。如需了解详情,请参阅获取 Google SecOps 客户 ID

      • endpoint:区域端点网址:

        • 美国malachiteingestion-pa.googleapis.com
        • 欧洲europe-malachiteingestion-pa.googleapis.com
        • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
        • 如需查看完整列表,请参阅区域级端点
      • log_typeBMC_AMI_DEFENDER

UDP syslog 的配置示例

  • 如果您偏好使用 UDP 传输(延迟时间更短,发送后无需等待):

    receivers:
      udplog:
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/bmc_datastream:
        compression: gzip
        creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
        customer_id: 'a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: BMC_AMI_DEFENDER
        raw_log_field: body
    
    service:
      pipelines:
        logs/datastream_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/bmc_datastream
    

保存配置文件

修改后,保存文件:

  • Linux:依次按 Ctrl+OEnterCtrl+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(RFC3164)
    • 对于通用事件格式,请取消注释:SWITCH ON(CEF)
    • 对于 JSON 格式,请取消注释:SWITCH ON(JSON)
    • 对于 IBM QRadar LEEF 格式,请取消注释:SWITCH ON(LEEF)
    • 对于 Splunk 格式,请取消注释:SWITCH ON(Splunk)
  3. F3 保存并退出会员。

配置 syslog 服务器

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

    • ISPF Library:输入 '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 RFC3164: Locate the section labeled ; RFC3164
    • 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(RFC3164)
    /*
    //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 用于确定安全结果的字段
aceaudeau 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 专业人士的解答。