Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ECSでGuardDutyのRuntime Monitoringを使ってみる
Search
Pretzelisa
January 20, 2024
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ECSでGuardDutyのRuntime Monitoringを使ってみる
JAWS-UG横浜 #68 AWS re:Invent 2023 Recap Containerで発表
Pretzelisa
January 20, 2024
More Decks by Pretzelisa
See All by Pretzelisa
JAWS-UG朝会_20240614
risako
1
220
カスタムベクトルストアでRAGワークフローをカスタマイズする
risako
1
250
2023/11/30 JAWS-UG CLI支部
risako
0
170
Lambdaでカスタムウィジェットを作ろう
risako
0
380
ノイジーネイバーにさようなら FSx for NetApp ONTAP の QoS 機能~
risako
0
190
コマンドで楽々!リソースをTerraformコードにエクスポート
risako
0
190
徹底比較!RDS&RDSCustom@20230926_JAWS朝会#49
risako
2
310
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Building Adaptive Systems
keathley
44
3.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
660
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Are puppies a ranking factor?
jonoalderson
2
3.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Visualization
eitanlees
152
17k
Typedesign – Prime Four
hannesfritz
42
3.2k
Building an army of robots
kneath
307
46k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Transcript
ECSでGuardDutyのRuntime Monitoringを使ってみる 2024/1/20 JAWS-UG横浜 #68 AWS re:Invent 2023 Recap Container
齋藤理沙子
自己紹介 齋藤理沙子 オンプレからクラウドまで、インフラまわり色々 2023 Japan AWS Jr. Champions 2023 Japan
AWS All Certifications Engineers 好きなサービス:FSx for NetApp ONTAP 2
re:Invent2023でのアップデート コンテナセキュリティ Amazon GuardDutyのRuntime Monitoring機能が Amazon Elastic Container Service(ECS) でも利用できるようになった
※Amazon Elastic Compute Cloud(EC2)での利用はプレビュー 3
GuardDutyをざっとおさらい AWSサービスからのデータを分析し、 潜在的な脅威を検出するサービス 検出には攻撃者が使用する既知のIPアドレスや ドメインのリスト、機械学習を用いる 4
GuardDutyのRuntime Monitoringとは OSレベルのイベント(※)を監視し、 潜在的な脅威を検出するGuardDutyの機能 ※ファイルアクセス、プロセス実行、ネットワーク接続など Amazon GuardDutyユーザーガイド「GuardDuty Runtime Monitoring」 https://docs.aws.amazon.com/ja_jp/guardduty/latest/ug/runtime-monitoring.html
5
これまでのECS監視(マネージドサービス) VPCフローログとDNSログを監視 例: ランタイムの観点では、Command&ControlCenter(C&C)と 通信しているインスタンスIDの特定はできるが、 どのプロセスがC&Cサーバと通信しているのかは分からない コンテナの観点では、どのコンテナイメージに 脆弱性があるのかまでは特定することができない
6
Runtime Monitoringを使うメリット 不審なアクティビティのプロセスIDが分かる どのコンテナイメージに脆弱性があるか 特定することができる →脅威の早期検出がしやすくなった 7
Runtime Monitoringで検出できる アクティビティの例 Backdoor:Runtime/C&CActivity.B コンテナ(orEC2)がC&Cサーバに関連付けられた IP をクエリしている CryptoCurrency:Runtime/BitcoinTool.B
EC2インスタンス/コンテナで暗号通貨関連のIPアドレスを クエリしている DefenseEvasion:Runtime/FilelessExecution メモリからコードを実行している(インメモリ攻撃の可能性) Trojan:Runtime/BlackholeTraffic ブラックホール の IP アドレスと通信しようとしている 8
ランタイムの脅威を検出した後 GuardDutyでの検出結果を AWS Security Hub, Amazon EventBridge, Amazon Detectiveと連携させることも可能 Amazon
DetectiveがECS Runtime Monitoringもサポートする ようになった(re:Invent 2023期間中に発表) AWS「Amazon Detective が Amazon GuardDuty ECS ランタイムモニタリングの セキュリティ調査をサポート」 https://aws.amazon.com/jp/about-aws/whats-new/2023/11/amazon-detective- security-guardduty-ecs-monitoring/ 9
Runtime Monitoringを有効にしてみる 10 EC2 instance supportはプレビューで、 agentの自動設定は利用できない
サイドカーコンテナが立ち上がる サイドカーコンテナはタスク内の各コンテナに接続される コンテナ内でGuardDuty セキュリティエージェントが実行され、 各コンテナのランタイムイベントを収集する タスクが実行中の場合はサイドカーコンテナはデプロイされない タスクをいったん停止->再開することでデプロイされる 11
エージェントの仕組み(Fargate) 12 プライベートリポジトリでRuntime Monitoring Agentが 保管されている (パッチ当てやアップグレードはAWS側で行われる)
エージェントの仕組み(Fargate) 13 新しいタスクを開始すると最新のイメージがECRから pullされて、タスク内で実行される (ので、 ECSのタスク実行ロールで、ECRからのpullの許可が必要) pull
ECSで不審なアクティビティを行う DNSクエリの方法は以下を参考にさせていただきました クラスメソッド「【総まとめ】GuardDutyによるコンテナランタイム脅威検知の注意事項と設定手順と検出 の様子 #AWSreInvent」 https://dev.classmethod.jp/articles/ecs-fargate-runtime-detection/ 暗号通貨アクティビティに関連付けられているドメイン名にDNSクエリを行う (dig pool.supportxmr.com +short)
14
GuardDutyコンソールの検出結果に あがってくる 15
検出内容の詳細 16 プロセス名・ID、 実行ファイルのパス・ SHA-256ハッシュなどを 確認できる
まとめ ECSでGuardDuty Runtime Monitoringが利用可能に →マネージドサービスでランタイムアクティビティを 監視し、プロセスやコンテナイメージ単位で 脅威検出ができるようになった 17
参考サイト AWS re:Invent 2023 - Introducing GuardDuty ECS Runtime Monitoring,
including AWS Fargate (SEC239) https://www.youtube.com/watch?v=nuMOaQctNgE&t=1360s AWS「Amazon Detective が Amazon GuardDuty ECS ランタイムモニタリングの セキュリティ調査をサポート」 https://aws.amazon.com/jp/about-aws/whats-new/2023/11/amazon- detective-security-guardduty-ecs-monitoring/ クラスメソッド「【総まとめ】GuardDutyによるコンテナランタイム脅威検知の注意事項と設定 手順と検出の様子 #AWSreInvent」 https://dev.classmethod.jp/articles/ecs-fargate-runtime-detection/ Amazon GuardDutyユーザーガイド「GuardDuty Runtime Monitoring」 https://docs.aws.amazon.com/ja_jp/guardduty/latest/ug/runtime- monitoring.html 18