收集 Alcatel 交换机日志

支持的平台:

本文档介绍了如何使用 Bindplane 代理将 Alcatel 交换机日志注入到 Google 安全运营中心。解析器会根据不同的日志格式使用一系列 grok 模式提取字段。然后,它会将提取的字段映射到统一数据模型 (UDM) 中的相应字段,并使用供应商和事件类型等元数据丰富数据。

准备工作

  • 确保您拥有 Google SecOps 实例。
  • 确保您使用的是 Windows 2016 或更高版本,或者使用了带有 systemd 的 Linux 主机。
  • 如果在代理后面运行,请确保防火墙端口处于打开状态。
  • 确保您拥有 Alcatel 交换机的特权凭据。

获取 Google SecOps 提取身份验证文件

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

获取 Google SecOps 客户 ID

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

安装 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. 访问配置文件:

    1. 找到 config.yaml 文件。通常,在 Linux 上,该目录位于 /etc/bindplane-agent/ 目录中;在 Windows 上,该目录位于安装目录中。
    2. 使用文本编辑器(例如 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: '/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: ALCATEL_SWITCH
                raw_log_field: body
    
    service:
        pipelines:
            logs/source0__chronicle_w_labels-0:
                receivers:
                    - udplog
                exporters:
                    - chronicle/chronicle_w_labels
    
  3. 根据基础架构中的需要替换端口和 IP 地址。

  4. <customer_id> 替换为实际的客户 ID。

  5. 获取 Google SecOps 提取身份验证文件部分中,将 /path/to/ingestion-authentication-file.json 更新为身份验证文件的保存路径。

重启 Bindplane 代理以应用更改

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

    sudo systemctl restart bindplane-agent
    
  • 如需在 Windows 中重启 Bindplane 代理,您可以使用服务控制台,也可以输入以下命令:

    net stop BindPlaneAgent && net start BindPlaneAgent
    

配置 Alcatel 交换机 Syslog 导出

  1. 使用 SSH 或控制台电缆连接到交换机。
  2. 使用管理员凭据登录。
  3. 进入全局配置模式:

    enable
    configure terminal
    
  4. 设置 BindPlane(syslog)服务器 IP 地址:

    swlog output socket <syslog-server-ip>
    
    • <syslog-server-ip> 替换为 Bindplane 代理 IP 地址。
  5. 启用对 syslog 服务器的日志记录:

    swlog remote enable
    
  6. 配置日志记录级别:

    swlog console level info
    
  7. 启用命令日志记录:

    command-log enable
    
  8. 将对启动配置所做的更改保存下来:

    write memory
    

UDM 映射表

日志字段 UDM 映射 逻辑
1.1.1.1 principal.ip
principal.asset.ip
从日志消息中提取。
1.1.1.2 target.ip
target.asset.ip
从日志消息中提取。
1.1.2.7 target.ip
target.asset.ip
从日志消息中提取。
1035 target.port 从日志消息中提取。
2266 additional.fields.value.string_value 从日志消息中提取,并映射为 vlan
3036 principal.port 从日志消息中提取。
59300 target.port 从日志消息中提取。
60588 target.port 从日志消息中提取。
997 principal.resource.attribute.labels.value 从日志消息中提取,并映射为 limit
A6450-L2-K4B-01 principal.application 从日志消息中提取。
A6450-L2-X1B-02-01 principal.application 从日志消息中提取。
A6450-L2-X2A-01-01 principal.application 从日志消息中提取。
A6450-L2-X4B-02-01 principal.application 从日志消息中提取。
A6900-L3-LTX0A principal.application 从日志消息中提取。
Accepted keyboard-interactive/pam security_result.summary 提取的 sec_summary 字段的一部分。
b8:53:ac:6e:c9:bc principal.mac 从日志消息中提取。
BRIDGE(10) additional.fields.value.string_value 从日志消息中提取,并映射为 id_protocol
CLI log, security_result.summary 提取的 sec_summary 字段的一部分。
cmd: show configuration snapshot all, security_result.detection_fields.value 从日志消息中提取,并映射为 cmd
Connection reset by 1.1.2.7 port 60505 security_result.summary 从日志消息中提取。
Dec 7 14:28:40 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 8 04:21:22 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 9 20:08:29 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 9 20:51:34 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 11 10:18:30 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 17 02:14:22 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Dec 19 10:27:33 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Did not receive identification string from 1.1.2.7 port 60588 security_result.summary 从日志消息中提取。
esmSetRateLimit: Txing additional.fields.value.string_value 从日志消息中提取,并映射为 esm_set_rate_limit
Feb 15 16:29:29 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Feb 16 11:08:45 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
Feb 16 11:08:49 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
flashManager FlashMgr Main info(5) flashMgrValidateImage_exec: valid security_result.summary 从日志消息中提取。
for ncmadmin from 1.1.1.2 port 59300 ssh2 security_result.summary 提取的 sec_summary 字段的一部分。
from port 3036 to port 1035 security_result.summary 提取的 sec_summary 字段的一部分。
IVDELCSW03 principal.hostname
principal.asset.hostname
principal_ip 不是 IP 地址时,从日志消息中提取。
IP-HELPER(22) additional.fields.value.string_value 从日志消息中提取,并映射为 id_protocol
Jan 16 02:14:13 metadata.event_timestamp.seconds
metadata.event_timestamp.nanos
ts 字段解析。
LLDP(42) additional.fields.value.string_value 从日志消息中提取,并映射为 id_protocol
limit=997, principal.resource.attribute.labels.value 从日志消息中提取,并映射为 limit
limitType=1 principal.resource.attribute.labels.value 从日志消息中提取,并映射为 limitType
lldpProcessLocationIdTLV: Error, LLDP-MED Civic Address LCI len 39 invalid, tlvL security_result.summary 从日志消息中提取。
Mac Movement for MacAddr: a0:29:19:c0:55:18 security_result.summary 从日志消息中提取。
MacAddr: a0:29:19:c0:55:18 principal.mac 从日志消息中提取。
ncmadmin principal.user.userid 从日志消息中提取。
OS6360 principal.hostname
principal.asset.hostname
principal_ip 不是 IP 地址时,从日志消息中提取。
result: SUCCESS security_result.detection_fields.value 从日志消息中提取,并映射为 result
SES CMD info(5) security_result.summary 提取的 sec_summary 字段的一部分。
STACK-MANAGER principal.application 从日志消息中提取。
Stack Port A MAC Frames TX/RX Enabled security_result.summary 从日志消息中提取。
STP(11) additional.fields.value.string_value 从日志消息中提取,并映射为 id_protocol
SWCONSOLE-L2-K0A-01 target.hostname
target.asset.hostname
从日志消息中提取。
trafficType=2, principal.resource.attribute.labels.value 从日志消息中提取,并映射为 trafficType
user: ncmadmin security_result.summary 提取的 sec_summary 字段的一部分。
zslot=0, principal.resource.attribute.labels.value 从日志消息中提取,并映射为 zslot
- additional.fields.key 硬编码值:id_protocol
- additional.fields.key 硬编码值:esm_set_rate_limit
- additional.fields.key 硬编码值:vlan
- metadata.event_type 如果没有匹配到任何其他类型,请将其设置为 GENERIC_EVENT
- metadata.product_name 硬编码值:Alcatel Switch
- metadata.vendor_name 硬编码值:ALCATEL SWITCH
- network.application_protocol id_protocolssh 匹配时设置为 SSH(不区分大小写)。
- principal.resource.attribute.labels.key 硬编码值:limit
- principal.resource.attribute.labels.key 硬编码值:trafficType
- principal.resource.attribute.labels.key 硬编码值:limitType
- principal.resource.attribute.labels.key 硬编码值:zslot
- security_result.detection_fields.key 硬编码值:cmd
- security_result.detection_fields.key 硬编码值:result
- security_result.severity prod_severityinfo 匹配时设置为 INFORMATIONAL(不区分大小写)。

变化

2024-03-11

增强功能

  • 添加了新的 Grok 模式,用于解析新格式的 syslog 日志。
  • severity 映射到 security_result.severitysecurity_result.detection_fields
  • 如果 id_protocol 几乎等于 ssh,请将 network.application_protocol 设置为 SSH
  • 添加了新的 Grok 模式来解析新格式的 sec_summary

2024-01-16

  • 新创建的解析器。

需要更多帮助?向社区成员和 Google SecOps 专业人士寻求解答。