收集 Dell 交换机日志

解析器版本:11.0

支持的平台:

本文档介绍了如何使用 Bindplane 代理将 Dell 交换机日志注入到 Google Security Operations。

此解析器可提取 Dell 交换机日志、对时间戳进行标准化处理,并使用 Grok 模式将日志消息结构化为键值对。然后,它会将这些提取的字段映射到统一数据模型 (UDM),处理各种日志格式,并使用资产详细信息和安全严重程度等上下文信息来丰富数据。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Dell 交换机之间的网络连接
  • 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • Dell 交换机的有效连接和管理凭据

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

  1. 登录 Google SecOps 控制台。
  2. 依次前往 SIEM 设置 > 收集代理
  3. 下载数据注入身份验证文件
  4. 将文件安全地保存在将要安装 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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sc query observiq-otel-collector
    

    该服务应显示为 正在运行

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
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sudo systemctl status observiq-otel-collector
    

    该服务应显示为有效(正在运行)

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南

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

找到配置文件

  • Linux

    sudo nano /etc/bindplane-agent/config.yaml
    
  • Windows

    notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"
    

修改配置文件

  • config.yaml 的全部内容替换为以下配置:

    receivers:
        udplog:
            listen_address: "0.0.0.0:514"
    
    exporters:
        chronicle/dell_switch:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.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:提取身份验证文件的完整路径:
      • Linux/etc/bindplane-agent/ingestion-auth.json
      • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • endpoint:区域端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲europe-malachiteingestion-pa.googleapis.com
      • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+OEnterCtrl+X
    • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

  • 如需在 Linux 中重启 Bindplane 代理,请运行以下命令:

    sudo systemctl restart observiq-otel-collector
    
    1. 验证服务是否正在运行:

      sudo systemctl status observiq-otel-collector
      
    2. 检查日志是否存在错误:

      sudo journalctl -u observiq-otel-collector -f
      
  • 如需在 Windows 中重启 Bindplane 代理,请选择以下选项之一:

    • 以管理员身份运行命令提示符或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 服务控制台:

      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry 收集器
      3. 右键点击并选择重新启动
      4. 验证服务是否正在运行:

        sc query observiq-otel-collector
        
      5. 检查日志是否存在错误:

        type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
        

配置 Dell 交换机的 syslog 导出

  1. 使用 SSH 或控制台端口连接到 Dell 交换机。
  2. 使用管理员凭据登录。
  3. 使用以下命令指定 syslog 服务器的 IP 地址或主机名(将 <syslog-server-ip><udp|tcp><syslog-port-number> 替换为实际详细信息):

    logging host <syslog-server-ip> transport <udp|tcp> port <syslog-port-number>
    
  4. 可选:定义要发送到 syslog 服务器的消息的最低严重级别。例如,如需记录信息性消息及更高级别的消息,请执行以下操作:

    logging level informational
    
  5. 运行配置保存到启动配置,以确保更改在重新启动后仍然存在:

    copy running-config startup-config
    
  6. 保存配置:

    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 trap / 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.ipprincipal.ip 解析为 IP 地址,如果它是有效的 IP 且与主机名不同,则用于主账号的 IP 和资产 IP。
application principal.application 直接映射。
asset principal.asset.attribute.labels.value 直接映射到资产标签值,键硬编码为“资产名称”。如果资产字段为空,且消息包含“Dell”,则资产设置为“Dell”。
auid principal.resource.attribute.labels.value 直接映射到 principal.resource.attribute.labels 中键为 auid 的标签。
datetime metadata.event_timestamp 从消息字段中的各种格式解析并转换为时间戳。
dest_ip target.asset.iptarget.ip 映射到目标 IP 和目标资产 IP。
enterpriseId principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 enterpriseId 的标签。
exe sec_result.detection_fields.value 已映射到键为 exe 的检测字段。
File target.file.full_path 直接映射。
grantors principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 grantors 的标签。
host principal.hostnameprincipal.asset.hostnamemetadata.event_type 用作主主机名和资产主机名。如果存在 host,则 metadata.event_type 设置为 STATUS_UPDATE。如果存在主机名但不存在主机,则主机名用作主机。
hostname principal.asset.ipprincipal.iphost 如果它是有效的 IP,则用于主账号 IP 和资产 IP。如果 host 为空,则将其用作 host
ID principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 ID 的标签。
ip principal.asset.ipprincipal.ip 映射到主 IP 和资产 IP。
is_synced sec_result.detection_fields.value 已映射到键为 is_synced 的检测字段。
local target.asset.iptarget.iptarget.port 解析以提取本地 IP 和端口,映射到目标 IP、目标资产 IP 和目标端口。
local_ip target.asset.iptarget.ip local 字段中提取,并映射到目标 IP 和目标资产 IP。
local_port target.port local 字段提取并映射到目标端口。
mac principal.mac 如果它是有效的 MAC 地址,则映射到主 MAC 地址。
msg metadata.description 如果存在,则用作活动说明。还解析了其他字段。
msg1 metadata.description 如果不存在 msg2,则用作事件说明。
msg2 sec_result.descriptionmetadata.event_typeextensions.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.descriptiontarget.urltarget.iptarget.asset.ipsec_result.action_details 已解析为目标网址、IP、操作详细信息,并用作安全结果说明。
Server_ID target.resource.product_object_id 直接映射。
server principal.asset.ipprincipal.ipprincipal.port 经过解析以提取服务器 IP 和端口,映射到主 IP、主资产 IP 和主端口。
server_ip principal.asset.ipprincipal.ip server 字段中提取并映射到主 IP 和主资产 IP。
server_port principal.port server 字段中提取并映射到主端口。
ses network.session_id 直接映射。
severity sec_result.severitymetadata.product_event_type 用于根据特定值确定安全结果严重程度和产品事件类型。
software principal.asset.software 直接映射。
softwareName software.name 直接映射。
Status sec_result.summary 如果不存在 res,则用作安全性结果摘要。
subj principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 subj 的标签。
swVersion software.version 直接映射。
target_host target.hostnametarget.asset.hostname 直接映射到目标主机名和目标资产主机名。
target_ip target.asset.iptarget.ip 直接映射到目标 IP 和目标资产 IP。
target_url target.url 直接映射。
target_user_id target.user.userid 直接映射。
terminal principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 terminal 的标签。
tzknown sec_result.detection_fields.value 已映射到键为 tzknown 的检测字段。
uid principal.resource.attribute.labels.value 映射到 principal.resource.attribute.labels 中键为 uid 的标签。
user principal.user.useridmetadata.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_LOGINUSER_LOGOUTUSER_UNCATEGORIZEDNETWORK_CONNECTIONNETWORK_UNCATEGORIZEDSTATUS_UPDATEGENERIC_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 专业人士的解答。