SlideShare a Scribd company logo
1 of 11
セキュリティグループ
Tracked/Untrackedの違い知っていますか?
2022年8月24日
自己紹介
 名前:田中 隆博(すえぞう)
 ついったー:@led_suezou
 Note:https://note.com/ledsue
 仕事:ユーザ系IT子会社にてインフラ構築、運用を担当
 好きなAWSサービス:EC2、CDK
はじめに
 今日のゴール
 セキュリティグループのTrackedとUntrackedな通信の違いを理解する
 セキュリティインシデント発生時にセキュリティグループを使って隔離する方法を理解する
今日のネタ元
 今日のネタ元は2020年のre:Invent SEC327「Instance containment techniques for effective incident response」
というセッションになります。
セキュリティグループについて
 セキュリティグループとは?
 EC2インスタンスで利用できるステートフルな仮想ファイアウォール
 セキュリティグループのルールは、インスタンスに到達することを許可するホワイトリスト型
 インバウンドとアウトバウンドを個別に制御
 特定のポートに複数のルールがある場合、最も緩い制限が適用される
 例:203.0.113.1からポート22を許可、0.0.0.0からポート22を許可の2つのルールがある場合、
0.0.0.0からポート22の接続を許可を優先する
TrackedとUntrackedについて
 セキュリティグループは、インスタンスを出入りする通信を追跡(Tracked)しますが、特定のルール
が設定された場合、通信の追跡を行いません。この追跡を行わない状態のことを「Untracked」と呼び
ます。
 Untrackedになる条件は、以下の通りです。
プロトコル ポート番号 送信元IP
TCP 80 0.0.0.0/0
TCP 80 ::/0
TCP 22 203.0.113.1/32
ICMP すべて 0.0.0.0/0
プロトコル ポート番号 送信先IP
すべて すべて 0.0.0.0/0
すべて すべて ::/0
■インバウンドルール ■アウトバウンドルール
送信元IPを制限しない
対向側のルールにおいて、すべての
ポート(0~65535)をIPアドレス制限
をしない設定
対向するルールにこの関係が成立する場合(下図
の赤枠)、通信は追跡されず、Untrackedな状態に
なります。
TrackedとUntrackedの違い
 Trackedな通信
 セキュリティグループを変更しても、セッションが確立している接続はすぐに通信を中断されませ
ん。既存の接続がタイムアウトするまで通信を引き続き許可します。
 Untrackedな通信
 当該通信を許可しているルールを削除または修正すると即時に通信が中断されます。
既存のセキュリティグループを利用して隔離する際の注意点
 セキュリティインシデントが発生し、セキュリティグループを用いてEC2インスタンスなどを隔離した
い場合、Trackedな状態の通信について注意が必要です。セキュリティグループを操作し、通信許可を取
り消しをしても、一定時間通信は許可された状態になります。
 そのため、以下の手順で通信をいったんUntrackedな状態に遷移させたのち、ルールの削除を行うこと
により、インスタンスの隔離を行うことができます。
手順1 隔離するインスタンスに関連付けられたセキュリティグループを確認
手順2 当該セキュリティグループのすべてのルールを削除
手順3 「0.0.0.0/0(0-65535)」のルールをインバウンド、アウトバウンドの両方に作成
(これを行うことで確立済みの通信をすべてUntrackedな状態に変更)
手順4 追加した「0.0.0.0/0(0-65535)」のルールをインバウンド、アウトバウンドの両方で
削除
今日のまとめ
 セキュリティグループには、TrackedとUntrackedの区別があり、ルール変更時の通信制御に関する挙動
が違う。
 Trackedな通信はルール変更時に即時通信断にならないので、一度Untrackedな通信にしてからルール削
除をするようにする。
参考資料
 Amazon EC2ドキュメント(セキュリティグループの接続の追跡)
 https://docs.aws.amazon.com/ja_jp/AWSEC2/latest/UserGuide/security-group-connection-tracking.html
 自分で書いたヤツ
 https://note.com/ledsue/n/nef83a35c7189
 https://note.com/ledsue/n/n0ef63621f80c
 元ネタのYouTube動画
 https://www.youtube.com/watch?v=pPCuCYrhIyI
 ご清聴ありがとうございました。

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

SecurityGroup_AboutTrackedUntracked.pptx