detecting-aws-cloudtrail-anomalies
它能做什么
这个工具帮助你在 AWS 账户的调用日志中发现异常活动。它会查找可能说明你的凭证已被盗用,或有人在未经授权的情况下访问资源的异常模式。
适用场景
- ✓当你怀疑 AWS 凭证已被盗时。
- ✓调查对 AWS 资源的未授权访问时。
- ✓为 AWS 安全活动搭建告警系统时。
技能链接
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-aws-cloudtrail-anomalies/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 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
35k教你的 AI 智能体写出清晰、结构良好的文本。
achieving-cmmc-level-2-compliance
35k帮助你的智能体搭建符合 CMMC Level 2 合规要求的环境。它会落实安全要求,并管理必要的文档。
acquiring-disk-image-with-dd-and-dcfldd
35k帮助你的智能体创建硬盘的精确副本。这能确保调查过程中信息不丢失、不被篡改。