收集 Cisco 交换机日志
支持的语言:
Google SecOps
SIEM
本文档介绍了如何使用 Bindplane 代理将 Cisco 交换机日志注入到 Google Security Operations。解析器会从 SYSLOG 消息中提取字段,并根据识别出的模式和关键字将其映射到统一数据模型 (UDM)。它可处理各种事件,包括 DHCP、SSH、登录尝试、网络流量和系统状态更新,并对这些事件进行分类,以及使用相关的安全详细信息来丰富数据。
准备工作
- 确保您拥有 Google SecOps 实例。
- 确保您使用的是 Windows 2016 或更高版本,或者具有
systemd
的 Linux 主机。 - 如果通过代理运行,请确保防火墙端口处于开放状态。
- 确保您拥有对 Cisco 交换机的特权访问权限。
获取 Google SecOps 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载注入身份验证文件。将文件安全地保存在将要安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 配置文件。
- 复制并保存组织详细信息部分中的客户 ID。
安装 Bindplane 代理
Windows 安装
- 以管理员身份打开命令提示符或 PowerShell。
运行以下命令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
其他安装资源
- 如需了解其他安装选项,请参阅此安装指南。
配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps
访问配置文件:
- 找到
config.yaml
文件。通常,它位于 Linux 上的/etc/bindplane-agent/
目录中或 Windows 上的安装目录中。 - 使用文本编辑器(例如
nano
、vi
或记事本)打开该文件。
- 找到
按如下方式修改
config.yaml
文件:receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/chronicle_w_labels: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: <customer_id> endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization ingestion_labels: log_type: CISCO_SWITCH raw_log_field: body service: pipelines: logs/source0__chronicle_w_labels-0: receivers: - udplog exporters: - chronicle/chronicle_w_labels
根据基础架构的需要替换端口和 IP 地址。
将
<customer_id>
替换为实际的客户 ID。将
/path/to/ingestion-authentication-file.json
更新为获取 Google SecOps 提取身份验证文件部分中保存身份验证文件的路径。
重启 Bindplane 代理以应用更改
如需在 Linux 中重启 Bindplane 代理,请运行以下命令:
sudo systemctl restart bindplane-agent
如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:
net stop BindPlaneAgent && net start BindPlaneAgent
在 Cisco 交换机上配置 Syslog
- 登录 Cisco 交换机。
输入
enable
命令来升级权限:Switch> enable Switch#
输入
conf t
命令,切换到配置模式:Switch# conf t Switch(config)#
输入以下命令:
logging host <bindplane-server-ip> transport <tcp/udp> port <port-number> logging source-interface <interface>
- 将
<bindplane-server-ip>
替换为 Bindplane 代理 IP 地址,并将<port-number>
替换为配置的端口。 - 将
<tcp/udp>
替换为 Bindplane 代理上配置的监听协议。(例如,udp
)。 - 将
<interface>
替换为 Cisco 接口 ID。
- 将
输入以下命令以设置优先级:
logging trap Informational logging console Informational logging severity Informational
设置 syslog 设施:
logging facility local6
输入以下命令以启用时间戳:
service timestamps log datetime
保存并退出。
输入以下命令,配置在重启后仍有效的设置:
copy running-config startup-config
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
操作 | security_result.action_details | 此字段的值派生自原始日志中的 action 字段。 |
天 | ||
说明 | metadata.description | 此字段的值派生自原始日志中的 description 字段。 |
说明 | security_result.description | 此字段的值派生自原始日志中的 description 字段。 |
destination_ip | target.asset.ip | 此字段的值派生自原始日志中的 destination_ip 字段。 |
destination_ip | target.ip | 此字段的值派生自原始日志中的 destination_ip 字段。 |
destination_port | target.port | 此字段的值派生自原始日志中的 destination_port 字段。 |
device | principal.asset.hostname | 此字段的值派生自原始日志中的 device 字段。 |
device | principal.hostname | 此字段的值派生自原始日志中的 device 字段。 |
device | target.asset.hostname | 此字段的值派生自原始日志中的 device 字段。 |
device | target.hostname | 此字段的值派生自原始日志中的 device 字段。 |
device_ip | principal.asset.ip | 此字段的值派生自原始日志中的 device_ip 字段。 |
device_ip | principal.ip | 此字段的值派生自原始日志中的 device_ip 字段。 |
device_ip | target.asset.ip | 此字段的值派生自原始日志中的 device_ip 字段。 |
device_ip | target.ip | 此字段的值派生自原始日志中的 device_ip 字段。 |
facility | principal.resource.type | 此字段的值派生自原始日志中的 facility 字段。 |
header_data | metadata.product_log_id | 此字段的值派生自原始日志中的 header_data 字段。 |
header_data | target.asset.ip | 此字段的值派生自原始日志中的 header_data 字段。 |
header_data | target.ip | 此字段的值派生自原始日志中的 header_data 字段。 |
主机名 | principal.asset.hostname | 此字段的值派生自原始日志中的 hostname 字段。 |
主机名 | principal.hostname | 此字段的值派生自原始日志中的 hostname 字段。 |
ip | principal.asset.ip | 此字段的值派生自原始日志中的 ip 字段。 |
ip | principal.ip | 此字段的值派生自原始日志中的 ip 字段。 |
ip_address | principal.asset.ip | 此字段的值派生自原始日志中的 ip_address 字段。 |
ip_address | principal.ip | 此字段的值派生自原始日志中的 ip_address 字段。 |
ip_protocol | network.ip_protocol | 此字段的值派生自原始日志中的 ip_protocol 字段。 |
mac | principal.mac | 此字段的值派生自原始日志中的 mac 字段。 |
助记符 | network.dhcp.opcode | 此字段的值派生自原始日志中的 mnemonic 字段。 |
助记符 | metadata.product_event_type | 此字段的值派生自原始日志中的 mnemonic 字段。 |
月 | ||
p_ip | principal.asset.ip | 此字段的值派生自原始日志中的 p_ip 字段。 |
p_ip | principal.ip | 此字段的值派生自原始日志中的 p_ip 字段。 |
端口 | target.port | 此字段的值派生自原始日志中的 port 字段。 |
优先级 | ||
协议 | network.ip_protocol | 此字段的值派生自原始日志中的 protocol 字段。 |
reason | ||
规则 | security_result.rule_id | 此字段的值派生自原始日志中的 rule 字段。 |
sec_result_action | security_result.action | 此字段的值派生自原始日志中的 sec_result_action 字段。 |
和程度上减少 | ||
来源 | principal.asset.ip | 此字段的值派生自原始日志中的 source 字段。 |
来源 | principal.ip | 此字段的值派生自原始日志中的 source 字段。 |
source_ip | network.dhcp.ciaddr | 此字段的值派生自原始日志中的 source_ip 字段。 |
source_ip | principal.asset.ip | 此字段的值派生自原始日志中的 source_ip 字段。 |
source_ip | principal.ip | 此字段的值派生自原始日志中的 source_ip 字段。 |
source_mac | network.dhcp.chaddr | 此字段的值派生自原始日志中的 source_mac 字段。 |
source_port | principal.port | 此字段的值派生自原始日志中的 source_port 字段。 |
摘要 | security_result.summary | 此字段的值派生自原始日志中的 summary 字段。 |
时间 | ||
timezone | ||
用户 | principal.user.userid | 此字段的值派生自原始日志中的 user 字段。 |
用户 | target.user.userid | 此字段的值派生自原始日志中的 user 字段。 |
时间 | ||
年 | ||
extensions.auth.type | MACHINE | |
metadata.log_type | CISCO_SWITCH | |
metadata.vendor_name | Cisco | |
metadata.product_name | Cisco Switch | |
network.application_protocol | DHCP | |
network.dhcp.type | 请求 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。