收集 Cisco eStreamer 日志
本文档介绍了如何使用 Bindplane 将 Cisco eStreamer 日志注入到 Google Security Operations。解析器使用 grok 解析初始消息,并使用 kv 处理键值数据,从而以键值格式从 SYSLOG 消息中提取字段。然后,它会将这些提取的字段映射到统一数据模型 (UDM),处理各种数据类型,并根据正文和目标信息的存在情况,使用事件类型等元数据来丰富事件。
准备工作
请确保满足以下前提条件:
- Google SecOps 实例
- Windows Server 2012 SP2 或更高版本,或具有
systemd
的 Linux 主机 - 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开
- 对 Cisco Firepower 管理中心 (FMC) 的特权访问权限
- 用于运行 eNcore CLI 客户端的 Linux 系统
获取 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
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 上的/opt/observiq-otel-collector/
目录或 Windows 上的 `C:\Program Files\observIQ OpenTelemetry Collector` 目录中。 - 使用文本编辑器(例如
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_file_path: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: YOUR_CUSTOMER_ID endpoint: malachiteingestion-pa.googleapis.com # Add optional ingestion labels for better organization log_type: 'CISCO_ESTREAMER' raw_log_field: body ingestion_labels: 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 eStreamer 上配置 Syslog 转发
在 Firepower 管理中心上配置 eStreamer
- 登录 Firepower 管理中心。
- 依次前往系统 > 集成 > eStreamer。
- 点击 eStreamer 以访问 eStreamer 事件配置。
- 选中要捕获的事件类型旁边的复选框:
- 入侵事件:用于入侵检测事件
- 入侵事件数据包数据:与入侵事件关联的数据包捕获
- 连接事件:用于网络连接数据
- 安全情报事件:用于威胁情报数据
- 文件事件:用于文件分析事件
- 恶意软件事件:用于恶意软件检测事件
- 点击保存。
创建 eStreamer 客户端
- 在 eStreamer 页面中,点击创建客户端。
- 提供以下配置详细信息:
- 主机名:输入将运行 eNcore 客户端的 Linux 系统的 IP 地址。
- 密码:输入用于加密证书文件的密码。
- 点击保存。
- 下载生成的 PKCS12 证书文件,并将其传输到 eNcore 客户端系统。
安装并配置 eNcore CLI 客户端
- 在 Linux 系统上,从 Cisco 下载 eStreamer eNcore CLI 客户端。
提取 eNcore 软件包:
tar -xzf eStreamer-eNcore-*.tar.gz cd eStreamer-eNcore-*
运行设置脚本:
./encore.sh setup
当系统提示时,请选择键值对的输出格式(与 SIEM 系统兼容)。
输入 FMC IP 地址和 PKCS12 证书密码。
配置
estreamer.conf
文件,以将 syslog 消息输出到 Bindplane 代理:- 通过文本编辑器打开
estreamer.conf
文件。 找到输出器部分,并将其配置为将 syslog 发送到您的 Bindplane 代理:
{ "handler": { "outputters": [ { "name": "syslog", "adapter": "kvpair", "enabled": true, "stream": { "uri": "udp://BINDPLANE_AGENT_IP:514" } } ] } }
- 通过文本编辑器打开
将
BINDPLANE_AGENT_IP
替换为 Bindplane 代理的 IP 地址。
启动 eNcore 客户端
在前台模式下测试连接:
./encore.sh foreground
验证完成后,以后台服务形式启动 eNcore:
./encore.sh start
UDM 映射表
日志字段 | UDM 映射 | 逻辑 |
---|---|---|
act |
security_result.action_details |
原始日志中的 act 值会分配给此字段。 |
act |
security_result.action |
如果 act 的值为“Allow”(不区分大小写),则为此字段分配值“ALLOW”。 |
app |
network.http.user_agent |
原始日志中的 app (在解析器中重命名为 requestClientApplication )的值会分配给此字段。 |
blockLength |
security_result.detection_fields[].key |
系统会为该字段分配字符串“blocklength”。 |
blockLength |
security_result.detection_fields[].value |
原始日志中的 blockLength 值(已转换为字符串)会分配给此字段。 |
blockType |
security_result.detection_fields[].key |
字符串“blockType”已分配给此字段。 |
blockType |
security_result.detection_fields[].value |
原始日志中的 blockType 值(已转换为字符串)会分配给此字段。 |
bytesIn |
network.received_bytes |
原始日志中的 bytesIn 值会分配给此字段,并转换为无符号整数。 |
bytesOut |
network.sent_bytes |
原始日志中的 bytesOut 值会分配给此字段,并转换为无符号整数。 |
cat |
security_result.category_details |
原始日志中的 cat 值会分配给此字段。 |
cs1 |
security_result.detection_fields[].value |
原始日志中的 cs1 值会分配给此字段。 |
cs1Label |
security_result.detection_fields[].key |
原始日志中的 cs1Label 值会分配给此字段。 |
cs2 |
security_result.detection_fields[].value |
原始日志中的 cs2 值会分配给此字段。 |
cs2Label |
security_result.detection_fields[].key |
原始日志中的 cs2Label 值会分配给此字段。 |
cs3 |
security_result.detection_fields[].value |
原始日志中的 cs3 值会分配给此字段。 |
cs3Label |
security_result.detection_fields[].key |
原始日志中的 cs3Label 值会分配给此字段。 |
cs4 |
security_result.detection_fields[].value |
原始日志中的 cs4 值会分配给此字段。 |
cs4Label |
security_result.detection_fields[].key |
原始日志中的 cs4Label 值会分配给此字段。 |
cs5 |
security_result.detection_fields[].value |
原始日志中的 cs5 值会分配给此字段。 |
cs5Label |
security_result.detection_fields[].key |
原始日志中的 cs5Label 值会分配给此字段。 |
cs6 |
security_result.detection_fields[].value |
原始日志中的 cs6 值会分配给此字段。 |
cs6 |
security_result.rule_id |
原始日志中的 cs6 值会分配给此字段。 |
cs6Label |
security_result.detection_fields[].key |
原始日志中的 cs6Label 值会分配给此字段。 |
data |
security_result.detection_fields[].value |
如果 suser 字段是 JSON,则原始日志中 suser JSON 对象的 data 值会分配给此字段。 |
deviceInboundInterface |
additional.fields[].key |
字符串“deviceInboundInterface”已分配给此字段。 |
deviceInboundInterface |
additional.fields[].value.string_value |
原始日志中的 deviceInboundInterface 值会分配给此字段。 |
deviceOutboundInterface |
additional.fields[].key |
字符串“deviceOutboundInterface”会分配给此字段。 |
deviceOutboundInterface |
additional.fields[].value.string_value |
原始日志中的 deviceOutboundInterface 值会分配给此字段。 |
dpt |
target.port |
原始日志中的 dpt 值会分配给此字段并转换为整数。 |
dst |
target.asset.ip |
原始日志中的 dst 值会分配给此字段。 |
dst |
target.ip |
原始日志中的 dst 值会分配给此字段。 |
dvcpid |
security_result.about.process.pid |
原始日志中的 dvcpid 值会分配给此字段。 |
dvchost |
target.asset.hostname |
原始日志中的 dvchost 值会分配给此字段。 |
dvchost |
target.hostname |
原始日志中的 dvchost 值会分配给此字段。 |
hostname |
principal.asset.hostname |
原始日志中的 hostname 值会分配给此字段。 |
hostname |
principal.hostname |
原始日志中的 hostname 值会分配给此字段。由解析器逻辑根据是否存在 principal 和 target 信息来确定。如果两者都存在,则值为“NETWORK_CONNECTION”。如果仅存在 principal ,则值为“STATUS_UPDATE”。如果仅存在 target ,则值为“USER_UNCATEGORIZED”。否则,该值为“GENERIC_EVENT”。 |
product_event_type |
metadata.product_event_type |
原始日志中的 product_event_type 值会分配给此字段。 |
product_name |
metadata.product_name |
原始日志中的 product_name 值会分配给此字段。 |
proto |
network.ip_protocol |
原始日志中的 proto 值会转换为整数,然后映射到相应的 IP 协议名称(例如,6 变为 TCP,17 变为 UDP),使用“parse_ip_protocol.include”中包含的查找。 |
severity |
security_result.severity_details |
原始日志中的 severity 值会分配给此字段。 |
spt |
principal.port |
原始日志中的 spt 值会分配给此字段并转换为整数。 |
src |
principal.asset.ip |
原始日志中的 src 值会分配给此字段。 |
src |
principal.ip |
原始日志中的 src 值会分配给此字段。 |
suser |
security_result.detection_fields[].value |
如果原始日志中的 suser 值不是 JSON 对象,则会将其分配给此字段。如果它是 JSON,则使用 suser 对象中的 data 字段。 |
suser |
security_result.detection_fields[].key |
系统会将字符串“suser”分配给此字段。 |
ts |
metadata.event_timestamp |
原始日志中的 ts 值会被解析为时间戳并分配给此字段。系统会尝试多种时间戳格式,直到成功解析为止。 |
vendor_name |
metadata.vendor_name |
原始日志中的 vendor_name 值会分配给此字段。 |
version |
metadata.product_version |
原始日志中的 version 值会分配给此字段。 |
需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。