收集 Cisco Prime 日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 Cisco Prime 日志注入到 Google Security Operations。解析器利用 Grok 模式从各种 syslog 消息格式中提取字段,并将其映射到统一数据模型 (UDM)。它可处理不同的日志结构(包括键值对),并根据日志消息中找到的特定关键字和模式,使用用户、正文、目标和安全信息来丰富数据。

准备工作

请确保满足以下前提条件:

  • Google SecOps 实例
  • Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果通过代理运行,请确保防火墙端口处于开放状态
  • 对 Cisco Prime 的特权访问权限

获取 Google SecOps 注入身份验证文件

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载注入身份验证文件。将该文件安全地保存在将要安装 Bindplane 的系统上。

获取 Google SecOps 客户 ID

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 配置文件
  3. 复制并保存组织详细信息部分中的客户 ID

安装 BindPlane 代理

按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。

Windows 安装

  1. 以管理员身份打开命令提示符PowerShell
  2. 运行以下命令:

    msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
    

Linux 安装

  1. 打开具有 root 或 sudo 权限的终端。
  2. 运行以下命令:

    sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
    

其他安装资源

如需了解其他安装选项,请参阅安装指南

配置 Bindplane 代理以注入 Syslog 并将其发送到 Google SecOps

  1. 访问配置文件:
    • 找到 config.yaml 文件。通常,它位于 Linux 上的 /etc/bindplane-agent/ 目录中或 Windows 上的安装目录中。
    • 使用文本编辑器(例如 nanovi 或记事本)打开该文件。
  2. 按如下方式修改 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: <customer_id>
            endpoint: malachiteingestion-pa.googleapis.com
            # Add optional ingestion labels for better organization
            log_type: 'CISCO_PRIME'
            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
    

配置更改审核通知和 syslog 接收器

  1. 您可以配置系统,以便针对与以下事件相关的更改审核发送 syslog 通知:

    • 设备资产清单更新
    • 配置修改
    • 对配置模板做出的更改
    • 与模板相关的操作
    • 用户活动,例如登录、退出和账号修改
  2. 登录 Cisco Prime 网页界面。

  3. 依次前往管理 > 设置 > 系统设置

  4. 依次选择邮件和通知> 更改审核通知

  5. 点击启用更改审核通知复选框。

  6. 点击 + 按钮以指定 syslog 服务器。

  7. 提供以下配置详细信息:

    • 输入 Bindplane 代理 IP 地址。
    • 选择 UDP 协议。
    • 输入 Bindplane 代理端口号。
  8. 点击保存

将系统审核日志配置为以 syslog 格式转发

  1. 登录 Cisco Prime 网页界面。
  2. 依次前往管理 > 设置 > 日志记录 > Syslog 日志记录选项
  3. 点击启用 Syslog 复选框。
  4. 提供以下配置详细信息:
    • 输入 Bindplane 代理 IP 地址。
    • 选择 UDP 协议。
    • 输入 Bindplane 代理端口号。
    • 选择八个设施之一或 local0
  5. 点击保存

UDM 映射表

日志字段 UDM 映射 逻辑
client_ip_address principal.ip、principal.asset.ip 该值取自 client_ip_address 字段,该字段是使用 kv 过滤条件从原始日志中提取的。
日期 metadata.event_timestamp 该值取自 date 字段,该字段使用 grok 模式从原始日志中提取,然后使用日期过滤器转换为时间戳。
说明 security_result.description 该值取自 description 字段,该字段使用 Grok 模式从原始日志中提取。
dest_mac target.mac 该值取自 dest_mac 字段,该字段使用 grok 模式从原始日志中提取并转换为小写。
device_id principal.asset_id 该值取自 device_id 字段,该字段使用 grok 模式从原始日志中提取。最终值的格式为“设备 ID:”。
device_ip principal.ip、principal.asset.ip 该值取自 device_ip 字段,该字段使用 kv 过滤条件从原始日志中提取。然后,该值会被解析为 JSON 数组,并且数组中的每个 IP 地址都会添加到 UDM 字段中。
device_type target.resource.attribute.labels.value 该值取自 device_type 字段,该字段使用 Grok 模式从原始日志中提取。
dst_user target.user.userid 该值取自 dst_user 字段,该字段使用 Grok 模式从原始日志中提取。
电子邮件 src.hostname 该值取自 email 字段,该字段使用 Grok 模式从原始日志中提取。
file_path principal.process.file.full_path 该值取自 file_path 字段,该字段使用 Grok 模式从原始日志中提取。
主机名 target.resource.attribute.labels.value 该值取自 hostname 字段,该字段使用 Grok 模式从原始日志中提取。
id principal.asset_id 该值取自 id 字段,该字段使用 grok 模式从原始日志中提取。最终值的格式为“实体 ID:”。
ip_address principal.ip、principal.asset.ip 该值取自 ip_address 字段,该字段使用 Grok 模式从原始日志中提取。
log_level security_result.severity 该值取自 log_level 字段,该字段使用 grok 模式从原始日志中提取。如果不存在 severity,则使用此属性来确定严重程度。
mac_address principal.mac、source_mac 该值取自 mac_address 字段,该字段使用 grok 模式从原始日志中提取并转换为小写。如果 source_mac 为空,则该值也用作 source_mac 的值。
oid principal.asset.product_object_id 该值取自 oid 字段,该字段使用 Grok 模式从原始日志中提取。
principal_ip principal.ip、principal.asset.ip 该值取自 principal_ip 字段,该字段使用 Grok 模式从原始日志中提取。
principal_port principal.port 该值取自 principal_port 字段,该字段使用 grok 模式从原始日志中提取并转换为整数。
process_name principal.resource.name 该值取自 process_name 字段,该字段使用 Grok 模式从原始日志中提取。
sec_description security_result.description 该值取自 sec_description 字段,该字段使用 Grok 模式从原始日志中提取。
session_id network.session_id 该值取自 session_id 字段,该字段使用 Grok 模式从原始日志中提取。
和程度上减少 security_result.severity 该值取自 severity 字段,该字段使用 grok 模式从原始日志中提取。如果存在,则用于确定严重程度。
source_mac principal.mac 该值取自 source_mac 字段,该字段使用 grok 模式从原始日志中提取并转换为小写。如果为空,则采用 mac_address 的值。
摘要 security_result.summary 该值取自 summary 字段,该字段使用 Grok 模式从原始日志中提取。
target_ip target.ip、target.asset.ip 该值取自 target_ip 字段,该字段使用 Grok 模式从原始日志中提取。
thread_pool metadata.product_event_type 该值取自 thread_pool 字段,该字段使用 Grok 模式从原始日志中提取。
时间戳 metadata.event_timestamp 该值取自 timestamp 字段,该字段使用 grok 模式从原始日志中提取,然后使用日期过滤器转换为时间戳。
类型 metadata.product_event_type 该值取自 Type 字段,该字段是使用 kv 过滤条件从原始日志中提取的。
user_name principal.user.userid 该值取自 user_name 字段,该字段使用 grok 模式或 kv 过滤条件从原始日志中提取。
metadata.event_type metadata.event_type 该值根据原始日志中是否存在特定字段和模式来确定。相应逻辑包括:
- 默认值:GENERIC_EVENT
- 如果 thread_pool 为“EmailAlertHelper”:EMAIL_TRANSACTION
- 如果 application_name 为“aesSystem”且 desc 包含“HealthMonitorHelper”:STATUS_HEARTBEAT
- 如果 user_presenttarget_resource_present 均为 true:USER_RESOURCE_ACCESS
- 如果 user_present 为 true:USER_UNCATEGORIZED
- 如果 principal_presenttarget_present 均为 true:NETWORK_CONNECTION
- 如果 principal_present 为 true:STATUS_UPDATE
- 如果 dst_user 存在且 description 包含“logout”:USER_LOGOUT
- 如果 dst_user 存在且 description 不包含“logout”:USER_LOGIN
metadata.vendor_name metadata.vendor_name 该值设置为“CISCO”。
metadata.product_name metadata.product_name 该值设置为“CISCO_PRIME”。
metadata.log_type metadata.log_type 该值设置为“CISCO_PRIME”。
network.session_id network.session_id 该值取自 session_id 字段,该字段使用 Grok 模式从原始日志中提取。
principal.application principal.application 该值取自 application_name 字段,该字段使用 Grok 模式从原始日志中提取。
principal.asset.ip principal.asset.ip 该值可以来自以下字段:client_ip_addressdevice_ipip_addressprincipal_iptarget_ip
principal.asset.product_object_id principal.asset.product_object_id 该值取自 oid 字段,该字段使用 Grok 模式从原始日志中提取。
principal.asset_id principal.asset_id 该值可以来自以下字段:device_idid
principal.ip principal.ip 该值可以来自以下字段:client_ip_addressdevice_ipip_addressprincipal_ip
principal.mac principal.mac 该值可以来自以下字段:mac_addresssource_mac
principal.port principal.port 该值取自 principal_port 字段,该字段使用 grok 模式从原始日志中提取并转换为整数。
principal.process.file.full_path principal.process.file.full_path 该值取自 file_path 字段,该字段使用 Grok 模式从原始日志中提取。
principal.resource.name principal.resource.name 该值取自 process_name 字段,该字段使用 Grok 模式从原始日志中提取。
principal.user.userid principal.user.userid 该值取自 user_name 字段,该字段使用 grok 模式或 kv 过滤条件从原始日志中提取。
security_result.action security_result.action 如果 description 包含“fail”,则该值设置为“BLOCK”。
security_result.description security_result.description 该值可以来自以下字段:descdescriptionsec_description
security_result.severity security_result.severity 该值可以来自以下字段:log_levelseverity
security_result.summary security_result.summary 该值取自 summary 字段,该字段使用 Grok 模式从原始日志中提取。
src.hostname src.hostname 该值取自 email 字段,该字段使用 Grok 模式从原始日志中提取。
target.asset.ip target.asset.ip 该值取自 target_ip 字段,该字段使用 Grok 模式从原始日志中提取。
target.ip target.ip 该值取自 target_ip 字段,该字段使用 Grok 模式从原始日志中提取。
target.mac target.mac 该值取自 dest_mac 字段,该字段使用 grok 模式从原始日志中提取并转换为小写。
target.resource.attribute.labels.key target.resource.attribute.labels.key 该值会根据上下文设置为“设备类型”或“设备主机名”。
target.resource.attribute.labels.value target.resource.attribute.labels.value 该值可以来自以下字段:device_typehostname
target.user.userid target.user.userid 该值取自 dst_user 字段,该字段使用 Grok 模式从原始日志中提取。
extensions.auth.mechanism extensions.auth.mechanism 如果存在 dst_userdescription 包含“password”,则该值设置为“USERNAME_PASSWORD”。
extensions.auth.type extensions.auth.type 如果存在 dst_user,则该值设置为“MACHINE”。

需要更多帮助?从社区成员和 Google SecOps 专业人士那里获得解答。