收集 Fortinet FortiDDoS 日志

支持的平台:

本指南介绍了如何使用 Bindplane 代理将 Fortinet FortiDDoS 日志注入到 Google Security Operations。

Fortinet FortiDDoS 是一种 DDoS 攻击缓解设备,可保护网络和应用免遭分布式拒绝服务攻击。FortiDDoS 可针对网络层和应用层攻击提供实时攻击检测、自动缓解措施和详细报告。

准备工作

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

  • Google SecOps 实例。
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机。
  • Bindplane 代理与 Fortinet FortiDDoS 设备之间的网络连接。
  • 如果通过代理运行,请确保防火墙端口已根据 Bindplane 代理要求打开。
  • 对 FortiDDoS 网页界面具有特权访问权限,并对日志和报告设置具有读写权限。

获取 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
    

    该服务应显示为 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
    

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

其他安装资源

如需了解其他安装选项和问题排查信息,请参阅 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/fortiddos:
    compression: gzip
    creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
    customer_id: 'your-customer-id-here'
    endpoint: malachiteingestion-pa.googleapis.com
    log_type: FORTINET_FORTIDDOS
    raw_log_field: body
    ingestion_labels:
        env: production

service:
    pipelines:
    logs/fortiddos_to_chronicle:
        receivers:
        - udplog
        exporters:
        - chronicle/fortiddos

配置参数

替换以下占位符:

接收器配置

  • listen_address:要监听的 IP 地址和端口。使用 0.0.0.0:514 在端口 514 上监听所有接口。

导出器配置

  • 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
    • 如需查看完整列表,请参阅区域级端点
  • log_type:必须为 FORTINET_FORTIDDOS
  • ingestion_labels:YAML 格式的可选标签。

保存配置文件

修改后,保存文件:

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

重启 Bindplane 代理以应用更改

  • Linux

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

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

      sudo journalctl -u observiq-otel-collector -f
      
  • Windows

    请从下列选项中选择一项:

    • 以管理员身份使用命令提示符或 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"
        

配置 FortiDDoS 事件日志远程日志记录

FortiDDoS 支持两种类型的远程 syslog 日志记录:用于记录系统事件的事件日志和用于记录 DDoS 攻击事件的攻击日志。将两者都配置为向 Google SecOps 发送全面的日志。

  1. 登录 FortiDDoS 网页界面。
  2. 依次前往日志和报告> 日志配置 > 事件日志远程
  3. 点击添加以创建新的远程日志服务器配置。
  4. 提供以下配置详细信息:
    • 名称:输入一个描述性名称(例如 Chronicle-Event-Logs)。
    • 地址:输入 Bindplane 代理主机所在的 IP 地址。
    • 端口:输入 514
    • 最低日志级别:选择要转发的最低严重程度级别(例如信息通知)。
    • 设备:选择一个 syslog 设备(例如 local0)。
  5. 点击保存以保存配置。

配置 FortiDDoS 攻击日志远程日志记录

攻击日志远程日志记录功能是按服务保护配置文件 (SPP) 进行配置的。您必须为要监控的每个 SPP 配置攻击日志转发。

  1. 登录 FortiDDoS 网页界面。
  2. 依次前往日志和报告> 日志配置 > 攻击日志远程
  3. 点击添加以创建新的远程日志服务器配置。
  4. 提供以下配置详细信息:
    • 名称:输入一个描述性名称(例如 Chronicle-Attack-Logs)。
    • SPP:选择要配置的服务保护配置文件。
    • 地址:输入 Bindplane 代理主机所在的 IP 地址。
    • 端口:输入 514
    • 间隔:选择报告间隔时间(例如 1 分钟5 分钟)。
  5. 点击保存以保存配置。
  6. 针对要监控的每个 SPP,重复第 3 步到第 5 步。

验证 syslog 转发

配置远程日志记录后,验证日志是否正在发送到 Bindplane 代理:

  1. 在 Bindplane 代理主机上,监控传入的 syslog 流量:

    Linux

    sudo tcpdump -i any -n port 514
    

    Windows

    使用网络监控工具或检查 Bindplane 代理日志。

  2. 在 FortiDDoS 设备上,生成测试日志消息:

    事件日志测试

    • 在 FortiDDoS 网页界面中进行配置更改,以生成事件日志。

    攻击日志测试

    • 等待配置的报告间隔(1 分钟或 5 分钟)。FortiDDoS 会定期生成报告,并额外花费 2 分钟来汇总报告。例如,在 5 分钟标记处报告的日志将在 7 分钟标记处显示在 syslog 服务器上。
  3. 验证日志是否会在 5 到 10 分钟内显示在 Google SecOps 控制台中。

UDM 映射表

日志字段 UDM 映射 逻辑
其他 其他 直接复制值
additional.fields.additional_label.key 设置为“类型”
类型 additional.fields.additional_label.value.string_value 直接复制值
additional.fields.src_label.key 设置为“device_id”
devid additional.fields.src_label.value.string_value 直接复制值
log_id security_result.detection_fields.log_id_label.value 直接复制值
security_result.detection_fields.log_id_label.key 设置为“log_id”
元数据 元数据 直接复制值
desc_Data metadata.description 直接复制值
sip,dip,user metadata.event_type 如果 sip 和 dip 不为空,则设置为“NETWORK_CONNECTION”;如果用户不为空,则设置为“USER_UNCATEGORIZED”;如果 sip 不为空,则设置为“STATUS_UPDATE”;否则设置为“GENERIC_EVENT”
网络 网络 直接复制值
主账号 主账号 直接复制值
sip principal.asset.ip 直接复制值
sip principal.ip 直接复制值
date,time,tz principal.labels.date_label.value 由日期、时间和时区连接而成,中间用空格隔开
principal.labels.date_label.key 设置为“日期”
dir principal.labels.direction_label.value 直接复制值
principal.labels.direction_label.key 设置为“方向”
dport principal.port 转换为整数
用户 principal.user.userid 直接复制值
security_result security_result 直接复制值
方向 security_result.detection_fields.direction_label.value 直接复制值
security_result.detection_fields.direction_label.key 设置为“方向”
dropcount security_result.detection_fields.dropcount_label.value 直接复制值
security_result.detection_fields.dropcount_label.key 设置为“dropcount”
evecode security_result.detection_fields.evecode_label.value 直接复制值
security_result.detection_fields.evecode_label.key 设置为“evecode”
evesubcode security_result.detection_fields.evesubcode_label.value 直接复制值
security_result.detection_fields.evesubcode_label.key 设置为“evesubcode”
facility security_result.detection_fields.facility_label.value 直接复制值
security_result.detection_fields.facility_label.key 设置为“设施”
level security_result.detection_fields.level_label.value 直接复制值
security_result.detection_fields.level_label.key 设置为“level”
msg_id security_result.detection_fields.msg_id_label.value 直接复制值
security_result.detection_fields.msg_id_label.key 设置为“msg_id”
spp_name security_result.detection_fields.spp_name_label.value 直接复制值
security_result.detection_fields.spp_name_label.key 设置为“spp_name”
spp security_result.detection_fields.spp_label.value 直接复制值
security_result.detection_fields.spp_label.key 设置为“spp”
sppoperatingmode security_result.detection_fields.sppoperatingmode_label.value 直接复制值
security_result.detection_fields.sppoperatingmode_label.key 设置为“sppoperatingmode”
subnet_name security_result.detection_fields.subnet_name_label.value 直接复制值
security_result.detection_fields.subnet_name_label.key 设置为“subnet_name”
subnetid security_result.detection_fields.subnetid_label.value 直接复制值
security_result.detection_fields.subnetid_label.key 设置为“subnetid”
子类型 security_result.detection_fields.subtype_label.value 直接复制值
security_result.detection_fields.subtype_label.key 设置为“子类型”
目标 目标 直接复制值
dip target.asset.ip 直接复制值
dip target.ip 直接复制值

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