存取 DDoS 攻擊可視化遙測資料

Google Cloud Armor Enterprise 可讓您使用 Cloud Logging 和 Cloud Monitoring 分析 DDoS 攻擊及其來源。

Google Cloud Armor 會自動偵測並防範網路層 (第 3 層) 和傳輸層 (第 4 層) 的攻擊,在強制執行安全性政策前先進行防範,並只根據安全性政策規則評估格式正確的要求。因此,因全天候 DDoS 防護而減少的流量,不會顯示在安全政策或後端的遙測資料中。

不過,分散式阻斷服務緩解事件的 Cloud Logging 和 Cloud Monitoring 指標屬於分散式阻斷服務攻擊可視性,這項功能僅供 Google Cloud Armor Enterprise 訂閱者使用。以下各節說明如何使用 Logging 和 Monitoring 分析 DDoS 攻擊及其來源。下列負載平衡器類型可顯示 DDoS 攻擊:

  • 全域外部應用程式負載平衡器
  • 傳統版應用程式負載平衡器

如果您使用跨專案服務參照,您只能在包含負載平衡器前端和網址對應的主專案或服務專案中,查看與 DDoS 攻擊可見度相關的遙測和記錄。您無法在包含後端服務的服務專案中查看遙測和記錄。

為確保記錄和報表正確無誤,Cloud Armor 需要存取下列記錄。這些記錄必須儲存在 Cloud Logging 中,或傳送至 Cloud Armor 可存取的記錄值區

  • networksecurity.googleapis.com/dos_attack
  • networksecurity.googleapis.com/network_dos_attack
  • networksecurity.googleapis.com/network_dos_attack_mitigations

Cloud Logging 攻擊緩解事件記錄

Cloud Armor 在緩解 DDoS 攻擊時,會產生三種事件記錄項目。記錄格式包括來源 IP 位址和地理位置的分析 (如有可能)。以下各節提供每種事件記錄的記錄格式範例:

已開始緩解

   {
      "id": "20220101_1235_mitigiation_1.2.3.4",
      "mitigationType": "MITIGATION_STARTED",
      "targetVip": "1.2.3.4",
      "totalVolume": {
         "pps": "1234000",
         "bps": "9876000000"
      },
      "started": {
         "totalAttackVolume": {
            "pps": "1000000",
            "bps": "9000000000"
      },
      "topSourceIp": [
         {
            "ipAddress": "1.2.3.4",
            "volume": {
            "pps": "10000",
            "bps": "2000000"
            }
         },
         {
            "ipAddress": "2.3.4.5",
            "volume": {
            "pps": "5000",
            "bps": "1000000"
            }
         }
      ],
      "topSourceGeo": [
         {
            "geo": "US",
            "volume": {
            "pps": "100000",
            "bps": "20000000"
            }
         }
      ]
      }
   }
   

正在緩解

   {
      "id": "20220101_1235_mitigiation_1.2.3.4",
      "mitigationType": "MITIGATION_ONGOING",
      "targetVip": "1.2.3.4",
      "totalVolume": {
         "pps": "1234000",
         "bps": "9876000000"
      },
      "ongoing": {
         "totalAttackVolume": {
            "pps": "1000000",
            "bps": "9000000000"
         },
         "topSourceIp": [
         {
            "ipAddress": "1.2.3.4",
            "volume": {
               "pps": "10000",
               "bps": "2000000"
            }
         },
         {
            "ipAddress": "2.3.4.5",
            "volume": {
               "pps": "5000",
               "bps": "1000000"
            }
         }
      ],
      "topSourceGeo": [
         {
            "geo": "US",
            "volume": {
               "pps": "100000",
               "bps": "20000000"
            }
         }
      ]
      }
   }
   

緩解措施已結束

   {
      "id": "20220101_1235_mitigiation_1.2.3.4",
      "mitigationType": "MITIGATION_ENDED",
      "targetVip": "1.2.3.4",
      "totalVolume": {
         "pps": "2314000",
         "bps": "9768000000"
      },
      "ended": {
         "attackDurationSeconds": 345
      }
   }
   

前往 Google Cloud 控制台的「Logs Explorer」頁面,然後查看 ProtectedEndpoint 資源。

前往記錄檔探索工具

或者,您也可以查看 network_dos_attack_mitigations 記錄名稱。

Cloud Monitoring 指標

DDoS 緩解遙測指標會顯示在「受保護的網路端點」 (ProtectedEndpoint) 資源下方,僅適用於已註冊 Google Cloud Armor Enterprise 的應用程式層 (第 7 層) 虛擬 IP 位址。可用的指標如下:

  • 輸入位元組數 (/dos/ingress_bytes)
  • 輸入封包 (/dos/ingress_packets)

您可以根據下列標籤,將上述指標分組及篩選:

標籤
project_id 已註冊 Cloud Armor Enterprise 的專案 ID。
location 受保護端點的位置。
vip 受保護端點的虛擬 IP 位址。
drop_status 可能的值包括:
  • processed:Cloud Armor Always-on DDoS protection 未拒絕流量,表示系統已根據安全性政策評估流量。
  • blocked:Cloud Armor Always-on DDoS protection 拒絕流量,並在根據安全性政策評估流量前將其捨棄。

前往 Google Cloud 控制台的「指標探索器」頁面。

前往「Metrics Explorer」

解讀流量偏低的虛擬 IP 位址的遙測指標

如果虛擬 IP 位址 (VIP) 每秒接收的封包少於 10 萬個,建議您使用較長的時間範圍,在 Cloud Monitoring 中查看指標。舉例來說,如果高流量 VIP 可能使用 1 分鐘的 ALIGN_RATE,我們建議改用 10 分鐘的 ALIGN_RATE。使用較長的時間範圍有助於減少訊號雜訊比不佳所導致的訊號失真。

此外,Cloud Armor 捨棄流量的速率 (捨棄率) 有些部分是透過統計方式推斷,因此流量較低的 VIP 可能不太準確。也就是說,在 DDoS 攻擊期間,Cloud Monitoring 報表的丟棄率可能會略低於實際丟棄率。這可減少統計假象,避免高估流量下降量,特別是流量偏低且未遭受攻擊的 VIP。