收集 Fortinet FortiAnalyzer 日志
解析器版本:35.0
本指南介绍了如何使用 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 或同等管理员角色)。
获取 Bindplane 代理的 Google SecOps 凭证
如需向 Google SecOps 验证 Bindplane 代理,请选择以下方法之一:
- 新部署:使用 Chronicle API(选项 1)。
- 旧版部署:继续使用提取身份验证文件(方法 2),直到提取 API 于 2027 年 7 月 20 日停用。
方法 1:为 Chronicle API 创建服务账号(推荐)
- 登录 Google Cloud 控制台,然后选择与您的 Google SecOps 实例关联的 Google Cloud 项目。
- 前往 IAM 和管理 > 服务账号。
- 点击创建服务账号。
- 提供以下配置详细信息:
- 服务账号名称:输入账号的名称(例如
bindplane-ingest)。 - 服务账号说明:输入说明(例如
Bindplane agent log ingestion)。
- 服务账号名称:输入账号的名称(例如
- 点击创建并继续。
- 在向此服务账号授予对项目的访问权限部分,点击选择角色,然后选择 Chronicle Editor。
- 点击继续,然后点击完成。
- 点击您创建的服务账号,然后前往密钥标签页。
- 依次点击添加密钥 > 创建新密钥。
- 选择 JSON,然后点击创建。密钥文件会下载到您的计算机上。
- 将密钥文件另存为 Bindplane 收集器目录(在 Linux 上为
/opt/observiq-otel-collector/ingestion-auth.json,在 Windows 上为C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)中的ingestion-auth.json,或更新config.yaml中的creds_file_path以与您保存密钥文件的路径相匹配。 - 前往 IAM 和管理 > 设置,然后复制项目编号。您在配置导出器时需要用到该名称。
方法 2:下载数据注入身份验证文件(旧版)
- 登录 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: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' # Replace with your actual customer ID from Step 2 customer_id: 'your-customer-id-here' endpoint: chronicle.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:服务账号 JSON 密钥文件的完整路径(选项 1):- Linux:
/opt/observiq-otel-collector/ingestion-auth.json - Windows:
C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
- Linux:
customer_id:您的 Google SecOps 客户 ID。location:将<LOCATION>替换为 Google SecOps 实例所在的区域(例如us、europe或asia-southeast1)。导出工具会在此值前面加上chronicle.googleapis.com。如需查看完整列表,请参阅区域级端点。project:将<PROJECT_NUMBER>替换为“IAM 和管理”>“设置”中的项目编号。endpoint:保持设置为chronicle.googleapis.com。ingestion_labels:采用 YAML 格式的可选标签(例如env: production)。
旧版提取 API 导出工具
如果您使用选项 2 中的数据注入身份验证文件,请将
exporters代码块替换为以下内容。将creds_file_path设置为数据注入身份验证文件的路径,如果您的实例位于美国境外,请将malachiteingestion-pa.googleapis.com替换为您的区域端点(例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/fortianalyzer: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/opt/observiq-otel-collector/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
保存配置文件
修改后,保存文件:
- 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 收集器。
- 右键点击,然后选择重新启动。
- 按
验证服务是否正在运行:
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 代理中配置的端口)。 - Reliable syslog (RFC 6587)(可靠的 syslog [RFC 6587]):选择启用以使用 TCP 传输。
- 日志转发格式:根据您的要求选择默认或 CEF。
- 名称:输入一个描述性名称(例如
- 在日志过滤条件部分中,配置要转发的日志类型:
- 选择要从中转发日志的 ADOM(管理网域)。
- 选择要包含的设备类型和日志类别(流量、事件、安全、DNS、SSH、SSL 日志)。
- 点击确定以保存配置。
验证日志转发
- 前往系统设置 > 日志转发。
- 验证转发规则的状态是否显示为已启用。
- 监控统计信息列,确认日志正在转发。
- 通过检查 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 → 允许;deny/drop/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。 |
attack |
event.idm.read_only_udm.security_result.description |
从更新日志映射 |
msg |
event.idm.read_only_udm.security_result.category_details |
从更新日志映射 |
alert_sub_type |
event.idm.read_only_udm.security_result.category_details |
从更新日志映射 |
Details.SourcePort |
event.idm.read_only_udm.principal.port |
从更新日志映射 |
Details.DestinationPort |
event.idm.read_only_udm.target.port |
从更新日志映射 |
inter_host |
event.idm.read_only_udm.intermediary.hostname |
从更新日志映射 |
observer_application |
event.idm.read_only_udm.observer.application |
从更新日志映射 |
event_time |
event.idm.read_only_udm.metadata.event_timestamp |
从更新日志映射 |
alert_time |
event.idm.read_only_udm.metadata.collected_timestamp |
从更新日志映射 |
details.Bios |
event.idm.read_only_udm.principal.asset.product_object_id |
从更新日志映射 |
details.HostName |
event.idm.read_only_udm.principal.hostname和event.idm.read_only_udm.principal.asset.hostname之间 |
从更新日志映射 |
details.IP |
event.idm.read_only_udm.principal.nat_ip |
从更新日志映射 |
agent_uuid |
event.idm.read_only_udm.principal.asset.asset_id |
从更新日志映射 |
alert_name |
event.idm.read_only_udm.security_result.rule_name |
从更新日志映射 |
Details.SourceAddress |
event.idm.read_only_udm.principal.ip和event.idm.read_only_udm.principal.asset.ip之间 |
从更新日志映射 |
Details.DestinationAddress |
event.idm.read_only_udm.target.ip和event.idm.read_only_udm.target.asset.ip之间 |
从更新日志映射 |
Details.Protocol |
event.idm.read_only_udm.network.ip_protocol |
从更新日志映射 |
ref |
event.idm.read_only_udm.security_result.about.url |
从更新日志映射 |
Details.status |
event.idm.read_only_udm.security_result.summary |
从更新日志映射 |
log_verbosity |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
root_scope_id |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
timestamp_details |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
observer_application_pid |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
Details.ConsumerScopes |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
Details.ProviderScopes |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
user_dst_location |
event.idm.read_only_udm.target.resource.attribute.labels |
从更新日志映射 |
user_dst_network_zone |
event.idm.read_only_udm.target.resource.attribute.labels |
从更新日志映射 |
user_dst_ownership |
event.idm.read_only_udm.target.resource.attribute.labels |
从更新日志映射 |
host_name |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
forwardedfor |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
tenant_id |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
details.AgentType |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
details.CurrentVersion |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
details.Platform |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
scope_name |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
scope_id |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
vrf_id |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
Details.user_src_app_name |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
Details.user_src_environment |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
Details.user_src_location |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
Details.user_src_network_zone |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
Details.user_src_ownership |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
severity |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
alert_text |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
attackid |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
key_id |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
individual_alert |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
summary_alert_freq |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
alert_grain |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
IsConsumerMalicious |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
IsProviderMalicious |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
from |
event.idm.read_only_udm.network.email.from |
从更新日志映射 |
to |
event.idm.read_only_udm.network.email.to |
从更新日志映射 |
subject |
event.idm.read_only_udm.network.email.subject |
从更新日志映射 |
size |
event.idm.read_only_udm.network.sent_bytes |
从更新日志映射 |
attachment |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
qtype |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
xid |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
action |
当 action 等于 ip-conn 时,event.idm.read_only_udm.security_result.action 为 ALLOW |
从更新日志映射 |
unauthuser |
event.idm.read_only_udm.principal.user.userid |
从更新日志映射 |
user_name |
event.idm.read_only_udm.principal.user.userid |
从更新日志映射 |
app_protocol_src |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
cloudaction |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
itime |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
shapingpolicyname |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
mastersrcmac |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
dstdevtype |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
eventsubtype |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
pdstport |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
psrcport |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
clouduser |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
unauthusersource |
event.idm.read_only_udm.additional.fields |
从更新日志映射 |
devid |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
incidentserialno |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
poluuid |
event.idm.read_only_udm.security_result.detection_fields |
从更新日志映射 |
http_retcode |
event.idm.read_only_udm.network.http.response_code |
从更新日志映射 |
http_method |
event.idm.read_only_udm.network.http.method |
从更新日志映射 |
http_url |
event.idm.read_only_udm.target.url |
从更新日志映射 |
http_agent |
event.idm.read_only_udm.network.http.user_agent |
从更新日志映射 |
srcfamily |
event.idm.read_only_udm.principal.resource.attribute.labels |
从更新日志映射 |
cipher_suite |
event.idm.read_only_udm.network.tls.cipher |
从更新日志映射 |
policy |
event.idm.read_only_udm.security_result.rule_name |
从更新日志映射 |
http_response_bytes |
event.idm.read_only_udm.network.received_bytes |
从更新日志映射 |
http_request_bytes |
event.idm.read_only_udm.network.sent_bytes |
从更新日志映射 |
osname |
event.idm.read_only_udm.principal.platform |
从更新日志映射 |
dstosname |
event.idm.read_only_udm.target.platform |
从更新日志映射 |
scertcname |
event.idm.read_only_udm.network.tls.client.certificate.subject |
从更新日志映射 |
dstswversion |
event.idm.read_only_udm.target.platform_version |
从更新日志映射 |
dsthwvendor |
event.idm.read_only_udm.target.resource.attribute.labels |
从更新日志映射 |
filesize |
event.idm.read_only_udm.target.file.size |
从更新日志映射 |
http_version |
event.idm.read_only_udm.network.application_protocol_version |
从更新日志映射 |
x509_cert_subject |
event.idm.read_only_udm.network.tls.server.certificate.subject |
从更新日志映射 |
srcswversion |
event.idm.read_only_udm.principal.platform_version |
从更新日志映射 |
tlsver |
event.idm.read_only_udm.network.tls.version |
从更新日志映射 |
original_src |
event.idm.read_only_udm.principal.ip |
从更新日志映射 |
http_host |
event.idm.read_only_udm.target.hostname |
从更新日志映射 |
http_refer |
event.idm.read_only_udm.network.http.referral_url |
从更新日志映射 |
agent |
event.idm.read_only_udm.network.http.user_agent和event.idm.read_only_udm.network.http.parsed_user_agent之间 |
从更新日志映射 |
dstname |
target.hostname |
从更新日志映射 |
catdesc |
security_result.rule_name |
从更新日志映射 |
crscore |
security_result.detection_fields |
从更新日志映射 |
method |
network.http.method |
从更新日志映射 |
filename |
target.file.full_path |
从更新日志映射 |
dstuser |
target.user.userid |
从更新日志映射 |
fsaverdict |
additional.fields |
从更新日志映射 |
type", "subtype", and "level |
metadata.ingestion_labels |
从更新日志映射 |
logdesc |
metadata.description |
从更新日志映射 |
srcname |
principal.hostname |
从更新日志映射 |
httpmethod |
network.http.method |
从更新日志映射 |
更新日志
需要更多帮助?获得社区成员和 Google SecOps 专业人士的解答。