收集 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 注入身份验证文件
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 收集代理。
- 下载数据注入身份验证文件 。
- 将该文件安全地保存在将安装 Bindplane 的系统上。
获取 Google SecOps 客户 ID
- 登录 Google SecOps 控制台。
- 依次前往 SIEM 设置 > 个人资料 。
- 从组织详细信息 部分复制并保存客户 ID 。
安装 Bindplane 代理
按照以下说明在 Windows 或 Linux 操作系统上安装 Bindplane 代理。
Windows 安装
- 以管理员身份打开命令提示符 或 PowerShell 。
运行以下命令:
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等待安装完成。
运行以下命令,验证安装是否成功:
sc query observiq-otel-collector该服务应显示为正在运行 。
Linux 安装
- 打开具有 root 或 sudo 权限的终端。
运行以下命令:
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等待安装完成。
运行以下命令,验证安装是否成功:
sudo systemctl status observiq-otel-collector
该服务应显示为有效(正在运行) 。
其他安装资源
如需了解其他安装选项和问题排查信息,请参阅 Bindplane 代理安装指南。
将 Bindplane 代理配置为注入 syslog 并发送到 Google SecOps
找到配置文件
- Linux:
bash sudo nano /opt/observiq-otel-collector/config.yaml - Windows:
cmd 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
- Linux:
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 代理,请执行以下操作:
运行以下命令:
sudo systemctl restart observiq-otel-collector验证服务是否正在运行:
sudo systemctl status observiq-otel-collector检查日志中的错误:
sudo journalctl -u observiq-otel-collector -f
如需在 Windows 中重启 Bindplane 代理,请执行以下操作:
请从下列选项中选择一项:
- 以管理员身份运行命令提示符或 PowerShell:
net stop observiq-otel-collector && net start observiq-otel-collector- 服务控制台:
- 按
Win+R,输入services.msc,然后按 Enter 键。 - 找到 observIQ OpenTelemetry Collector 。
- 右键点击并选择重启 。
- 按
验证服务是否正在运行:
sc query observiq-otel-collector检查日志中的错误:
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
配置 FortiAnalyzer syslog 转发
将 FortiAnalyzer 配置为使用 syslog 输出将日志转发到 Bindplane 代理。
在 FortiAnalyzer 中配置 syslog 服务器
- 登录 FortiAnalyzer 网页界面。
- 依次前往系统设置 > 日志转发。
- 点击创建新规则 以添加新的日志转发规则。
- 提供以下配置详细信息:
- 名称:输入描述性名称(例如
Chronicle-Bindplane)。 - 状态:选择启用。
- 远程服务器类型:选择Syslog。
- 服务器 IP/FQDN:输入 Bindplane 代理主机的 IP 地址。
- 服务器端口:输入
514(或在 Bindplane 代理中配置的端口)。 - 可靠的 syslog (RFC 6587):选择启用以使用 TCP 传输。
- 日志转发格式:根据您的要求选择默认或CEF。
- 名称:输入描述性名称(例如
- 在日志过滤条件 部分中,配置要转发的日志类型:
- 选择要从中转发日志的 ADOM (管理网域)。
- 选择要包含的设备类型和日志类别(流量、事件、安全、DNS、SSH、SSL 日志)。
- 点击 OK 以保存配置。
验证日志转发
- 依次前往系统设置 > 日志转发。
- 验证转发规则是否显示为已启用 状态。
- 监控统计信息 列,确认日志正在转发。
- 通过检查 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/pass → ALLOW;deny/drop/block → BLOCK。 |
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 |
information → INFORMATIONAL,warning → MEDIUM,error → ERROR,critical/alert/emergency → HIGH。 |
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 专业人士的解答。