收集 Digi 调制解调器日志

支持的语言:

本文档介绍了如何使用 Bindplane 将 Digi 调制解调器日志注入到 Google Security Operations。解析器代码首先使用 grok 模式从 DIGI_MODEMS syslog 消息中提取时间戳、主机名、产品类型和日志内容等字段。然后,它会进一步分析内容,以识别登录尝试(成功或失败),提取用户、IP 地址、端口和协议等详细信息,最终将这些提取的字段映射到统一数据模型 (UDM) 架构中以进行安全分析。

准备工作

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

  • Google SecOps 实例
  • Windows 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • 如果在代理后运行,防火墙端口处于开放状态
  • 对 Digi Remote Manager 或本地 Digi 调制解调器 Web 界面拥有特权访问权限

获取 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: 'DIGI_MODEMS'
            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 代理以应用更改

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

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

    net stop BindPlaneAgent && net start BindPlaneAgent
    

在 Digi 调制解调器上配置 Syslog 服务器

  1. 登录 Digi Remote Manager 或本地 Digi 调制解调器网页界面。
  2. 使用远程管理器访问设备配置:
    • 找到要为其配置 Syslog 的设备。
    • 依次点击设备 ID >“设置”>“配置”
  3. 通过 Digi 调制解调器本地 Web 界面访问设备配置:
    • 依次点击系统 > 配置 > 设备配置
  4. 依次前往系统 > 日志
  5. 点击即可展开服务器列表
  6. 点击添加服务器 +
  7. 提供以下配置详细信息:
    • 服务器:输入 Bindplane 代理 IP 地址。
    • 选择将发送到服务器的事件类别(默认情况下,所有事件类别均处于启用状态)。
    • Syslog 出站流量端口:输入 Bindplane 代理端口号(默认值为 514)。
    • 协议:选择 UDP
  8. 点击应用

UDM 映射表

日志字段 UDM 映射 逻辑
内容 security_result.description 在初始 grok 解析后直接从 content 字段映射。
http_method network.http.method 使用 Grok 模式从 content 字段中提取。
http_version network.application_protocol_version 使用 Grok 模式从 content 字段中提取。
主机名 principal.hostname 使用 Grok 模式从日志消息中提取。
ip target.ip 使用 Grok 模式从 content 字段中提取。
端口 target.port 使用 Grok 模式从 content 字段中提取并转换为整数。
proto network.application_protocol 使用 Grok 模式从 content 字段中提取。
ts metadata.event_timestamp 使用 Grok 模式从日志消息中提取并转换为时间戳。
类型 login_type_label.value 使用 Grok 模式从 content 字段中提取。
extensions.auth.type 由解析器逻辑设置为 MACHINE
login_type_label.key 由解析器逻辑设置为 Login type
metadata.event_type 由是否存在 ipuser 等特定字段决定,并相应地设置为 NETWORK_CONNECTIONUSER_LOGIN
metadata.log_type 由解析器逻辑设置为 DIGI_MODEMS
metadata.product_event_type 从日志消息的 product_type 字段中提取。
metadata.product_name 由解析器逻辑设置为 DIGI_MODEMS
metadata.vendor_name 由解析器逻辑设置为 DIGI_MODEMS
security_result.action 由消息中是否存在 Login OKLogin failure 决定,并分别设置为 ALLOWBLOCK
用户 target.user.userid 使用 Grok 模式从 content 字段中提取。

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