Upgrade to Pro — share decks privately, control downloads, hide ads and more …

脆弱性管理サービス Amazon Inspector のご紹介

Kodai Sato
November 10, 2022

脆弱性管理サービス Amazon Inspector のご紹介

Kodai Sato

November 10, 2022
Tweet

Other Decks in Technology

Transcript

  1. © 2022, Amazon Web Services, Inc. or its Affiliates.
    2022/10/06
    アマゾンウェブサービスジャパン合同会社
    ソリューションアーキテクト
    佐藤 航⼤ / Sato Kodai
    脆弱性管理サービス
    Amazon Inspector のご紹介

    View Slide

  2. © 2022, Amazon Web Services, Inc. or its Affiliates.
    ⾃⼰紹介

    View Slide

  3. © 2022, Amazon Web Services, Inc. or its Affiliates.
    本セッションのアジェンダ
    • Inspector の概要と応⽤⽅法
    • Inspector Workshop の紹介
    • デモ

    View Slide

  4. © 2022, Amazon Web Services, Inc. or its Affiliates.
    本セッションのアジェンダ
    • Inspector の概要と応⽤⽅法
    • Inspector Workshop の紹介
    • デモ

    View Slide

  5. © 2022, Amazon Web Services, Inc. or its affiliates.
    脆弱性管理を⾏うためには
    • 脆弱性管理ソリューショ
    ンの導⼊と管理は複雑で
    コストがかかる
    • 導⼊が簡単でかつメンテ
    ナンスに必要な⼯数が少
    なく済む必要がある
    • 新しいリソースが継続的に追
    加・削除される動的な環境で
    は、脆弱性をスケーラブルか
    つ継続的に監視するソリュー
    ションが必要がある
    • スキャン毎の間に新たに
    発⾒された脆弱性に対して
    攻撃を受けてしまう可能性
    がある
    • そのためリアルタイムでサ
    ポートできるソリューショ
    ンが必要
    1. 2. 3.
    簡単な使い⽅
    容易なスケーリング リアルタイム性

    View Slide

  6. © 2022, Amazon Web Services, Inc. or its affiliates.
    New Amazon Inspector とは
    • 2021 年の re:Invent で発表
    • ソフトウェアの脆弱性や意図しないネット
    ワーク露出領域を継続的なスキャンで検知
    する脆弱性管理サービス
    • Amazon EC2, Amazon ECR に対応
    Amazon EC2 Amazon ECR
    Amazon
    Inspector

    View Slide

  7. © 2022, Amazon Web Services, Inc. or its affiliates.
    Inspector Classic からの主な変更点
    • Amazon ECR 上のコンテナイメージのスキャンをサポート
    • AWS Systems Manager Agent (SSM agent) によるスキャン
    • マルチアカウント管理のサポート
    • リスクスコアの算出による検出結果の優先順位付け
    • スキャンできるインスタンスとイメージ数が無制限に

    View Slide

  8. © 2022, Amazon Web Services, Inc. or its affiliates.
    Amazon Inspector の特徴
    シンプルで
    ⼤規模な管理
    対策措置の
    ワークフロー
    ⾃動化
    • 数クリックで
    有効化
    • AWS Systems
    Manager Agent
    (SSM Agent)
    との統合
    • AWS Organization
    との統合
    • ダッシュボードによる適
    ⽤範囲の確認とリソース
    毎の状況を集約
    ⾃動検出と継続的
    なスキャン
    ⼀元的に集約し
    可視化
    スコア算出による
    優先順位付け
    • リソースの⾃動検出
    • 脆弱性とネットワーク
    到達可能性の継続的スキャン
    • コンテキストを考慮した
    実⽤的なリスクスコアを
    算出
    • 対策措置の優先順位を列

    • APIで操作可能
    • Amazon EventBridge
    と連携
    • AWS Security Hub
    と統合

    View Slide

  9. © 2022, Amazon Web Services, Inc. or its affiliates.
    シンプルで⼤規模な管理
    • 管理アカウントとメンバーアカウントの設定
    • ⼀つのアカウントを管理アカウントに指定
    • すべてのメンバーアカウントで Amazon Inspector を⾃動的に有効に
    する機能により、Organization 内の全てのアカウントを⼀元的に管理
    および設定
    • 組織全体の調査結果を⼀元化されたコンソールに集約
    AWS Organization と統合することで複数アカウントの管理が可能

    View Slide

  10. © 2022, Amazon Web Services, Inc. or its affiliates.
    環境の状況を把握できるダッシュボード画⾯

    View Slide

  11. © 2022, Amazon Web Services, Inc. or its affiliates.
    ⾃動検出と継続的なスキャン
    新しいアプリケーションやパッチのインストール後など、イベントに応じてスキャンを
    実⾏することで、リソースのライフサイクルを通して環境を監視
    ⾃動検出 - 対象となるすべてのリソースを⾃動的に検出し、
    ソフトウェアの脆弱性や意図しないネットワークへの露出がないか、
    リソースの継続的なスキャンを開始
    継続的なスキャン - 専⽤のスキャンエンジンを使⽤してワークロード
    の危険性、リソースの悪意ある使⽤、データへの不正アクセスの原因
    となるソフトウェアの脆弱性やネットワーク露出領域がないか監視
    全てのワークロードを⾃動的に検出し、組織全体の脆弱性を継続的にスキャン

    View Slide

  12. © 2022, Amazon Web Services, Inc. or its affiliates.
    スコア算出による優先順位付け
    実⽤的なスコアリング– CVE(Common
    Vulnerability and Exposures)
    情報をリソースのネットワークアクセ
    スなどと関連付けてスコアを算出する
    コンテキストを考慮した実⽤的なスコアリングにより効率で正確な優先順位付けを可能に
    例︓リモートでしか悪⽤できないCVEをAmazon EC2
    インスタンス上で発⾒したが、
    そのインスタンスはインターネット経由でアクセスできない
    設定になっていた場合、実際に悪⽤される可能性は無いので
    リスクスコアは下がる
    この結果、より実⽤的な脆弱性リスクスコアが得られる

    View Slide

  13. © 2022, Amazon Web Services, Inc. or its affiliates.
    調査結果のレビューとアクション
    • Amazon Inspector は、発⾒した脆弱性とネットワーク露出を⾃動的に追跡・保存する
    § ステータスは active, suppressed, closed の3種類
    § Amazon Inspector は環境内を継続的にスキャンして、アクティブな検出結果を監視す
    る。脆弱性への対応が完了すると、Inspector は⾃動的に検出結果のステータスを
    closed に変更
    パッケージの脆弱性 - 環境内のソフトウェア・パッケージをスキャンし
    て検出した脆弱性に該当する CVE(Common Vulnerabilities and
    Exposures) を⽰す。
    ネットワーク到達性 - Amazon EC2インスタンスへの許可されたネット
    ワークパスがあるかどうかを⽰す。インターネットゲートウェイ、ロー
    ドバランサー、VPC ピアリング接続、仮想ゲートウェイを介した VPN
    などの VPC から到達可能かどうかスキャン。
    脆弱性を検出後、詳細なレポートを提供

    View Slide

  14. © 2022, Amazon Web Services, Inc. or its affiliates.
    抑制ルール (Suppression Rule)
    • 指定した条件に⼀致する Inspector の検出結果
    を⾃動的に⾮表⽰にする
    § 検出結果の重⼤度、リソースタグ、作成⽇な
    ど、様々な条件でフィルタリング可能
    – 重⼤度の低い検出結果を⾮表⽰にする
    – 開発環境のリソースの検出結果を⾮表⽰にする等
    • 抑制ルールで除外した検出結果はステータスが
    suppressed となり、デフォルトでは表⽰され
    ない

    View Slide

  15. © 2022, Amazon Web Services, Inc. or its affiliates.
    サポートされている OS と プログラミング⾔語
    • Amazon EC2 スキャン
    § Amazon Linux 2
    § Cent OS
    § Debian Server
    § RedHat Enterprise Linux (RHEL)
    § Ubuntu
    § Windows Server (2022/9 Update! )
    § etc..
    • Amazon ECR スキャン
    § Cent OS
    § Debian Server
    § RedHat Enterprise Linux (RHEL)
    § Ubuntu Server, etc…
    • ECR スキャンの対応⾔語
    § C#, Go, Java, JavaScript,
    § PHP, Python, Ruby, Rust
    対応OSのバージョン等の詳細と最新の情報はこちらをご覧ください
    https://docs.aws.amazon.com/inspector/latest/user/supported.html

    View Slide

  16. © 2022, Amazon Web Services, Inc. or its Affiliates.
    [応⽤例 - 1] 修復アクションの⾃動化
    • Security Hub のカスタムアクション、
    Systems Manager Automation との
    連携
    • 指定した脆弱性のパッケージに対して
    ⾃動でパッチを適⽤する
    • 重⼤な脆弱性が発⾒された場合にスケ
    ジュールを待たずにすぐにパッチ適⽤
    を⾏える
    • カスタムアクション実⾏後は修復まで
    ⾃動化
    [Blog] “Amazon Inspector と AWS Systems Manager を⽤いた脆弱性管理と修復の⾃動化”
    https://aws.amazon.com/jp/blogs/news/automate-vulnerability-management-and-remediation-in-aws-using-amazon-inspector-and-aws-systems-manager-part-1/
    https://aws.amazon.com/jp/blogs/news/automate-vulnerability-management-and-remediation-in-aws-using-amazon-inspector-and-aws-systems-manager-part-2/

    View Slide

  17. © 2022, Amazon Web Services, Inc. or its Affiliates.
    [応⽤例 - 1] 修復アクションの⾃動化 アーキテクチャ
    [Blog] “Amazon Inspector と AWS Systems Manager を⽤いた脆弱性管理と修復の⾃動化”
    https://aws.amazon.com/jp/blogs/news/automate-vulnerability-management-and-remediation-in-aws-using-amazon-inspector-and-aws-systems-manager-part-1/
    https://aws.amazon.com/jp/blogs/news/automate-vulnerability-management-and-remediation-in-aws-using-amazon-inspector-and-aws-systems-manager-part-2/

    View Slide

  18. © 2022, Amazon Web Services, Inc. or its Affiliates.
    [応⽤例 - 2] 通知フローの⾃動化
    • AWS Security Hub や AWS EventBridge との連携により脆弱性が検出され
    た際に迅速に通知を⾏う
    • EventBridge のイベントルールによるフィルタリングも可能
    • Critical な検出結果のみ通知する、など
    Amazon Inspector
    AWS SecurityHub AWS EventBridge
    AWS EventBridge AWS Lambda Amazon SNS
    Amazon SNS
    Security Admin
    AWS Chatbot
    Slack
    e-mail
    e-mail

    View Slide

  19. © 2022, Amazon Web Services, Inc. or its Affiliates.
    [活⽤例 - 3] 脆弱性情報の可視化
    • Inspector が提供するダッシュボード機能に加えて、より可視性の⾼い、カス
    タマイズ可能なダッシュボードも作成可能
    • Amazon S3 へのエクスポート機能から Athena à QuickSight と連携
    CreateFindingReport
    API
    Amazon Athena
    Amazon S3 Amazon QuickSight
    Amazon Inspector

    View Slide

  20. © 2022, Amazon Web Services, Inc. or its Affiliates.
    料⾦・対応リージョン

    View Slide

  21. © 2022, Amazon Web Services, Inc. or its affiliates.
    15⽇間無制限の無料トライアルをご利⽤できます
    Scan type ⽉間料⾦(Tokyo)
    初回スキャン料⾦ $0.11/image
    再スキャン料⾦ $0.01/scan
    Amazon EC2 スキャン料⾦
    • スキャンされたインスタンスの⽉間平均数※に基づいて算出
    Amazon ECR コンテナイメージ スキャン料⾦
    • 継続スキャンを⾏うか、1回だけ使⽤する
    オンプッシュスキャンを⾏うかを選択
    • 継続スキャンの場合は、初回のオンプッシュスキャ
    ンと⾃動再スキャンのたびに料⾦が発⽣
    • オンプッシュスキャンの場合は、初回スキャンの料
    ⾦のみ発⽣
    Scan type ⽉間料⾦(Tokyo)
    EC2スキャン $1.512/instance
    料⾦体系(東京リージョン)
    ※インスタンスの⽉間平均数 = 各インスタンスで Amazon Inspector が有効化された合計時間/⽉間時間数
    例) 3つのインスタンスで Amazon Inspector を10⽇間有効化した場合、⽉間インスタンス平均数は1であり$1.512発⽣
    Amazon EC2 と Amazon ECR に対するスキャンによって料⾦がそれぞれ発⽣
    最新の情報は以下のリンクよりご確認ください
    https://aws.amazon.com/jp/inspector/pricing/

    View Slide

  22. © 2022, Amazon Web Services, Inc. or its affiliates.
    コスト例
    • (例1) 東京リージョンで 100 台の EC2 インスタンスが起動されてお
    り、AWS Systems Manager Agent がインストールされ、
    Inspector スキャンを⾏うように設定されている場合、⽉間請求額は
    • (例2) ⽉初に東京リージョンで100個のコンテナイメージを継続ス
    キャン⽤に設定されたリポジトリにプッシュし、再スキャンが15回
    実⾏された場合の⽉間請求額は
    100(インスタンス数) * 1.512(USD) = 151.2 USD
    初回スキャン料⾦: 100(コンテナイメージ数) * 0.11(USD) = 11 (USD)
    再スキャン料⾦: 100(コンテナイメージ数) * 0.01(USD) * 15(回) = 15 (USD)
    Total: 26 USD

    View Slide

  23. © 2022, Amazon Web Services, Inc. or its affiliates.
    Amazon Inspector 対応リージョン
    19のリージョンでご利⽤いただけます
    東京 リージョンにも対応
    • バージニア北部
    • オハイオ
    • 北カリフォルニア
    • オレゴン
    • ⾹港
    • ムンバイ
    • ソウル
    • シンガポール
    • シドニー
    • 東京
    • カナダ
    • フランクフルト
    • アイルランド
    • ロンドン
    • ミラノ
    • パリ
    • ストックホルム
    • バーレーン
    • サンパウロ
    最新の情報は以下のリンクよりご確認ください
    https://aws.amazon.com/jp/about-aws/global-infrastructure/regional-product-services/

    View Slide

  24. © 2022, Amazon Web Services, Inc. or its Affiliates.
    本セッションのアジェンダ
    • Inspector の概要と応⽤⽅法
    • Inspector Workshop の紹介
    • デモ

    View Slide

  25. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop の概要
    • Inspector v2 の使い⽅や 他サービスとの連携により脆弱性管理・修復の⽅法
    を学ぶハンズオン
    • 構成
    • Module 1 – Amazon Inspector のセットアップ
    • Module 2 – 脆弱性のフィルタリング、優先順位付け
    • Module 3 – 検出結果の抑制
    • Module 4 – Security Hub へ検出結果を集約、通知
    • Module 5 – 脆弱性の概要メールを週次で送信
    • Module 6 – Patch Manager を⽤いてパッチ適⽤を実施
    • Module 7 – アンマネージドインスタンスの原因調査
    • Module 8 – AMI のパッチ適⽤の⾃動化
    Inspector Workshop
    https://catalog.us-east-1.prod.workshops.aws/workshops/863fe895-a98e-4a9f-a222-05f7f0e321a2/ja-JP

    View Slide

  26. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop のアーキテクチャ
    Amazon Inspector AWS SecurityHub AWS EventBridge
    AWS Lambda
    Amazon SNS
    Amazon SNS
    Amazon ECR Amazon EC2
    AWS Systems
    Manager
    Maintenance
    Window
    Run Command
    Automation
    PatchBaseline
    Document
    Patched AMI
    Security Admin

    View Slide

  27. © 2022, Amazon Web Services, Inc. or its Affiliates.
    本セッションのアジェンダ
    • Inspector の概要と応⽤⽅法
    • Inspector Workshop の紹介
    • デモ

    View Slide

  28. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Thank you!

    View Slide

  29. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (開始時)
    Amazon ECR Amazon EC2

    View Slide

  30. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 1-3)
    Amazon Inspector
    Amazon ECR Amazon EC2

    View Slide

  31. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 4)
    Amazon Inspector AWS SecurityHub
    Amazon ECR Amazon EC2
    AWS EventBridge
    Amazon SNS
    Security Admin

    View Slide

  32. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 5)
    Amazon Inspector AWS SecurityHub AWS EventBridge
    AWS Lambda
    Amazon SNS
    Amazon SNS
    Amazon ECR Amazon EC2
    Security Admin

    View Slide

  33. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 6)
    Amazon Inspector AWS SecurityHub AWS EventBridge
    AWS Lambda
    Amazon SNS
    Amazon SNS
    Amazon ECR Amazon EC2
    AWS Systems
    Manager
    Maintenance
    Window
    Run Command
    PatchBaseline
    Document
    Security Admin

    View Slide

  34. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 7)
    Amazon Inspector AWS SecurityHub AWS EventBridge
    AWS Lambda
    Amazon SNS
    Amazon SNS
    Amazon ECR Amazon EC2
    AWS Systems
    Manager
    Maintenance
    Window
    Run Command
    PatchBaseline
    Document
    Debugging
    Unmanaged Instance
    (Module 7)
    Security Admin

    View Slide

  35. © 2022, Amazon Web Services, Inc. or its Affiliates.
    Inspector Workshop (Module 8)
    Amazon Inspector AWS SecurityHub AWS EventBridge
    AWS Lambda
    Amazon SNS
    Amazon SNS
    Amazon ECR Amazon EC2
    AWS Systems
    Manager
    Maintenance
    Window
    Run Command
    Automation
    PatchBaseline
    Document
    Patched AMI
    Debugging
    Unmanaged Instance
    (Module 7)
    Security Admin

    View Slide