收集 Fortinet FortiManager 記錄
剖析器版本:4.0
本文說明如何使用 Bindplane,將 Fortinet FortiManager 記錄檔擷取至 Google Security Operations。
Fortinet FortiManager 是集中式網路管理平台,可為 Fortinet 安全防護和網路裝置提供統一管理、最佳做法法規遵循和工作流程自動化功能。管理員可透過 FortiManager,集中管理 Security Fabric 中數千個 FortiGate 防火牆和其他 Fortinet 裝置的設定、政策、韌體更新和安全服務。
事前準備
請確認您符合下列必要條件:
- Google SecOps 執行個體。
- Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機。
- Bindplane 代理程式與 Fortinet FortiManager 之間的網路連線。
- 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式需求開啟。
- 具備 Fortinet FortiManager 管理主控台的特殊存取權,且有權修改系統設定。
- FortiManager 5.0.7 以上版本。
取得 Bindplane 代理程式的 Google SecOps 憑證
如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:
- 新部署作業:使用 Chronicle API (選項 1)。
- 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
方法 1:為 Chronicle API 建立服務帳戶 (建議)
- 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
- 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
- 按一下「建立服務帳戶」。
- 請提供下列設定詳細資料:
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
bindplane-ingest)。 - 「服務帳戶說明」:輸入說明 (例如
Bindplane agent log ingestion)。
- 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如
- 點按「Create and continue」(建立並繼續)。
- 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
- 依序點選「繼續」和「完成」。
- 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
- 依序點選「新增金鑰」>「建立新的金鑰」。
- 選取「JSON」,然後按一下「建立」。金鑰檔案會下載到電腦。
- 將金鑰檔案儲存為 Bindplane 收集器目錄中的
ingestion-auth.json(Linux 為/opt/observiq-otel-collector/ingestion-auth.json,Windows 為C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json),或更新config.yaml中的creds_file_path,使其與儲存檔案的路徑相符。 - 依序前往「IAM & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。匯出工具設定時會用到。
方法 2:下載擷取驗證檔案 (舊版)
- 登入 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「收集代理程式」。
- 下載擷取驗證檔案。
- 將檔案安全地儲存在要安裝 Bindplane 代理程式的系統上。
取得 Google SecOps 客戶 ID
- 登入 Google SecOps 控制台。
- 依序前往「SIEM Settings」(SIEM 設定) >「Profile」(設定檔)。
- 複製並儲存「機構詳細資料」部分的客戶 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服務應顯示為「RUNNING」。
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服務應顯示為「active (running)」。
其他安裝資源
如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。
設定 Bindplane 代理,擷取系統記錄檔並傳送至 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: udplog: listen_address: "0.0.0.0:514" exporters: chronicle/fortimanager: 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 creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: 'your-customer-id-here' endpoint: chronicle.googleapis.com log_type: FORTINET_FORTIMANAGER raw_log_field: body ingestion_labels: env: production source: fortimanager service: pipelines: logs/fortimanager_to_chronicle: receivers: - udplog exporters: - chronicle/fortimanager
設定參數
替換下列預留位置:
接收器設定:
listen_address:要接聽的 IP 位址和通訊埠。使用0.0.0.0:514監聽通訊埠 514 上的所有介面。如果通訊埠 514 需要 Linux 的根權限,請使用0.0.0.0:1514,並將 FortiManager 設為傳送至通訊埠 1514。
Exporter 設定:
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:您的客戶 ID (例如a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6)。location:將<LOCATION>替換為 Google SecOps 執行個體的區域 (例如us、europe或asia-southeast1)。匯出工具會在這個值前面加上chronicle.googleapis.com。如需完整清單,請參閱「區域性端點」。project:將<PROJECT_NUMBER>替換為「IAM 與管理」>「設定」中的專案編號。endpoint:維持設為chronicle.googleapis.com。log_type:必須是FORTINET_FORTIMANAGER。ingestion_labels:用於篩選和整理的選用標籤。
舊版 Ingestion API 匯出工具
如果您使用方式 2 的擷取驗證檔案,請將
exporters區塊替換成下列內容。將creds_file_path設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將malachiteingestion-pa.googleapis.com替換為區域端點 (例如europe-malachiteingestion-pa.googleapis.com)。exporters: chronicle/fortimanager: compression: gzip creds_file_path: '/opt/observiq-otel-collector/ingestion-auth.json' customer_id: 'your-customer-id-here' endpoint: malachiteingestion-pa.googleapis.com log_type: FORTINET_FORTIMANAGER raw_log_field: body ingestion_labels: env: production source: fortimanager
儲存設定檔
編輯完畢後,請儲存檔案:
- Linux:依序按下
Ctrl+O、Enter和Ctrl+X鍵。 - Windows:依序點選「檔案」>「儲存」。
如要在 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"
設定 Fortinet FortiManager 系統記錄轉送
FortiManager 系統記錄設定分為兩個步驟:首先在 GUI 中定義系統記錄伺服器,然後透過 CLI 啟用本機記錄轉送。
步驟 1:在 FortiManager GUI 中新增 Syslog 伺服器
- 登入 Fortinet FortiManager 網頁介面。
- 依序前往「系統設定」>「進階」>「系統記錄伺服器」。
- 按一下工具列中的「新建」。
- 設定下列項目:
- 名稱:輸入描述性名稱 (例如
Chronicle-Bindplane)。 - IP 位址 (或 FQDN):輸入 Bindplane 代理程式主機的 IP 位址 (例如
192.168.1.100)。 - Syslog Server Port:輸入
514(如果使用非特權通訊埠,則輸入1514)。 - 可靠連線:維持停用 UDP (預設),或啟用 TCP。
- 安全連線:除非您已設定 TLS 憑證,否則請保持停用狀態。
- 名稱:輸入描述性名稱 (例如
- 按一下「確定」,儲存系統記錄伺服器設定。
步驟 2:透過 CLI 啟用本機記錄轉送功能
- 透過 SSH 或控制台連線至 FortiManager CLI。
執行下列指令 (適用於 FortiManager 5.0.7 以上版本):
config system locallog syslogd setting set syslog-name Chronicle-Bindplane set severity information set status enable end
設定參數:
syslog-name:必須與您在 GUI 中設定的名稱相符。severity:設為information即可擷取所有本機記錄。選項包括:emergency、alert、critical、error、warning、notification、information、debug。status:設為enable即可開始轉送記錄。
驗證設定:
config system locallog syslogd setting show end確認記錄檔是否已傳送:
- Linux:
sudo tcpdump -i any port 514 -A - Windows:使用 Wireshark 擷取通訊埠 514 的流量。
- Linux:
FortiManager 系統記錄行為注意事項
- FortiManager 會傳送本機事件記錄 (系統、設定變更、管理動作),而非受管理 FortiGate 裝置的記錄。
- 根據預設,「可靠連線」為停用狀態 (UDP 通訊埠 514)。如果啟用,記錄檔會使用 TCP 通訊埠 514。
- Syslog 訊息會採用 Fortinet 專屬格式。Google SecOps
FORTINET_FORTIMANAGER剖析器就是為這種格式設計。 - 確認系統時間與 NTP 同步,並設為世界標準時間。(前往「資訊主頁」>「系統資訊」小工具進行編輯)。
UDM 對應表
| 記錄欄位 | UDM 對應 | 邏輯 |
|---|---|---|
type、subtype、pri、operation、performed_on、lograte、msgrate、logratelimit、logratepeak、action、cpuusage、memusage、diskusage、disk2usage、userfrom |
about.resource.attribute.labels |
與資源相關聯的標籤。 |
clearpass-spt、allow-routing、color、comment、fabric-object、name、node-ip-only、obj-type、sdn-addr-type、sub-type、adom、pkgname、_signal-lte-rsrq、_signal-lte-rssi、performed_on_dev、changetype |
additional.fields |
擴充資料的其他欄位。 |
cache_ttl_label |
network.dns.answers |
DNS 應答對應。 |
changes |
metadata.description |
活動的詳細說明。 |
event_type |
metadata.event_type |
事件的類別/類型。 |
log_id |
metadata.product_log_id |
產品專屬 ID。 |
session_id |
network.session_id |
工作階段 ID。 |
adminprof |
principal.administrative_domain |
主體的管理網域。 |
devname |
principal.hostname |
主體的主機名稱。 |
src_ip |
principal.ip |
主體的 IP 位址。 |
device_id |
principal.resource.product_object_id |
資源產品 ID。 |
uuid |
principal.user.userid |
主體的使用者 ID。 |
action_details |
security_result.action |
採取的安全性動作。 |
wildcard、subnet、end-ip、start-ip |
security_result.detection_fields |
用於安全偵測的欄位。 |
msg |
security_result.summary |
安全事件摘要。 |
target_ip、tar_ip、remote_ip |
target.ip |
目標實體的 IP 位址。 |
tar_port、remote_port |
target.port |
目標實體通訊埠。 |
user |
target.user.userid |
目標的使用者 ID。 |
| 不適用 | metadata.vendor_name |
設為 Fortinet。 |
| 不適用 | metadata.product_name |
設為「FortiManager」FortiManager。 |
vd |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
unauthuser |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
unauthusersource |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
level |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
trandisp |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
policyid |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
sentpkt |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
rcvdpkt |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
sentdelta |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
rcvddelta |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
durationdelta |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
sentpktdelta |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
rcvdpktdelta |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
crscore |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
poluuid |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
policytype |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
policyname |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
craction |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
crlevel |
event.idm.read_only_udm.security_result.detection_fields |
從變更記錄對應 |
type |
event.idm.read_only_udm.metadata.product_event_type |
從變更記錄對應 |
subtype |
event.idm.read_only_udm.target.resource.resource_subtype |
從變更記錄對應 |
logid |
event.idm.read_only_udm.metadata.product_log_id |
從變更記錄對應 |
devid |
event.idm.read_only_udm.principal.asset.asset_id |
從變更記錄對應 |
srcip |
event.idm.read_only_udm.src.ip |
從變更記錄對應 |
srcip |
event.idm.read_only_udm.src.asset.ip |
從變更記錄對應 |
src |
event.idm.read_only_udm.src.ip |
從變更記錄對應 |
src |
event.idm.read_only_udm.src.asset.ip |
從變更記錄對應 |
srcname |
event.idm.read_only_udm.src.hostname |
從變更記錄對應 |
srcname |
event.idm.read_only_udm.src.asset.hostname |
從變更記錄對應 |
srcport |
event.idm.read_only_udm.src.port |
從變更記錄對應 |
dst |
event.idm.read_only_udm.target.ip |
從變更記錄對應 |
dst |
event.idm.read_only_udm.target.asset.ip |
從變更記錄對應 |
dstport |
event.idm.read_only_udm.target.port |
從變更記錄對應 |
dstintf |
event.idm.read_only_udm.target.resource.attribute.labels |
從變更記錄對應 |
dstintfrole |
event.idm.read_only_udm.target.resource.attribute.labels |
從變更記錄對應 |
srccountry |
event.idm.read_only_udm.principal.location.country_or_region |
從變更記錄對應 |
dstcountry |
event.idm.read_only_udm.target.location.country_or_region |
從變更記錄對應 |
sessionid |
event.idm.read_only_udm.network.session_id |
從變更記錄對應 |
app_protocol_output |
event.idm.read_only_udm.network.application_protocol |
從變更記錄對應 |
proto |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
view |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
CAT |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
product_id |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
product_name |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
vendor_name |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
qtype |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
action |
event.idm.read_only_udm.security_result.action |
從變更記錄對應 |
action |
event.idm.read_only_udm.security_result.action_details |
從變更記錄對應 |
duration |
event.idm.read_only_udm.network.session_duration.seconds |
從變更記錄對應 |
appcat |
event.idm.read_only_udm.principal.resource.attribute.labels |
從變更記錄對應 |
srchwversion |
event.idm.read_only_udm.src.platform_version |
從變更記錄對應 |
mastersrcmac |
event.idm.read_only_udm.principal.mac |
從變更記錄對應 |
mastersrcmac |
event.idm.read_only_udm.principal.asset.mac |
從變更記錄對應 |
r_value |
event.idm.read_only_udm.intermediary.resource.id |
從變更記錄對應 |
resource_name |
event.idm.read_only_udm.intermediary.resource.name |
從變更記錄對應 |
hostname |
event.idm.read_only_udm.intermediary.hostname |
從變更記錄對應 |
hostname |
event.idm.read_only_udm.intermediary.asset.hostname |
從變更記錄對應 |
ip |
event.idm.read_only_udm.intermediary.ip |
從變更記錄對應 |
ip |
event.idm.read_only_udm.intermediary.asset.ip |
從變更記錄對應 |
process_id |
event.idm.read_only_udm.intermediary.resource.attribute.labels |
從變更記錄對應 |
process |
event.idm.read_only_udm.intermediary.process.command_line |
從變更記錄對應 |
app |
event.idm.read_only_udm.intermediary.application |
從變更記錄對應 |
srcserver |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srcintfrole |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srcswversion |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srchwvendor |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srcfamily |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
spt |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srcintf |
event.idm.read_only_udm.src.resource.attribute.labels |
從變更記錄對應 |
srcmac |
event.idm.read_only_udm.src.mac |
從變更記錄對應 |
srcmac |
event.idm.read_only_udm.src.asset.mac |
從變更記錄對應 |
service |
event.idm.read_only_udm.principal.resource.name |
從變更記錄對應 |
sentbyte |
event.idm.read_only_udm.network.sent_bytes |
從變更記錄對應 |
rcvdbyte |
event.idm.read_only_udm.network.received_bytes |
從變更記錄對應 |
devtype |
event.idm.read_only_udm.principal.resource.attribute.labels |
從變更記錄對應 |
osname |
event.idm.read_only_udm.principal.platform_version |
從變更記錄對應 |
adom |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
pkgname |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
_signal-lte-rsrq |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
_signal-lte-rssi |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
performed_on |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
changes |
event.idm.read_only_udm.additional.fields |
從變更記錄對應 |
變更記錄
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求解答。