收集 Alcatel 交换机日志

解析器版本:1.0

支持的语言:

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

Alcatel-Lucent Enterprise OmniSwitch 是一系列可堆叠的局域网交换机,可提供网络访问、安全政策执行和统一的有线/无线管理。交换机生成涵盖身份验证事件、接口状态变化、VLAN 操作和 CLI 命令的 syslog 消息。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 Alcatel 交换机之间的网络连接
  • 如果在代理后面运行,请确保按照 Bindplane 代理要求打开防火墙端口
  • Alcatel 交换机的特权凭据(管理员访问权限)

获取 Bindplane 代理的 Google SecOps 凭据

如需向 Google SecOps 验证 Bindplane 代理的身份,请选择以下方法之一:

  • 新部署:使用 Chronicle API(选项 1)。
  • 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 API 于 2027 年 7 月 20 日停用。
  1. 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
  2. 前往 IAM 和管理 > 服务账号。
  3. 点击创建服务账号。
  4. 提供以下配置详细信息:
    • 服务账号名称:输入账号的名称(例如 bindplane-ingest)。
    • 服务账号说明:输入说明(例如 Bindplane agent log ingestion)。
  5. 点击创建并继续。
  6. 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
  7. 点击继续,然后点击完成。
  8. 点击您创建的服务账号,然后前往密钥标签页。
  9. 依次点击添加密钥 > 创建新密钥。
  10. 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
  11. 将密钥文件另存为 Bindplane 收集器目录(在 Linux 上为 /opt/observiq-otel-collector/ingestion-auth.json,在 Windows 上为 C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的 ingestion-auth.json,或更新 config.yaml 中的 creds_file_path 以与您保存密钥文件的路径相匹配。
  12. 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。

方法 2:下载数据注入身份验证文件(旧版)

  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
    

    该服务应显示为 RUNNING。

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
    

    该服务应显示为 active (running)。

其他安装资源

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

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

找到配置文件

  • Linux:

    sudo nano /opt/observiq-otel-collector/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/alcatel_switch:
        protocol: https
        # Region of your instance, for example us, europe, asia-southeast1
        location: <LOCATION>
        # Project number of the Google Cloud project linked to the instance
        project: '<PROJECT_NUMBER>'
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: chronicle.googleapis.com
        log_type: ALCATEL_SWITCH
        raw_log_field: body
    
    service:
      pipelines:
        logs/alcatel_to_chronicle:
          receivers:
            - udplog
          exporters:
            - chronicle/alcatel_switch
    

配置参数

替换以下占位符:

  • 接收器配置:

    • listen_address:要监听的 IP 地址和端口:
      • 0.0.0.0 在所有接口上监听(推荐)
      • 端口 514 是标准 syslog 端口(在 Linux 上需要 root 权限;对于非 root 用户,请使用 1514)
  • 导出器配置:

    • creds_file_path:服务账号 JSON 密钥文件的完整路径(选项 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:从 Google SecOps 控制台复制的客户 ID
    • location:将 <LOCATION> 替换为 Google SecOps 实例所在的区域(例如 us、europe 或 asia-southeast1)。导出工具会在此值前面加上 chronicle.googleapis.com。如需查看完整列表,请参阅区域级端点。
    • project:将 <PROJECT_NUMBER> 替换为“IAM 和管理”>“设置”中的项目编号。
    • endpoint:保持设置为 chronicle.googleapis.com。

旧版提取 API

  • 如果您使用选项 2 中的数据注入身份验证文件,请将 exporters 代码块替换为以下内容。将 creds_file_path 设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将 malachiteingestion-pa.googleapis.com 替换为您的区域端点(例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/alcatel_switch:
        compression: gzip
        creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json'
        customer_id: '<customer_id>'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: ALCATEL_SWITCH
        raw_log_field: body
    

保存配置文件

  • 修改后,保存文件:
    • Linux:依次按 Ctrl+O、Enter 和 Ctrl+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"
        

在 Alcatel 交换机上配置 syslog 导出

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

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

    swlog output socket <BINDPLANE_IP>
    
    • 将 <BINDPLANE_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.ipprincipal.asset.ip 从日志消息中提取。
1.1.1.2 target.iptarget.asset.ip 从日志消息中提取。
1.1.2.7 target.iptarget.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.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 8 04:21:22 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 9 20:08:29 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 9 20:51:34 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 11 10:18:30 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 17 02:14:22 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Dec 19 10:27:33 metadata.event_timestamp.secondsmetadata.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.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Feb 16 11:08:45 metadata.event_timestamp.secondsmetadata.event_timestamp.nanos 从 ts 字段解析。
Feb 16 11:08:49 metadata.event_timestamp.secondsmetadata.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.hostnameprincipal.asset.hostname 当 principal_ip 不是 IP 地址时,从日志消息中提取。
IP-HELPER(22) additional.fields.value.string_value 从日志消息中提取并映射为 id_protocol。
Jan 16 02:14:13 metadata.event_timestamp.secondsmetadata.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.hostnameprincipal.asset.hostname 当 principal_ip 不是 IP 地址时,从日志消息中提取。
result: SUCCESS security_result.detection_fields.value 从日志消息中提取并映射为 result。
SES CMD info(5) security_result.summary 提取的 sec_summaryfield 的一部分。
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.hostnametarget.asset.hostname 从日志消息中提取。
trafficType=2, principal.resource.attribute.labels.value 从日志消息中提取并映射为 traffic 类型。
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_protocol 与 ssh 匹配(不区分大小写)时,设置为 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_severity 与 info 匹配(不区分大小写)时,设置为 INFORMATIONAL。

更新日志

查看相应解析器的更新日志

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