收集 Dell 交换机日志
解析器版本:11.0
本文档介绍了如何使用 Bindplane 代理将 Dell 交换机日志注入到 Google Security Operations。
此解析器会提取 Dell 交换机日志、对时间戳进行标准化,并使用 grok 模式将日志消息结构化为键值对。然后,它会将这些提取的字段映射到统一数据模型 (UDM),处理各种日志格式,并使用资产详细信息和安全严重级别等上下文信息丰富数据。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2016 或更高版本,或者具有
systemd的 Linux 主机 - Bindplane 代理与 Dell 交换机之间的网络连接
- 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
- Dell 交换机的有效连接和管理凭据
获取 Bindplane 代理的 Google SecOps 凭据
如需向 Google SecOps 验证 Bindplane 代理的身份,请选择以下方法之一:
- 新部署:使用 Chronicle API(选项 1)。
- 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 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该服务应显示为 RUNNING。
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: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/dell_switch: 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: '<customer_id>' endpoint: chronicle.googleapis.com log_type: DELL_SWITCH raw_log_field: body service: pipelines: logs/dell_switch_to_chronicle: receivers: - udplog exporters: - chronicle/dell_switch
配置参数
替换以下占位符:
接收器配置:
listen_address:要监听的 IP 地址和端口:0.0.0.0,以监听所有接口(推荐)- 端口
514是标准 syslog 端口(在 Linux 上需要 root 权限;对于非 root 用户,请使用1514)
导出器配置:
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:从 Google SecOps 控制台复制的客户 IDlocation:将<LOCATION>替换为 Google SecOps 实例的区域(例如us、europe或asia-southeast1)。导出器会使用此值作为chronicle.googleapis.com的前缀。如需查看完整列表,请参阅区域级端点。project:将<PROJECT_NUMBER>替换为 IAM 和管理 > 设置中的项目编号。endpoint:保持设置为chronicle.googleapis.com。
旧版提取 API
如果您使用选项 2 中的提取身份验证文件,请将
exporters代码块替换为以下内容。将creds_file_path设置为提取身份验证文件的路径,如果您的实例位于美国境外,请将malachiteingestion-pa.googleapis.com替换为您的区域端点(例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/dell_switch: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: DELL_SWITCH raw_log_field: body
保存配置文件
- 修改后,保存文件:
- 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"
- 按
配置从 Dell 交换机导出 syslog
- 使用 SSH 或控制台端口连接到 Dell 交换机。
- 使用管理员凭据登录。
使用以下命令指定 syslog 服务器的 IP 地址或主机名(将
<syslog-server-ip>、<udp|tcp>和<syslog-port-number>替换为实际详细信息):logging host <syslog-server-ip> transport <udp|tcp> port <syslog-port-number>可选:定义要发送到 syslog 服务器的消息的最低严重级别。例如,如需记录信息性消息及更高级别的消息,请执行以下操作:
logging level informational将运行配置保存到启动配置,以确保更改在重新启动后仍然有效:
copy running-config startup-config保存配置:
write memory
支持的 Dell Switch 示例日志
SYSLOG
{ "priority": 165, "version": 1, "timestamp": "2023-10-12T12:37:17.249566+00:00", "hostname": "switch-lon-01", "app_name": "dn_alm", "proc_id": "940", "message": "Node.1-Unit.1:PRI [event], Dell EMC (OS10) %ALM_AUTH_EVENT: Authentication event was raised MESSAGE=pam_unix(sshd:session): session opened for user service_account by (uid=0)" }JSON
{ "appname": "SNOOP", "facility": 23, "hostname": "access-switch-a1", "message": "snooping.c(2177) 70820228 %% DBG Report from intf Gi6/0/11 ignored -- no router ports on vlan 193", "priority": 191, "proc_id": "snoopTask" }键值对 / 事件格式
Events: Eventid = {38812} Occurrencetime = {3 Sept 2024 00:06:06} Eventseverity = {Minor} Jobid = {30506} Computer = {backup-server-01} Program = {DatabaseAgent} Description = {Block Change Tracking is found DISABLED on Oracle DB [PROD_DB]. Incremental backups may run slow.}审核 SYSLOG
{ "priority": 110, "version": 1, "timestamp": "2023-12-12T00:58:26.893679+00:00", "hostname": "core-switch-palf", "app_name": ".clish", "proc_id": "29156", "message": "Node.1-Unit.1:PRI [audit], User sec_admin on /dev/pts/0 from 10.0.0.50 used cmd: 'terminal length 0' - completed" }SNMP 设陷 / TRAPMGR 格式
{ "priority": 189, "version": 1, "timestamp": "2023-12-28T23:37:27.394Z", "hostname": "dist-switch-01", "app_name": "TRAPMGR", "proc_id": "trapTask", "extensions": { "origin_ip": "192.168.1.1", "software": "N3000_Series", "swVersion": "6.3.2.3" }, "message": "traputil.c(721) 1056839 %% Gi1/0/5 is transitioned from the Learning state to the Forwarding state" }
UDM 映射表
| 日志字段 | UDM 映射 | 逻辑 |
|---|---|---|
acct |
principal.user.userid |
如果 user 字段不存在,则用作 userid。 |
addr |
principal.asset.ip、principal.ip |
如果它是有效 IP 且与主机名不同,则解析为 IP 地址并用于主账号的 IP 和资产 IP。 |
application |
principal.application |
直接映射。 |
asset |
principal.asset.attribute.labels.value |
直接映射到素材资源标签值,键硬编码为“素材资源名称”。如果资产字段为空,且消息包含“Dell”,则资产会设置为“Dell”。 |
auid |
principal.resource.attribute.labels.value |
直接映射到 auid 中键为 principal.resource.attribute.labels 的标签。 |
datetime |
metadata.event_timestamp |
从消息字段中的各种格式解析并转换为时间戳。 |
dest_ip |
target.asset.ip、target.ip |
映射到目标 IP 和目标资产 IP。 |
enterpriseId |
principal.resource.attribute.labels.value |
映射到 enterpriseId 中键为 principal.resource.attribute.labels 的标签。 |
exe |
sec_result.detection_fields.value |
映射到键为 exe 的检测字段。 |
File |
target.file.full_path |
直接映射。 |
grantors |
principal.resource.attribute.labels.value |
映射到 grantors 中键为 principal.resource.attribute.labels 的标签。 |
host |
principal.hostname、principal.asset.hostname、metadata.event_type |
用作主账号主机名和资产主机名。如果存在 host,则 metadata.event_type 设置为 STATUS_UPDATE。如果存在主机名但不存在主机,则主机名将用作主机。 |
hostname |
principal.asset.ip、principal.ip、host |
如果它是有效 IP,则用于主账号 IP 和资产 IP。如果 host 为空,则用作 host。 |
ID |
principal.resource.attribute.labels.value |
映射到 principal.resource.attribute.labels 中键为 ID 的标签。 |
ip |
principal.asset.ip、principal.ip |
映射到主账号 IP 和资产 IP。 |
is_synced |
sec_result.detection_fields.value |
映射到键为 is_synced 的检测字段。 |
local |
target.asset.ip、target.ip、target.port |
解析以提取本地 IP 和端口,并映射到目标 IP、目标资产 IP 和目标端口。 |
local_ip |
target.asset.ip、target.ip |
从 local 字段中提取,并映射到目标 IP 和目标资产 IP。 |
local_port |
target.port |
从 local 字段中提取并映射到目标端口。 |
mac |
principal.mac |
如果它是有效的 MAC 地址,则映射到主 MAC 地址。 |
msg |
metadata.description |
用作活动说明(如果存在)。还解析了其他字段。 |
msg1 |
metadata.description |
如果 msg2 不存在,则用作事件说明。 |
msg2 |
sec_result.description、metadata.event_type、extensions.auth.type |
用作安全结果说明。如果包含“opened for user”,则将事件类型设置为 USER_LOGIN,并将身份验证类型设置为 MACHINE。如果包含“closed for user”,则事件类型设置为 USER_LOGOUT,授权类型设置为 MACHINE。 |
op |
metadata.product_event_type |
用作商品事件类型(如果存在)。 |
pid |
principal.process.pid |
直接映射。 |
port |
principal.port |
直接映射。 |
prod_event_type |
metadata.product_event_type |
如果存在,则用作商品事件类型。 |
res |
sec_result.summary |
直接映射。 |
sec_description |
sec_result.description、target.url、target.ip、target.asset.ip、sec_result.action_details |
解析目标网址、IP、操作详情,并用作安全结果说明。 |
Server_ID |
target.resource.product_object_id |
直接映射。 |
server |
principal.asset.ip、principal.ip、principal.port |
经过解析后,提取服务器 IP 和端口,并映射到主 IP、主资产 IP 和主端口。 |
server_ip |
principal.asset.ip、principal.ip |
从 server 字段中提取,并映射到主账号 IP 和主账号资产 IP。 |
server_port |
principal.port |
从 server 字段中提取并映射到主端口。 |
ses |
network.session_id |
直接映射。 |
severity |
sec_result.severity、metadata.product_event_type |
用于根据特定值确定安全结果严重程度和产品事件类型。 |
software |
principal.asset.software |
直接映射。 |
softwareName |
software.name |
直接映射。 |
Status |
sec_result.summary |
如果 res 不存在,则用作安全结果摘要。 |
subj |
principal.resource.attribute.labels.value |
映射到 subj 中键为 principal.resource.attribute.labels 的标签。 |
swVersion |
software.version |
直接映射。 |
target_host |
target.hostname、target.asset.hostname |
直接映射到目标主机名和目标资产主机名。 |
target_ip |
target.asset.ip、target.ip |
直接映射到目标 IP 和目标资产 IP。 |
target_url |
target.url |
直接映射。 |
target_user_id |
target.user.userid |
直接映射。 |
terminal |
principal.resource.attribute.labels.value |
映射到 terminal 中键为 principal.resource.attribute.labels 的标签。 |
tzknown |
sec_result.detection_fields.value |
映射到键为 tzknown 的检测字段。 |
uid |
principal.resource.attribute.labels.value |
映射到 principal.resource.attribute.labels 中键为 uid 的标签。 |
user |
principal.user.userid、metadata.event_type |
用作主用户 ID。如果存在 user,则 metadata.event_type 设置为 USER_UNCATEGORIZED。 |
username |
target.user.userid |
直接映射到目标用户 ID。 |
| 不适用 | metadata.vendor_name |
硬编码为“Dell”。 |
| 不适用 | metadata.product_name |
硬编码为“Dell Switch”。 |
| 不适用 | extensions.auth.type |
对于特定登录/退出账号事件,设置为 MACHINE。 |
| 不适用 | metadata.event_type |
由基于各种字段和条件的复杂逻辑确定,如果未另行设置,则默认为 GENERIC_EVENT。可以是 USER_LOGIN、USER_LOGOUT、USER_UNCATEGORIZED、NETWORK_CONNECTION、NETWORK_UNCATEGORIZED、STATUS_UPDATE 或 GENERIC_EVENT。 |
reason_code |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
Eventid |
metadata.product_log_id |
从更新日志映射 |
Eventseverity |
security_result.severity |
从更新日志映射 |
Computer |
principal.hostname |
从更新日志映射 |
Program |
principal.application |
从更新日志映射 |
Description |
security_result.description |
从更新日志映射 |
tzknown", "is_synced" and "exe |
security_result.detection_fields |
从更新日志映射 |
res |
security_result.summary |
从更新日志映射 |
status |
security_result.summary |
从更新日志映射 |
uid", "enterpriseId", "auid", "terminal", "subj", "grantors", and "ID |
principal.resource.attribute.labels |
从更新日志映射 |
sec_description |
security_result.description |
从更新日志映射 |
action_details |
security_result.action_details |
从更新日志映射 |
softwareName |
principal.asset.software.name |
从更新日志映射 |
swVersion |
principal.asset.software.version |
从更新日志映射 |
port |
principal_port |
从更新日志映射 |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。