[レポート] Building a DDoS-resilient perimeter and automatic protection at scale #NIS372 #AWSreInforce

2023.06.15

こんにちは。コカコーラ大好き、カジです。

アナハイムで開催されている AWS re:Inforce 2023に参加しています。

本記事は AWS re:Inforce 2023 のWorkshopセッション「Building a DDoS-resilient perimeter and automatic protection at scale」のセッションレポートです。

セッション概要

NIS372 Building a DDoS-resilient perimeter and automatic protection at scale

In this workshop, acquire practical knowledge on how to build a DDoS-resilient perimeter, analyze logs to make informed decisions with Amazon Athena, and see how to use services like AWS Shield, AWS WAF, AWS Firewall Manager, and Amazon CloudFront to architect for DDoS resiliency and maintain robust operational capabilities that allow for rapid detection and engagement during high-severity events. Learn how to detect and filter out malicious web requests, reduce the attack surface, and protect at scale with maximum automation and visibility.

You must bring your laptop to participate.

マルチアカウントでのFirewall Managerを利用したポリシー管理と、AWS WAFのManaged RuleとRate limitを利用した防御を実践し、さらにShield AdvancedのAutomatic Application Layer DDoS Mitigationを利用した防御を実践するWorkshopでした。

構成図

構成図は以下の通りです。 Fireall Manager Adminアカウントは、1つですが、Member Accountは、参加者数の数だけAWSアカウントがあり、スイッチロールをしながら操作でした。

Labの流れ

  • アプリケーションレイヤの防御
    • Web ACLとマネージドルールを設定
  • AWS WAFのログをAthenaで分析しながら各種設定
    • Global rate limitを設定
    • Rate-base Ruleを設定
    • Geoベースのレート制限とブロッキングを設定
    • ジオマッチ・レートベース・ルールを設定
  • セントラルプロテクションとルール管理
    • 規模に応じたルールの管理
  • DDoSイベントへの対応と緩和の準備
    • Route 53 Health Checkを使用した健全性ベースの検出
    • DDoS保護とアプリケーションレイヤの自動緩和
    • AWS Shieldレスポンスチームへの通知設定
    • イベントシミュレーションと緩和

Rate-baseのルールを設定しているときのCloudwatchのグラフで、ブロックできていることを確認できました。

Shield AdvancedのAutomatic Application Layer DDoS Mitigationのグラフ スクリーンショットを撮影し忘れたので、Workshopの手順書から引用しています。

終わりに

注略があり、本来はAWS Shield AdvancedのAutomatic Application Layer DDoS Mitigationは、保護されたアプリケーションのベースラインの確立に通常最低24時間、30日間ベースライン確率に必要ですが、今回のワークショップでは、時間を短縮するため、ベースラインがあらかじめ設定されており、すぐにその効果を確認できる状態になっていました。 また、Automatic Application Layer DDoS Mitigation によって、Shield AdvancedでリソースのDDoS緩和までの時間を大幅に短縮することができることを確認でき、自動的にAWS Shield Response Team (SRT) にエスカレーションする設定についても行うことができました。貴重な体験でした。

余談ですが、模擬DDoSするツールについては、SSMのParameter Storeを使って実行しており、受講者側ではスクリプトの中身がみれないようになっており、よくできているなぁと思いました。