收集 HP ProCurve 日志
本文档介绍了如何使用 Bindplane 代理将 HP ProCurve 日志注入到 Google Security Operations。
HP ProCurve 是一系列网络交换机,可针对身份验证事件、配置变更、网络活动和系统事件生成 syslog 消息。解析器会从 syslog 格式的日志中提取字段,解析键值对和说明,并将它们映射到统一数据模型 (UDM)。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机 - Bindplane 代理与 HP ProCurve 交换机之间的网络连接
- 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
- 通过 SSH 访问 HP ProCurve 交换机
获取 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 /etc/bindplane-agent/config.yamlWindows:
notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
修改配置文件
将
config.yaml的全部内容替换为以下配置:receivers: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/hp_procurve: compression: gzip creds_file_path: '/etc/bindplane-agent/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: HP_PROCURVE raw_log_field: body service: pipelines: logs/hp_procurve_to_chronicle: receivers: - udplog exporters: - chronicle/hp_procurve
配置参数
替换以下占位符:
接收器配置:
listen_address:要监听的 IP 地址和端口:0.0.0.0侦听所有接口(推荐)- 端口
514是标准 syslog 端口(在 Linux 上需要 root 权限;对于非 root 用户,请使用1514)
导出器配置:
creds_file_path:提取身份验证文件的完整路径:- Linux:
/etc/bindplane-agent/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:从 Google SecOps 控制台复制的客户 IDendpoint:区域端点网址:- 美国:
malachiteingestion-pa.googleapis.com - 欧洲:
europe-malachiteingestion-pa.googleapis.com - 亚洲:
asia-southeast1-malachiteingestion-pa.googleapis.com - 如需查看完整列表,请参阅区域级端点
- 美国:
保存配置文件
- 修改后,保存文件:
- Linux:依次按
Ctrl+O、Enter和Ctrl+X - Windows:依次点击文件 > 保存
- Linux:依次按
重启 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"
- 按
在 HP ProCurve 交换机上配置 syslog
- 使用 SSH 登录 HP ProCurve 交换机。
使用以下命令验证交换机接口:
show ip int br使用以下命令在交换机上启用配置模式:
console# conf t配置交换机以使用以下命令发送日志:
logging host <bindplane-server-ip> transport <udp/tcp> port <port-number> logging facility syslog logging trap informational logging buffer 65536 logging origin-id hostname logging source-interface <interface>- 将
<bindplane-server-ip>替换为 Bindplane 代理 IP 地址。 - 将
<port-number>替换为配置的端口(默认值:514)。 - 将
<interface>替换为 syslog 流量的源接口。
- 将
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
| AAAScheme | read_only_udm.security_result.detection_fields.value | 如果键为 AAAScheme,则从 descrip 字段提取的值 |
| AAAType | read_only_udm.security_result.detection_fields.value | 如果键为 AAAType,则从 descrip 字段提取的值 |
| 机箱 ID | read_only_udm.security_result.detection_fields.value | 如果键为 Chassis ID,则从 description 字段提取的值 |
| 命令为 | read_only_udm.security_result.detection_fields.value | commandInfo 字段中 Command is 后面的文本 |
| CommandSource | read_only_udm.security_result.detection_fields.value | 如果键为 CommandSource,则从 descrip 字段提取的值 |
| 配置方法 | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 config_method 放置在附加字段中 |
| ConfigDestination | read_only_udm.security_result.detection_fields.value | 如果键为 ConfigDestination,则从 descrip 字段提取的值 |
| ConfigSource | read_only_udm.security_result.detection_fields.value | 如果键为 ConfigSource,则从 descrip 字段提取的值 |
| Device-Name | read_only_udm.principal.hostname | 如果该字段存在于日志中,则会映射到主账号主机名和资产主机名 |
| 活动 ID | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 event_id 放置在附加字段中 |
| EventIndex | read_only_udm.security_result.detection_fields.value | 如果键为 EventIndex,则从 descrip 字段提取的值 |
| IfIndex | read_only_udm.security_result.detection_fields.value | 如果键为 IfIndex,则从 description 字段提取的值 |
| IP:%{IP:IPAddr} | read_only_udm.target.ip, read_only_udm.target.asset.ip | 从 desc 字段提取并映射到目标 IP 和目标资产 IP 的 IP 地址 |
| IPAddr | read_only_udm.target.ip, read_only_udm.target.asset.ip | 如果该字段存在于日志中,则会映射到目标 IP 和目标资产 IP |
| 通知类型 | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 notice_type 放置在附加字段中 |
| 端口 ID | read_only_udm.security_result.detection_fields.value | 如果键为 Port ID,则从 description 字段提取的值 |
| Remote-IP-Address | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 remote_ip_address 放置在附加字段中 |
| 服务 | read_only_udm.security_result.detection_fields.value | 如果键为 Service,则从 descrip 字段提取的值 |
| 任务 | read_only_udm.security_result.detection_fields.value | 如果键为 Task,则从 descrip 字段提取的值 |
| 用户 | read_only_udm.principal.user.userid | 如果该字段存在于日志中,则会映射到主用户 ID |
| User-Name | read_only_udm.principal.user.userid | 如果该字段存在于日志中,则会映射到主用户 ID |
| 用户名 | read_only_udm.principal.user.userid | 如果该字段存在于日志中,则会映射到主用户 ID |
| UserService | read_only_udm.security_result.detection_fields.value | 如果键为 UserService,则从 desc 字段提取的值 |
| collection_time.seconds | read_only_udm.metadata.event_timestamp.seconds | 事件时间戳的秒部分 |
| 数据 | 此字段包含原始日志消息,并经过解析以提取其他字段。未映射到 UDM。 | |
| 降序 | read_only_udm.security_result.description | 从日志消息中提取的说明 |
| descrip | 从 desc 字段提取的说明,进一步解析为键值对。未映射到 UDM。 |
|
| 说明 | read_only_udm.security_result.description | 如果该字段存在于日志中,则会映射到安全结果说明 |
| descript | read_only_udm.metadata.description | 如果该字段存在于日志中,则会映射到元数据说明 |
| event_id | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 event_id 放置在附加字段中 |
| eventId | read_only_udm.metadata.product_event_type | 从日志消息中提取的事件 ID |
| 主机名 | read_only_udm.principal.hostname, read_only_udm.principal.asset.hostname | 从日志消息中提取的主机名,并映射到主主机名和资源主机名 |
| inter_ip | read_only_udm.additional.fields.value.string_value, read_only_udm.intermediary.ip | 如果该字段存在于日志中且是有效的 IP,则会映射到中介 IP。否则,系统会将其放置在附加字段中,并将其设置为 inter_ip |
| notice_type | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 notice_type 放置在附加字段中 |
| pid | read_only_udm.principal.process.pid | 如果该字段存在于日志中,则会映射到主进程 PID |
| 计划 | 从日志消息中提取的程序信息,进一步解析以提取模块、严重程度和操作。未映射到 UDM。 | |
| proto | read_only_udm.network.application_protocol, read_only_udm.additional.fields.value.string_value | 从日志消息中提取的协议。如果与已知协议匹配,则映射到应用协议。否则,系统会将其放置在附加字段中,并将其设置为 Application Protocol |
| remote_ip_address | read_only_udm.principal.ip, read_only_udm.principal.asset.ip, read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中且是有效的 IP,则会映射到主 IP 和主资产 IP。否则,系统会将其放置在附加字段中,并将其设置为 remote_ip_address |
| 和程度上减少 | read_only_udm.security_result.severity, read_only_udm.security_result.severity_details | 按 / 分割后从 program 字段中提取的严重程度。它会映射到 UDM 严重程度级别,还会存储为原始严重程度详细信息 |
| src_ip | read_only_udm.principal.ip, read_only_udm.principal.asset.ip | 从日志消息中提取的源 IP,并映射到主 IP 和主资产 IP |
| 状态 | read_only_udm.additional.fields.value.string_value | 如果该字段存在于日志中,则会作为 status 放置在附加字段中 |
| targetHostname | read_only_udm.target.hostname, read_only_udm.target.asset.ip | 如果该字段存在于日志中,则会映射到目标主机名和目标资产 IP |
| target_ip | read_only_udm.target.ip, read_only_udm.target.asset.ip | 从日志消息中提取的目标 IP,并映射到目标 IP 和目标资产 IP |
| 时间戳 | read_only_udm.metadata.event_timestamp.seconds | 从日志消息中提取并转换为事件时间戳的时间戳 |
| timestamp.seconds | read_only_udm.metadata.event_timestamp.seconds | 事件时间戳的秒部分 |
| 用户名 | read_only_udm.principal.user.userid | 如果该字段存在于日志中,则会映射到主用户 ID |
| read_only_udm.metadata.event_type | 根据字段和逻辑的组合确定: - NETWORK_CONNECTION:如果 has_principal 和 has_target 为 true。- USER_LOGOUT:如果 action 为 WEBOPT_LOGOUT、LOGOUT 或 SHELL_LOGOUT。- USER_LOGIN:如果 action 为 LOGIN 或 WEBOPT_LOGIN_SUC。- STATUS_UPDATE:如果 action 不为空或 src_ip/hostname 不为空。- USER_UNCATEGORIZED:如果 has_user 为 true。- GENERIC_EVENT:如果未满足上述任何条件。 |
|
| read_only_udm.metadata.product_name | 硬编码为 Procurve |
|
| read_only_udm.metadata.vendor_name | 硬编码为 HP |
|
| read_only_udm.extensions.auth.type | 如果 event_type 为 USER_LOGOUT 或 USER_LOGIN,则设置为 MACHINE |
|
ts |
event.idm.read_only_udm.metadata.event_timestamp |
从变更日志映射 |
prin_app |
event.idm.read_only_udm.principal.application |
从变更日志映射 |
DHCP |
network.application_protocol |
从变更日志映射 |
prin_port |
principal.port |
从变更日志映射 |
status", "config_method", "event_id", and "notice_type |
additional.fields |
从变更日志映射 |
target_mac |
target.mac |
从变更日志映射 |
msg |
metadata.description |
从变更日志映射 |
src_mac |
principal.mac |
从变更日志映射 |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。