收集 Fortinet FortiDDoS 記錄

剖析器版本:1.0

支援:

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

Fortinet FortiDDoS 是 DDoS 攻擊緩解設備,可保護網路和應用程式,防範分散式阻斷服務攻擊。FortiDDoS 可即時偵測攻擊、自動緩解攻擊,並針對網路和應用程式層攻擊提供詳細報表。

事前準備

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

  • Google SecOps 執行個體。
  • Windows Server 2016 以上版本,或搭載 systemd 的 Linux 主機。
  • Bindplane 代理程式與 Fortinet FortiDDoS 設備之間的網路連線。
  • 如果是在 Proxy 後方執行,請確認防火牆通訊埠已按照 Bindplane 代理程式需求開啟。
  • 具備 FortiDDoS 網頁介面的特殊權限,以及記錄和報表設定的讀寫權限。

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

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

  • 新部署作業:使用 Chronicle API (選項 1)。
  • 舊版部署作業:在 2027 年 7 月 20 日停用 Ingestion API 前,請繼續使用擷取驗證檔案 (選項 2)。
  1. 登入 Google Cloud 控制台,然後選取連結至 Google SecOps 執行個體的 Google Cloud 專案。
  2. 依序前往 「IAM & Admin」(IAM 與管理) >「Service Accounts」(服務帳戶)。
  3. 按一下「建立服務帳戶」。
  4. 提供下列設定詳細資料:
    • 「Service account name」(服務帳戶名稱):輸入帳戶名稱 (例如 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 & Admin」(IAM 與管理) >「Settings」(設定),然後複製「Project number」(專案編號)。設定匯出工具時會用到。

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

  1. 登入 Google SecOps 控制台。
  2. 依序前往「SIEM Settings」 > 「Collection Agents」。
  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" /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)" install_unix.sh
    
  3. 等待安裝完成。

  4. 執行下列指令,確認安裝成功:

    sudo systemctl status observiq-otel-collector
    

    服務應顯示為「active (running)」。

其他安裝資源

如需其他安裝選項和疑難排解資訊,請參閱 Bindplane 代理程式安裝指南。

設定 Bindplane 代理程式,擷取系統記錄檔並傳送至 Google SecOps

找出設定檔

Linux:

sudo nano /opt/observiq-otel-collector/config.yaml

Windows:

notepad "C:\Program Files\observIQ OpenTelemetry Collector\config.yaml"

編輯設定檔

將 config.yaml 的全部內容替換為下列設定:

receivers:
  udplog:
    listen_address: "0.0.0.0:514"

exporters:
  chronicle/fortiddos:
    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_FORTIDDOS
    raw_log_field: body
    ingestion_labels:
      env: production

service:
  pipelines:
    logs/fortiddos_to_chronicle:
      receivers:
        - udplog
      exporters:
        - chronicle/fortiddos

設定參數

替換下列預留位置:

接收器設定:

  • listen_address:要監聽的 IP 位址和通訊埠。使用 0.0.0.0:514 監聽通訊埠 514 上的所有介面。

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:上一步取得的客戶 ID。
  • location:將 <LOCATION> 替換為 Google SecOps 執行個體的區域 (例如 us、europe 或 asia-southeast1)。匯出工具會在這個值前面加上 chronicle.googleapis.com。如需完整清單,請參閱「區域性端點」。
  • project:將 <PROJECT_NUMBER> 替換為「IAM 與管理」>「設定」中的專案編號。
  • endpoint:請將此值設為 chronicle.googleapis.com。
  • log_type:必須是 FORTINET_FORTIDDOS。
  • ingestion_labels:YAML 格式的選用標籤。

舊版 Ingestion API 匯出工具

  • 如果您使用方式 2 的擷取驗證檔案,請將 exporters 區塊替換成下列內容。將 creds_file_path 設為擷取驗證檔案的路徑。如果執行個體位於美國境外,請將 malachiteingestion-pa.googleapis.com 替換為區域端點 (例如 europe-malachiteingestion-pa.googleapis.com)。

    exporters:
      chronicle/fortiddos:
        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_FORTIDDOS
        raw_log_field: body
        ingestion_labels:
          env: production
    

儲存設定檔

編輯完畢後,請儲存檔案:

  • Linux:依序按下 Ctrl+O、Enter 和 Ctrl+X
  • Windows:依序點選「檔案」 > 「儲存」

重新啟動 Bindplane 代理程式,套用變更

  • Linux

    sudo systemctl restart observiq-otel-collector
    
    1. 確認服務正在執行:

      sudo systemctl status observiq-otel-collector
      
    2. 查看記錄檔是否有錯誤:

      sudo journalctl -u observiq-otel-collector -f
      
  • Windows

    選擇下列任一選項:

    • 以管理員身分使用命令提示字元或 PowerShell:

      net stop observiq-otel-collector && net start observiq-otel-collector
      
    • 使用「服務」控制台:

      1. 按下 Win+R 鍵,輸入 services.msc,然後按下 Enter 鍵。
      2. 找出「observIQ OpenTelemetry Collector」。
      3. 按一下滑鼠右鍵,然後選取「重新啟動」。

      4. 確認服務是否正在執行:

        sc query observiq-otel-collector
        
      5. 檢查記錄是否有錯誤:

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

設定 FortiDDoS 事件記錄遠端記錄功能

FortiDDoS 支援兩種遠端系統記錄:系統事件的事件記錄,以及 DDoS 攻擊事件的攻擊記錄。請一併設定這兩項,將完整的記錄檔傳送至 Google SecOps。

  1. 登入 FortiDDoS 網頁介面。
  2. 依序前往 「Log & Report」 > 「Log Configuration」 > 「Event Log Remote」。
  3. 按一下「新增」,建立新的遠端記錄伺服器設定。
  4. 提供下列設定詳細資料:
    • 名稱:輸入描述性名稱 (例如 Chronicle-Event-Logs)。
    • 地址:輸入 Bindplane 代理程式主機的 IP 位址。
    • 通訊埠:輸入 514。
    • 最低記錄層級:選取要轉送的最低嚴重性等級 (例如「資訊」或「通知」)。
    • Facility:選取 Syslog 設施 (例如 local0)。
  5. 按一下「儲存」儲存設定。

設定 FortiDDoS 攻擊記錄遠端記錄功能

攻擊記錄遠端記錄功能是依據服務保護設定檔 (SPP) 設定。您必須為要監控的每個 SPP 設定攻擊記錄轉送功能。

  1. 登入 FortiDDoS 網頁介面。
  2. 依序前往「記錄與報告」>「記錄設定」>「攻擊記錄遠端」。
  3. 按一下「新增」,建立新的遠端記錄伺服器設定。
  4. 提供下列設定詳細資料:
    • 名稱:輸入描述性名稱 (例如 Chronicle-Attack-Logs)。
    • SPP:選取要設定的服務保護設定檔。
    • Address:輸入 Bindplane 代理程式主機的 IP 位址。
    • 通訊埠:輸入 514。
    • 間隔:選取報表間隔 (例如「1 分鐘」或「5 分鐘」)。
  5. 按一下「儲存」,儲存設定。
  6. 針對要監控的每個 SPP,重複執行步驟 3 到 5。

驗證系統記錄檔轉送

設定遠端記錄後,請確認記錄是否已傳送至 Bindplane 代理程式:

  1. 在 Bindplane 代理程式主機上,監控傳入的 syslog 流量:

    Linux:

    sudo tcpdump -i any -n port 514
    

    Windows:

    使用網路監控工具,或查看 Bindplane 代理程式記錄。

  2. 在 FortiDDoS 設備上,產生測試記錄訊息:

    事件記錄測試:

    • 在 FortiDDoS 網頁介面中進行設定變更,產生事件記錄。

    攻擊記錄測試:

    • 等待設定的報表間隔 (1 或 5 分鐘)。FortiDDoS 會定期回報,並需要額外 2 分鐘來匯總報表。舉例來說,如果記錄是在第 5 分鐘回報,系統記錄伺服器會在第 7 分鐘顯示該記錄。
  3. 確認記錄在 5 到 10 分鐘內顯示於 Google SecOps 控制台。

UDM 對應表

記錄欄位 UDM 對應 邏輯
額外 額外 直接複製值
additional.fields.additional_label.key 設為「type」
類型 additional.fields.additional_label.value.string_value 直接複製值
additional.fields.src_label.key 設為「device_id」
devid additional.fields.src_label.value.string_value 直接複製值
log_id security_result.detection_fields.log_id_label.value 直接複製值
security_result.detection_fields.log_id_label.key 設為「log_id」
中繼資料 中繼資料 直接複製值
desc_Data metadata.description 直接複製值
sip,dip,user metadata.event_type 如果 sip 和 dip 不為空白,則設為「NETWORK_CONNECTION」;如果使用者不為空白,則設為「USER_UNCATEGORIZED」;如果 sip 不為空白,則設為「STATUS_UPDATE」;否則設為「GENERIC_EVENT」
網路 網路 直接複製值
主體 主體 直接複製值
sip principal.asset.ip 直接複製值
sip principal.ip 直接複製值
date,time,tz principal.labels.date_label.value 由日期、時間、時區串連而成,中間以空格分隔
principal.labels.date_label.key 設為「date」
dir principal.labels.direction_label.value 直接複製值
principal.labels.direction_label.key 設為「direction」
dport principal.port 已轉換為整數
使用者 principal.user.userid 直接複製值
security_result security_result 直接複製值
方向 security_result.detection_fields.direction_label.value 直接複製值
security_result.detection_fields.direction_label.key 設為「direction」
dropcount security_result.detection_fields.dropcount_label.value 直接複製值
security_result.detection_fields.dropcount_label.key 設為「dropcount」
evecode security_result.detection_fields.evecode_label.value 直接複製值
security_result.detection_fields.evecode_label.key 設為「evecode」
evesubcode security_result.detection_fields.evesubcode_label.value 直接複製值
security_result.detection_fields.evesubcode_label.key 設為「evesubcode」
設施 security_result.detection_fields.facility_label.value 直接複製值
security_result.detection_fields.facility_label.key 設為「設施」
level security_result.detection_fields.level_label.value 直接複製值
security_result.detection_fields.level_label.key 設為「level」
msg_id security_result.detection_fields.msg_id_label.value 直接複製值
security_result.detection_fields.msg_id_label.key 設為「msg_id」
spp_name security_result.detection_fields.spp_name_label.value 直接複製值
security_result.detection_fields.spp_name_label.key 設為「spp_name」
spp security_result.detection_fields.spp_label.value 直接複製值
security_result.detection_fields.spp_label.key 設為「spp」
sppoperatingmode security_result.detection_fields.sppoperatingmode_label.value 直接複製值
security_result.detection_fields.sppoperatingmode_label.key 設為「sppoperatingmode」
subnet_name security_result.detection_fields.subnet_name_label.value 直接複製值
security_result.detection_fields.subnet_name_label.key 設為「subnet_name」
subnetid security_result.detection_fields.subnetid_label.value 直接複製值
security_result.detection_fields.subnetid_label.key 設為「subnetid」
subtype security_result.detection_fields.subtype_label.value 直接複製值
security_result.detection_fields.subtype_label.key 設為「subtype」
目標 目標 直接複製值
dip target.asset.ip 直接複製值
dip target.ip 直接複製值

變更記錄

查看這個剖析器的變更記錄

還有其他問題嗎?向社群成員和 Google SecOps 專家尋求解答。