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.7k
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
230
カスタムベクトルストアでRAGワークフローをカスタマイズする
risako
1
260
2023/11/30 JAWS-UG CLI支部
risako
0
180
Lambdaでカスタムウィジェットを作ろう
risako
0
400
ノイジーネイバーにさようなら FSx for NetApp ONTAP の QoS 機能~
risako
0
200
コマンドで楽々!リソースをTerraformコードにエクスポート
risako
0
200
徹底比較!RDS&RDSCustom@20230926_JAWS朝会#49
risako
2
320
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Accessibility Awareness
sabderemane
1
290
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
610
Deep Space Network (abreviated)
tonyrice
0
410
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Navigating Weather and Climate Data
rabernat
0
580
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
Why Our Code Smells
bkeepers
PRO
340
58k
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