收集 Fortinet FortiSandbox 日志

解析器版本:1.0

支持的平台:

本文档介绍了如何使用 Bindplane 代理将 Fortinet FortiSandbox 日志注入到 Google Security Operations。

Fortinet FortiSandbox 是一种高级威胁检测设备,可在沙盒环境中分析可疑文件和网址,以检测零日恶意软件和 APT。它会生成 syslog 格式的日志,其中包含沙盒分析结果、判定、系统状态和行为指标。

准备工作

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

  • Google SecOps 实例
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机
  • Bindplane 代理与 FortiSandbox 设备之间的网络连接
  • 如果在代理后面运行,请确保防火墙端口已根据 Bindplane 代理要求打开
  • 以管理员权限对 FortiSandbox 设备进行特权访问

获取 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 /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/fortisandbox:
            compression: gzip
            creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
            customer_id: '<customer_id>'
            endpoint: malachiteingestion-pa.googleapis.com
            log_type: FORTINET_SANDBOX
            raw_log_field: body
            ingestion_labels:
                env: production
    
    service:
        pipelines:
            logs/fortisandbox_to_chronicle:
                receivers:
                    - udplog
                exporters:
                    - chronicle/fortisandbox
    

配置参数

替换以下占位符:

  • 接收器配置

    • udplog:基于协议的接收器类型:
      • udplog(适用于 UDP syslog)
      • tcplog(适用于 TCP syslog)
    • 0.0.0.0:要监听的 IP 地址:
      • 0.0.0.0 侦听所有接口(推荐)
      • 在某个接口上监听的特定 IP 地址
    • 514:要监听的端口号(例如 51415146514
  • 导出器配置

    • fortisandbox:导出器的描述性名称
    • creds_file_path:提取身份验证文件的完整路径:
      • Linux/etc/bindplane-agent/ingestion-auth.json
      • WindowsC:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • <customer_id>:上一步中的客户 ID
    • endpoint:区域端点网址:
      • 美国malachiteingestion-pa.googleapis.com
      • 欧洲europe-malachiteingestion-pa.googleapis.com
      • 亚洲asia-southeast1-malachiteingestion-pa.googleapis.com
      • 如需查看完整列表,请参阅区域级端点
    • FORTINET_SANDBOX:日志类型,与在 Chronicle 中显示的完全一致
    • ingestion_labels:YAML 格式的可选标签(例如 env: production
  • 流水线配置

    • fortisandbox_to_chronicle:流水线的描述性名称

保存配置文件

  • 修改后,保存文件:
    • 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"
        

配置 Fortinet FortiSandbox syslog 转发

  1. 登录 FortiSandbox 网页界面。
  2. 依次前往日志和报告 > 日志服务器
  3. 点击添加以创建新的日志服务器条目。
  4. 提供以下配置详细信息:
    • 名称:输入一个描述性名称(例如 Chronicle-Bindplane)。
    • IP 地址:输入 Bindplane 代理主机(例如 192.168.1.100)的 IP 地址。
    • 端口:输入 514(必须与 Bindplane 代理接收器端口匹配)。
    • 协议:选择 UDP
  5. 选择要转发的日志类型:
    • 沙盒分析结果
    • 恶意软件判定结果
    • 系统事件
    • 管理操作
  6. 点击确定以保存配置。
  7. 通过检查 Bindplane 代理日志,验证是否正在接收 syslog 消息。

UDM 映射表

日志字段 UDM 映射 逻辑
letype、logver、reason、cpu、mem、disk、pending、cpu_usage、mem_usage、disk_usage、pending_jobs additional.fields 如果非空,则合并为每个字段的标签
msg metadata.description 直接复制值
时间 metadata.event_timestamp 使用 ISO8601 格式转换为时间戳
metadata.event_type 如果消息包含“session timeout”,则设置为“USER_LOGOUT”;否则,如果 has_principal 为“true”且 has_target 为“true”,则设置为“NETWORK_CONNECTION”;否则,如果 has_principal 为“true”,则设置为“STATUS_UPDATE”;否则,设置为“GENERIC_EVENT”
logid metadata.product_log_id 直接复制值
admin principal.administrative_domain 直接复制值
devhost principal.asset.hostname 直接复制值
principal_ip、msg_ip principal.asset.ip 如果 principal_ip 不为空,则为 principal_ip 中的值,否则为 msg_ip
devid principal.asset.product_object_id 直接复制值
devhost principal.hostname 直接复制值
principal_ip、msg_ip principal.ip 如果 principal_ip 不为空,则为 principal_ip 中的值,否则为 msg_ip
操作 security_result.action_details 直接复制值
状态、界面 security_result.detection_fields 如果非空,则合并为来自状态和界面的标签
level security_result.severity 从大写后的级别映射:如果为“CRITICAL”,则为 CRITICAL;如果为“ERROR”,则为 ERROR;如果为“ALERT”或“EMERGENCY”,则为 HIGH;如果为“INFO”或“NOTICE”,则为 INFORMATIONAL;如果为“DEBUG”,则为 LOW;如果为“WARNING”,则为 MEDIUM;否则为 UNKNOWN_SEVERITY
ip target.asset.ip 直接复制值
ip target.ip 直接复制值
用户 target.user.userid 直接复制值

更新日志

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

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