收集 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:为 Chronicle API 创建服务账号(推荐)
- 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
- 前往 IAM 和管理 > 服务账号。
- 点击创建服务账号。
- 提供以下配置详细信息:
- 服务账号名称:输入账号的名称(例如
bindplane-ingest)。 - 服务账号说明:输入说明(例如
Bindplane agent log ingestion)。
- 服务账号名称:输入账号的名称(例如
- 点击创建并继续。
- 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
- 点击继续,然后点击完成。
- 点击您创建的服务账号,然后前往密钥标签页。
- 依次点击添加密钥> 创建新密钥。
- 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
- 将密钥文件另存为 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以匹配您保存该文件的路径。 - 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。
方法 2:下载数据注入身份验证文件(旧版)
- 登录 Google SecOps 控制台。
- 前往 SIEM 设置> 收集代理。
- 下载数据注入身份验证文件。
- 将文件安全地保存在将安装 Bindplane 代理的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 前往 SIEM 设置 > 个人资料。
从组织详细信息部分复制并保存客户 ID。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet等待安装完成。
运行以下命令,验证安装是否成功:
sc query observiq-otel-collector该服务应显示为正在运行。
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh等待安装完成。
运行以下命令,验证安装是否成功:
sudo systemctl status observiq-otel-collector该服务应显示为有效(正在运行)。
其他安装资源
如需了解其他安装选项和问题排查,请参阅 Bindplane 代理安装指南。
配置 Bindplane 代理以注入 syslog 并将其发送到 Google SecOps
找到配置文件
Linux:
sudo nano /opt/observiq-otel-collector/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
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替换以下占位符:
接收器配置:
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
- Linux:
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 代理,请执行以下操作:
运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务是否正在运行:
sudo systemctl status observiq-otel-collector检查日志中的错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请执行以下操作:
请从下列选项中选择一项:
以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector“服务”控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry 收集器。
- 右键点击,然后选择重新启动。
- 按
验证服务是否正在运行:
sc query observiq-otel-collector检查日志中的错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
配置 BMC AMI Defender syslog 转发
使用 TSO/ISPF 修改参数文件
- 登录安装了 BMC AMI Datastream 的 z/OS LPAR 上的 TSO/ISPF。
- 在 ISPF Primary Option Menu 中,输入 2 以选择 EDIT。
在修改 - 条目面板中,输入以下内容:
- ISPF 库:输入参数数据集名称,格式为
'amihlq.PARM',其中 amihlq 是安装期间选择的高级限定符(例如'PROD.CZAGENT.PARM')。 - 成员:输入
$$$CONFG.
- ISPF 库:输入参数数据集名称,格式为
Press Enter to open the member for editing.
Configure the SIEM type
- In the
$$$CONFG成员,找到标有用于设置 SIEM 类型的开关的部分。 通过移除相应行开头的分号,取消注释一种 SIEM 类型:
- 对于标准 syslog 格式,请取消注释:
SWITCH ON(RFC 3164) - 对于通用事件格式,请取消注释:
SWITCH ON(CEF) - 对于 JSON 格式,请取消注释:
SWITCH ON(JSON) - 对于 IBM QRadar LEEF 格式,请取消注释:
SWITCH ON(LEEF) - 对于 Splunk 格式,请取消注释:
SWITCH ON(Splunk)
- 对于标准 syslog 格式,请取消注释:
按 F3 保存并退出会员。
配置 syslog 服务器
在修改 - 条目面板中,输入以下内容:
- ISPF 库:输入
'amihlq.PARM'(与之前相同)。 - 会员:输入
$$$SERVR.
- ISPF 库:输入
Press Enter to open the member for editing.
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
- For RFC 3164: Locate the section labeled
Uncomment the SERVER statement by removing the leading semicolon.
Edit the SERVER statement with the following values:
- Replace
ip.addr.examplewith 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)
- Replace
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)Press F3 to save and exit the member.
Refresh the BMC AMI Datastream configuration
- From the ISPF Primary Option Menu, enter 6 to select COMMAND.
On the TSO Command Processor screen, enter the following MVS console command:
F czagentname,PARMSReplace
czagentnamewith the name of the BMC AMI Datastream started task (typicallyCZAGENTor the instance name configured during installation).Press Enter to execute the command.
Verify the configuration was refreshed by checking the system log for message CZA0001I indicating the parameter file was successfully processed.
Verify syslog transmission
- From the ISPF Primary Option Menu, enter 6 to select COMMAND.
Enter the following command to display BMC AMI Datastream statistics:
F czagentname,STATSPress Enter to execute the command.
Check the system log for message CZA0350I showing the number of messages sent to the syslog server.
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
- Linux:
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:
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将
amihlq替换为 BMC AMI Datastream 安装的高级限定符。将
192.168.1.100:1514替换为 Bindplane 代理主机的 IP 地址和端口。提交作业并验证是否成功完成(返回代码 0)。
发出 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 专业人士的解答。