GuardDuty とは

AWS 環境の脅威を検出するマネージドサービス

出典: What is Amazon GuardDuty?

“Amazon GuardDuty is a threat detection service that continuously monitors, analyzes, and processes AWS data sources and logs in your AWS environment.”

検出のみを行い、修復アクションは実行しない。修復は EventBridge + Lambda などで自動化するか、手動で対応する

検出対象

出典: What is Amazon GuardDuty?

“Compromised and exfiltrated AWS credentials.” “Data exfiltration and destruction that can lead to a ransomware event.” “Unauthorized cryptomining activity in your Amazon Elastic Compute Cloud (Amazon EC2) instances and container workloads.” “Presence of malware in your Amazon EC2 instances and container workloads, and newly uploaded files in your Amazon Simple Storage Service (Amazon S3) buckets.” “Operating system-level, networking, and file events that indicate unauthorized behavior on your Amazon Elastic Kubernetes Service (Amazon EKS) clusters, Amazon Elastic Container Service (Amazon ECS) - AWS Fargate tasks, and Amazon EC2 instances and container workloads.”

  • IAM ユーザー/ロールの認証情報の漏洩・不正利用
  • ランサムウェアにつながるデータ漏洩・破壊
  • EC2/コンテナでの不正な暗号通貨マイニング
  • EC2/コンテナ/S3 上のマルウェア
  • EKS/ECS/Fargate/EC2 での不正な OS レベル操作

基盤データソース

GuardDuty を有効化すると自動で分析が始まる。追加設定不要

CloudTrail 管理イベント

AWS API の呼び出し履歴。誰が、いつ、どの API を叩いたかがわかる

出典: GuardDuty foundational data sources

“GuardDuty monitors CloudTrail management events, also known as control plane events. These events provide insight into management operations that are performed on resources in your AWS account.”

検出例: IAM ポリシーの不審な変更、セキュリティグループの変更、CloudTrail の無効化

出典: GuardDuty foundational data sources

“Configuring security (IAM AttachRolePolicy API operations)” “Configuring rules for routing data (Amazon EC2 CreateSubnet API operations)” “Setting up logging (AWS CloudTrail CreateTrail API operations)“

VPC Flow Logs

EC2 インスタンスのネットワークトラフィック情報

出典: GuardDuty foundational data sources

“The VPC Flow Logs feature of Amazon VPC captures information about the IP traffic going to and from network interfaces attached to the Amazon Elastic Compute Cloud (Amazon EC2) instances within your AWS environment.”

検出例: 既知の悪意ある IP への通信、ポートスキャン、異常なトラフィックパターン

DNS ログ

EC2 インスタンスからの DNS クエリ

出典: GuardDuty foundational data sources

“If you use AWS DNS resolvers for your Amazon EC2 instances (the default setting), then GuardDuty can access and process your request and response Route53 Resolver DNS query logs through the internal AWS DNS resolvers.”

検出例: マルウェアの C&C サーバーへの通信、暗号通貨マイニングプールへの接続

※ 独自の DNS サーバーを使っている場合は検出できない

保護プラン

基盤データソースに加えて、追加で有効化できる機能

S3 Protection

S3 のオブジェクトレベル操作(GetObject、PutObject など)を監視

出典: GuardDuty S3 Protection

“S3 Protection helps you detect potential security risks for data, such as data exfiltration and destruction, in your Amazon Simple Storage Service (Amazon S3) buckets. GuardDuty monitors AWS CloudTrail data events for Amazon S3, that includes object-level API operations to identify these risks in all the Amazon S3 buckets in your account.”

基盤データソースの CloudTrail 管理イベントとの違い:

  • 管理イベント: バケットの作成・削除・設定変更
  • データイベント: オブジェクトの読み書き

Runtime Monitoring

EC2/ECS/EKS 上で動くワークロードの OS レベルの動作を監視

出典: GuardDuty Runtime Monitoring

“Runtime Monitoring observes and analyzes operating system-level, networking, and file events to help you detect potential threats in specific AWS workloads in your environment.”

セキュリティエージェントをインストールして、ファイルアクセス、プロセス実行、コマンドライン引数、ネットワーク接続を監視する

出典: GuardDuty Runtime Monitoring

“Runtime Monitoring uses a GuardDuty security agent that adds visibility into runtime behavior, such as file access, process execution, command line arguments, and network connections.”

その他の保護プラン

プランデータソース検出対象
EKS ProtectionKubernetes 監査ログEKS クラスタへの不審な API 呼び出し
Malware Protection for EC2EBS ボリュームのスキャンEC2 上のマルウェア
Malware Protection for S3S3 オブジェクトのスキャンアップロードされたマルウェア
RDS ProtectionRDS ログインアクティビティ不審なデータベースログイン
Lambda ProtectionLambda の VPC Flow LogsLambda からの不審なネットワーク通信

マルチアカウント管理

複数アカウントを一元管理できる。管理者アカウントがメンバーアカウントの検出結果を集約して確認する

出典: Multiple accounts in Amazon GuardDuty

“When your AWS environment has multiple accounts, you can manage them by designating one AWS account as the administrator account. You can then associate the multiple AWS accounts with this administrator account as its member accounts.”

AWS Organizations 統合(推奨)

Organizations の管理アカウントが、任意のアカウントを「委任 GuardDuty 管理者」に指定する

出典: Managing GuardDuty accounts with AWS Organizations

“In an AWS organization, the management account can designate any account within this organization as the delegated GuardDuty administrator account.”

出典: Managing GuardDuty accounts with AWS Organizations

“By default, the administrator account can enable and manage GuardDuty for all the member accounts in the organization within that Region.”

メリット:

  • 新規アカウントに自動で GuardDuty を有効化できる
  • メンバーアカウントの GuardDuty を管理者側から有効化できる

注意点:

  • リージョンごとに設定が必要(GuardDuty はリージョナルサービス)
  • 全リージョンで同じ委任管理者アカウントを使う必要がある
  • 管理アカウント自体を委任管理者にするのは非推奨

出典: Managing GuardDuty accounts with AWS Organizations

“A delegated GuardDuty administrator account is Regional. Unlike AWS Organizations, GuardDuty is a Regional service.” “It is required that you use the same account as delegated GuardDuty administrator account in all other Regions.” “Your organization’s management account can be the delegated GuardDuty administrator account. However, the AWS security best practices follow the principle of least privilege and doesn’t recommend this configuration.”

招待機能(レガシー)

Organizations を使わない場合の方法。管理者アカウントがメンバーアカウントに招待を送り、メンバーが承諾する

出典: Managing GuardDuty accounts by invitation

“To manage accounts outside of your organization, you can use the legacy invitation method.”

制限:

  • メンバーアカウント側で GuardDuty を有効化できない
  • 新規アカウントの自動追加ができない

出典: Managing GuardDuty accounts by invitation

“However, invitation administrator account users cannot enable GuardDuty on behalf of associated member accounts or view other non-member accounts within their AWS Organizations organization.” “GuardDuty recommends using AWS Organizations instead of GuardDuty invitations, to manage your member accounts.”

他サービスとの連携

出典: What is Amazon GuardDuty?

“AWS Security Hub CSPM – This service gives you a comprehensive view of the security state of your AWS resources”

  • Security Hub: 検出結果を集約して一元管理
  • EventBridge: 検出結果をトリガーに自動対応(Lambda で修復など)

全体像

┌─────────────────────────────────────────────────────────────┐
│ GuardDuty                                                   │
├─────────────────────────────────────────────────────────────┤
│ 【基盤データソース】自動で有効                                │
│  ├─ CloudTrail 管理イベント → API 呼び出しの異常             │
│  ├─ VPC Flow Logs → ネットワーク通信の異常                   │
│  └─ DNS ログ → 悪意あるドメインへの通信                      │
├─────────────────────────────────────────────────────────────┤
│ 【保護プラン】追加で有効化                                    │
│  ├─ S3 Protection → オブジェクト操作の異常                   │
│  ├─ Runtime Monitoring → OS レベルの動作                     │
│  ├─ EKS Protection → Kubernetes 監査ログ                    │
│  ├─ Malware Protection → マルウェアスキャン                  │
│  ├─ RDS Protection → DB ログインの異常                       │
│  └─ Lambda Protection → Lambda のネットワーク                │
└─────────────────────────────────────────────────────────────┘