detecting-aws-cloudtrail-anomalies
できること
このツールは、AWSアカウントのAPI呼び出しログの中から不審な活動を見つけるのに役立ちます。認証情報が盗まれている、または権限なしにリソースへアクセスされている可能性を示す、普段と異なるパターンを探します。
使う場面
- ✓AWSの認証情報が盗まれたと疑われるとき。
- ✓AWSリソースへの不正アクセスを調査するとき。
- ✓AWSのセキュリティ活動に関するアラートの仕組みを構築するとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-aws-cloudtrail-anomalies/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“過去24時間のAWSログから、不審な活動がないか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
まず、最近のAWS APIの呼び出しをすべて収集します。次に、誰が、どこから、どのくらいの頻度で何をしたかを観察して、通常の動作を学習します。最後に、現在の活動を通常の動作と比較し、普段と異なるものを見つけて報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Detecting AWS CloudTrail Anomalies
Overview
AWS CloudTrail records API calls across AWS services. This skill covers querying CloudTrail events with boto3's lookup_events API, building statistical baselines of normal API activity, detecting anomalies such as unusual event sources, geographic anomalies, high-frequency API calls, and first-time API usage patterns that indicate compromised credentials or insider threats.
When to Use
- When investigating security incidents that require detecting aws cloudtrail anomalies
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques
Prerequisites
- Python 3.9+ with
boto3library - AWS credentials with CloudTrail read permissions (cloudtrail:LookupEvents)
- Understanding of AWS IAM and common API patterns
- CloudTrail enabled in target AWS account (management events at minimum)
Steps
Step 1: Query CloudTrail Events
Use boto3 CloudTrail client's lookup_events to retrieve recent API activity with pagination.
Step 2: Build Activity Baseline
Aggregate events by user, source IP, event source, and event name to establish normal behavior patterns.
Step 3: Detect Anomalies
Flag unusual patterns: new event sources per user, first-time API calls, geographic IP changes, high error rates, and sensitive API usage (IAM, KMS, S3 policy changes).
Step 4: Generate Detection Report
Produce a JSON report with anomaly scores, top suspicious users, and recommended investigation actions.
Expected Output
JSON report with event statistics, baseline deviations, anomalous users/IPs, sensitive API calls, and error rate analysis.
よくある質問
AWSの「API呼び出し」とは何ですか?
サーバーの作成やファイルの保存など、AWSのサービスを操作するためにあなたや他のサービスが送るコマンドのことです。
「ベースライン」とは何を意味しますか?
通常の動作の記録のことです。普段の典型的な姿のプロファイルを作ることで、通常と異なる動きを見つけられるようにします。
このツールはどのような問題を検出できますか?
盗まれた認証情報の使用、通常より多くの権限を得ようとする行為(権限昇格)、不正なリソースへのアクセスを検出できます。
詳細
作者による元の説明
Detect unusual API call patterns in AWS CloudTrail logs using boto3, statistical baselining, and behavioral analysis to identify credential compromise, privilege escalation, and unauthorized resource access.
人気
- GitHubのスター
- 35k
- ランキング
- #7797
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。