收集 Fortinet FortiAnalyzer 記錄

剖析器版本:35.0

支援:

本指南說明如何使用 Bindplane,將 Fortinet FortiAnalyzer 記錄擷取至 Google Security Operations。

Fortinet FortiAnalyzer 是 Fortinet Security Fabric 裝置的集中式記錄管理、分析和報告平台。這項服務會匯總 FortiGate 防火牆、FortiMail、FortiWeb、FortiSandbox 和其他 Fortinet 產品的記錄,提供統一的監控、事件關聯和法規遵循報告。FortiAnalyzer 可以透過系統記錄將匯總記錄轉送至外部 SIEM 平台,以供進一步分析。

事前準備

請確認您符合下列必要條件:

  • Google SecOps 執行個體。
  • Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機。
  • Bindplane 代理程式與 FortiAnalyzer 設備之間的網路連線。
  • 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式需求開啟。
  • Fortinet FortiAnalyzer 管理主控台的特殊權限 (Super_User 或同等管理員角色)。

取得 Bindplane 代理程式的 Google SecOps 憑證

如要向 Google SecOps 驗證 Bindplane 代理程式,請選擇下列其中一種方法:

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:繼續使用擷取驗證檔案 (選項 2),直到 Ingestion API 於 2027 年 7 月 20 日停用。
  1. 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
  3. 按一下「建立服務帳戶」。
  4. 提供下列設定詳細資料:
    • 服務帳戶名稱:輸入帳戶名稱 (例如 bindplane-ingest)。
    • 服務帳戶說明:輸入說明 (例如 Bindplane agent log ingestion)。
  5. 點按「Create and continue」(建立並繼續)。
  6. 在「將專案存取權授予這個服務帳戶」部分,按一下「選取角色」,然後選取「Chronicle 編輯者」。
  7. 依序點選「繼續」和「完成」。
  8. 按一下您建立的服務帳戶,然後前往「金鑰」分頁。
  9. 依序點選「新增金鑰」>「建立新的金鑰」。
  10. 選取「JSON」,然後點選「建立」。金鑰檔案會下載到電腦。
  11. 將金鑰檔案儲存為 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,使其與儲存檔案的路徑相符。
  12. 依序前往「IAM 與管理」>「設定」,然後複製「專案編號」。匯出工具設定時會用到。

方法 2:下載擷取驗證檔案 (舊版)

  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
    

    服務應顯示為「RUNNING」。

Linux 安裝

  1. 以 root 或 sudo 權限開啟終端機。
  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
    

服務應顯示為「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:
      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)。
  • Exporter 設定:
    • creds_file_path:服務帳戶 JSON 金鑰檔案的完整路徑 (選項 1):
      • Linux:/opt/observiq-otel-collector/ingestion-auth.json
      • Windows:C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json
    • customer_id:您的 Google SecOps 客戶 ID。
    • location:將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會以這個值做為 chronicle.googleapis.com 的前置字元。如需完整清單,請參閱「區域性端點」。
    • project:依序前往「IAM 與管理」>「設定」,然後將 <PROJECT_NUMBER> 替換為專案編號。
    • endpoint:維持設為 chronicle.googleapis.com。
    • ingestion_labels:YAML 格式的選用標籤 (例如 env: production)。

舊版 Ingestion 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 代理程式,請執行下列指令:

  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 系統記錄轉送

設定 FortiAnalyzer,使用 syslog 輸出將記錄轉送至 Bindplane 代理程式。

在 FortiAnalyzer 中設定 Syslog 伺服器

  1. 登入 FortiAnalyzer 網頁介面。
  2. 依序前往「System Settings」>「Log Forwarding」。
  3. 按一下「Create New」(新建),新增記錄轉送規則。
  4. 請提供下列設定詳細資料:
    • 名稱:輸入描述性名稱 (例如 Chronicle-Bindplane)。
    • 狀態:選取「啟用」。
    • 遠端伺服器類型:選取「Syslog」。
    • 伺服器 IP/FQDN:輸入 Bindplane 代理程式主機的 IP 位址。
    • 伺服器連接埠:輸入 514 (或在 Bindplane 代理程式中設定的連接埠)。
    • 可靠的系統記錄檔 (RFC 6587):選取「啟用」即可使用 TCP 傳輸。
    • 記錄轉送格式:根據需求選取「預設」或「CEF」。
  5. 在「記錄篩選器」部分,設定要轉送的記錄類型:
    • 選取要轉送記錄的 ADOM (管理網域)。
    • 選取要納入的裝置類型和記錄類別 (流量、事件、安全性、DNS、SSH、SSL 記錄)。
  6. 按一下「OK」儲存設定。

驗證記錄轉送

  1. 依序前往「System Settings」>「Log Forwarding」。
  2. 確認轉送規則的狀態為「已啟用」Enabled。
  3. 監控「Statistics」(統計資料) 欄,確認記錄是否已轉送。
  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/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」Fortinet。
不適用 metadata.product_name 設為「FortiAnalyzer」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 專家尋求解答。