收集 Fortinet FortiAnalyzer 日志

支持的环境:

本指南介绍如何使用 Bindplane 将 Fortinet FortiAnalyzer 日志注入到 Google Security Operations 中。

Fortinet FortiAnalyzer 是一个集中式日志管理、分析和报告平台,适用于 Fortinet Security Fabric 设备。它可以汇总来自 FortiGate 防火墙、FortiMail、FortiWeb、FortiSandbox 和其他 Fortinet 产品的日志,以提供统一的可视性、事件关联和合规性报告。FortiAnalyzer 可以通过 syslog 将汇总的日志转发到外部 SIEM 平台,以进行进一步分析。

准备工作

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

  • Google SecOps 实例。
  • Windows Server 2016 或更高版本,或者具有 systemd 的 Linux 主机。
  • Bindplane 代理与 FortiAnalyzer 设备之间的网络连接。
  • 如果通过代理运行,请确保防火墙端口根据 Bindplane 代理要求处于开放状态。
  • 对 Fortinet FortiAnalyzer 管理控制台的特权访问权限(Super_User 或等效的管理员角色)。

获取 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](https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi)" /quiet
    
  3. 等待安装完成。

  4. 运行以下命令,验证安装是否成功:

    sc query observiq-otel-collector
    

    该服务应显示为正在运行

Linux 安装

  1. 打开具有 rootsudo 权限的终端。
  2. 运行以下命令:

    sudo sh -c "$(curl -fsSlL [https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh](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

找到配置文件

  • Linuxbash sudo nano /opt/observiq-otel-collector/config.yaml
  • Windowscmd notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"

修改配置文件

  • config.yaml 的全部内容替换为以下配置:

    receivers:
      tcplog:
        # Replace the port and IP address as required
        listen_address: "0.0.0.0:514"
    
    exporters:
      chronicle/fortianalyzer:
        compression: gzip
        # Adjust the path to the credentials file you downloaded in Step 1
        creds_file_path: '/etc/bindplane-agent/ingestion-auth.json'
        # Replace with your actual customer ID from Step 2
        customer_id: 'your-customer-id-here'
        endpoint: malachiteingestion-pa.googleapis.com
        log_type: FORTINET_FORTIANALYZER
        raw_log_field: body
        ingestion_labels:
          env: production
    
    service:
      pipelines:
        logs/fortianalyzer_to_chronicle:
          receivers:
            - tcplog
          exporters:
            - chronicle/fortianalyzer
    

配置参数

  • 接收器配置
    • listen_address:要监听的 IP 地址和端口。使用 0.0.0.0 监听所有接口。如果需要,请更改端口(例如 1514)。
  • 导出器配置
    • creds_file_path:注入身份验证文件的完整路径:
      • Linux: /etc/bindplane-agent/ingestion-auth.json
      • Windows: C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:您的 Google SecOps 客户 ID。
    • endpoint:区域端点网址(例如 malachiteingestion-pa.googleapis.com)。
    • ingestion_labels:YAML 格式的可选标签(例如 env: production)。

保存配置文件

修改后,保存该文件:

  • Linux:按 Ctrl+O,然后按 Enter,再按 Ctrl+X
  • Windows:依次点击文件 > 保存

重启 Bindplane 代理以应用更改

如需在 Linux 中重启 Bindplane 代理,请执行以下操作:

  1. 运行以下命令:

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

    sudo systemctl status observiq-otel-collector
    
  3. 检查日志中的错误:

    sudo journalctl -u observiq-otel-collector -f
    

如需在 Windows 中重启 Bindplane 代理,请执行以下操作:

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

    • 以管理员身份运行命令提示符或 PowerShell:
    net stop observiq-otel-collector && net start observiq-otel-collector
    
    • 服务控制台:
      1. Win+R,输入 services.msc,然后按 Enter 键。
      2. 找到 observIQ OpenTelemetry Collector
      3. 右键点击并选择重启
  2. 验证服务是否正在运行:

    sc query observiq-otel-collector
    
  3. 检查日志中的错误:

    type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
    

配置 FortiAnalyzer syslog 转发

将 FortiAnalyzer 配置为使用 syslog 输出将日志转发到 Bindplane 代理。

在 FortiAnalyzer 中配置 syslog 服务器

  1. 登录 FortiAnalyzer 网页界面。
  2. 依次前往系统设置 > 日志转发
  3. 点击创建新规则 以添加新的日志转发规则。
  4. 提供以下配置详细信息:
    • 名称:输入描述性名称(例如 Chronicle-Bindplane)。
    • 状态:选择启用
    • 远程服务器类型:选择Syslog
    • 服务器 IP/FQDN:输入 Bindplane 代理主机的 IP 地址。
    • 服务器端口:输入 514(或在 Bindplane 代理中配置的端口)。
    • 可靠的 syslog (RFC 6587):选择启用以使用 TCP 传输。
    • 日志转发格式:根据您的要求选择默认CEF
  5. 日志过滤条件 部分中,配置要转发的日志类型:
    • 选择要从中转发日志的 ADOM (管理网域)。
    • 选择要包含的设备类型和日志类别(流量、事件、安全、DNS、SSH、SSL 日志)。
  6. 点击 OK 以保存配置。

验证日志转发

  1. 依次前往系统设置 > 日志转发
  2. 验证转发规则是否显示为已启用 状态。
  3. 监控统计信息 列,确认日志正在转发。
  4. 通过检查 Bindplane 代理日志,验证是否收到了日志。

UDM 映射表

日志字段 UDM 映射 逻辑
devname principal.hostname 取自 devname
srcip principal.ip 取自 srcip
srcport principal.port 转换为整数。
srcintf additional.fields 键:srcintf
dstip target.ip 取自 dstip
dstport target.port 转换为整数。
dstintf additional.fields 键:dstintf
proto network.ip_protocol 已映射(6=TCP,17=UDP,1=ICMP)。
action security_result.action accept/passALLOWdeny/drop/blockBLOCK
policyid security_result.rule_id 取自 policyid
policyname security_result.rule_name 取自 policyname
user principal.user.userid 取自 user
app target.application 取自 app
sentbyte network.sent_bytes 转换为无符号整数。
rcvdbyte network.received_bytes 转换为无符号整数。
severity security_result.severity informationINFORMATIONALwarningMEDIUMerrorERRORcritical/alert/emergencyHIGH
logid metadata.product_log_id 取自 logid
type metadata.product_event_type 取自 type
subtype metadata.product_event_type 附加到类型。
level security_result.severity_details 取自 level
不适用 metadata.vendor_name 设置为 Fortinet
不适用 metadata.product_name 设置为 FortiAnalyzer

更新日志

查看此解析器的更新日志

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