收集 IBM AIX 系统日志
解析器版本:15.0
本文档介绍了如何使用 Bindplane 将 IBM AIX 系统日志注入到 Google Security Operations。
IBM AIX 是一款基于 Unix 的操作系统,专为 IBM Power Systems 硬件上的企业工作负载而设计。AIX 系统日志包含有关系统事件、身份验证活动、内核消息、守护程序操作以及由 syslog 守护程序生成的安全相关事件的信息。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例。
- Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机,用于运行 Bindplane 代理。
- Bindplane 代理主机与 AIX 系统之间通过 UDP 端口 514 建立的网络连接。
- 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开。
- 对 AIX 系统的根访问权限或特权访问权限。
- IBM AIX 7.1 或更高版本的操作系统。
获取 Google SecOps 注入身份验证文件
- 登录 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 /status observiq-otel-collector/config.yaml/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/aix_system: compression: gzip creds_file_path: '<CREDS_FILE_PATH>' customer_id: '<CUSTOMER_ID>' endpoint: <REGION_ENDPOINT> log_type: AIX_SYSTEM raw_log_field: body ingestion_labels: source: aix service: pipelines: logs/aix_to_chronicle: receivers: - udplog exporters: - chronicle/aix_system
配置参数
替换以下占位符:
导出器配置:
<CREDS_FILE_PATH>:提取身份验证文件的完整路径:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
<CUSTOMER_ID>:上一步中的客户 ID<REGION_ENDPOINT>:区域端点网址:- 美国:
malachiteingestion-pa.googleapis.com - 欧洲:
europe-malachiteingestion-pa.googleapis.com - 亚洲:
asia-southeast1-malachiteingestion-pa.googleapis.com - 如需查看完整列表,请参阅区域级端点
- 美国:
保存配置文件
修改后,保存文件:
- 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"
在 AIX 上配置 syslog 转发
- 使用 root 访问权限或特权访问权限登录 AIX 系统。
使用文本编辑器(例如
vi)修改/etc/syslog.conf文件:vi /etc/syslog.conf添加以下代码行,以将日志转发到 Bindplane 代理:
*.info @<BINDPLANE_AGENT_IP>- 将
<BINDPLANE_AGENT_IP>替换为 Bindplane 代理主机 IP 地址。 - 选择器 (
*.info) 和操作 (@<BINDPLANE_AGENT_IP>) 之间的分隔符必须是制表符。 - 选择器
*.info会转发来自所有设施的优先级为info或更高级别的所有消息。根据您的需求,调整设备和优先级。
- 将
保存文件并退出编辑器。
刷新
syslogd守护程序以应用更改:refresh -s syslogdstopsrc -s syslogd startsrc -s syslogd验证
syslogd守护程序是否正在运行:lssrc -s syslogd输出应显示
syslogd,状态为 有效。确保 AIX 主机与 Bindplane 代理之间已打开 UDP 端口 514。
验证日志转发
测试日志是否已转发到 Bindplane 代理:
在 AIX 系统上,生成测试日志消息:
logger -p user.info "Test syslog message from AIX"在 Bindplane 代理主机上,检查代理日志以验证是否收到了消息:
Linux:
sudo journalctl -u observiq-otel-collector -n 50Windows:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"验证日志是否会在 5-10 分钟内显示在 Google SecOps 控制台中。
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
application |
target.application |
使用 Grok 模式从消息字段中提取的值。 |
cmddata |
target.process.command_line |
使用 Grok 模式从消息字段中提取的值。 |
command_line |
principal.process.command_line |
使用 Grok 模式从说明字段中提取的值。 |
description |
metadata.description |
使用 Grok 模式从消息字段中提取的值。 |
folder |
target.process.file.full_path |
使用 Grok 模式从消息字段中提取的值。 |
hostname |
principal.hostname |
使用 Grok 模式从消息字段中提取的值。 |
intermediary_hostip |
intermediary.ip |
使用 Grok 模式从消息字段中提取的值。 |
sc_summary |
security_result.summary |
使用 Grok 模式从说明字段中提取的值。 |
severity |
security_result.severity |
如果严重程度为“info”(不区分大小写),则设置为“INFORMATIONAL”。如果严重程度为“Err”(不区分大小写),则设置为“ERROR”。 |
src_ip |
principal.ip |
使用 Grok 模式从消息或说明字段中提取的值。 |
src_port |
principal.port |
使用 Grok 模式从说明字段中提取的值。 |
sys_log_host |
intermediary.hostname |
使用 Grok 模式从消息字段中提取的值。 |
syslog_priority |
security_result.priority_details |
使用 Grok 模式从消息字段中提取的值。 |
ts |
metadata.event_timestamp |
使用 grok 和日期过滤条件从日志消息中的 ts 字段转换而来。 |
user |
principal.user.userid |
使用 Grok 模式从消息或说明字段中提取的值。 |
| 不适用 | metadata.event_type |
如果存在 src_ip 或主机名,则设置为“STATUS_UPDATE”。如果存在用户,但不存在其他参数,则设置为“USER_UNCATEGORIZED”。否则,请设置为“GENERIC_EVENT”。 |
| 不适用 | metadata.vendor_name |
设置为“AIX_SYSTEM”。 |
| 不适用 | metadata.product_name |
设置为“AIX_SYSTEM”。 |
| 不适用 | metadata.log_type |
设置为“AIX_SYSTEM”。 |