La interfaz está localizada; las descripciones y documentos de las Skills se traducen automáticamente con IA a su idioma. El código, los comandos, rutas y términos técnicos se mantienen en el original, y prevalece el documento del autor.
Explorar Skills
Productividad · SKILL.md

detecting-aws-cloudtrail-anomalies

detecting-aws-cloudtrail-anomalies

使用 boto3、统计基线和行为分析检测 AWS CloudTrail 日志中的异常 API 调用模式,以识别凭据入侵、权限提升和未授权资源访问。

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentación de la Skill

GitHub

name: detecting-aws-cloudtrail-anomalies description: 使用 boto3、统计基线和行为分析检测 AWS CloudTrail 日志中的异常 API 调用模式,以识别凭据入侵、权限提升和未授权资源访问。 domain: cybersecurity subdomain: cloud-security tags: [cloud-security, aws, cloudtrail, anomaly-detection, threat-detection, boto3] version: "1.0" author: mahipal license: Apache-2.0

检测 AWS CloudTrail 异常

概述

AWS CloudTrail 记录跨 AWS 服务的 API 调用。本 skill 涵盖使用 boto3 的 lookup_events API 查询 CloudTrail 事件、构建正常 API 活动的统计基线、检测异常(如不寻常的事件来源、地理位置异常、高频 API 调用以及首次 API 使用模式),这些模式可指示凭据入侵或内部威胁。

前置条件

  • Python 3.9+ 及 boto3 库
  • 具有 CloudTrail 读取权限(cloudtrail:LookupEvents)的 AWS 凭据
  • 了解 AWS IAM 和常见 API 模式
  • 在目标 AWS 账户中启用了 CloudTrail(至少管理事件)

工作流程

步骤 1:查询 CloudTrail 事件

使用 boto3 CloudTrail 客户端的 lookup_events 通过分页检索最近的 API 活动。

步骤 2:构建活动基线

按用户、源 IP、事件来源和事件名称聚合事件,以建立正常行为模式。

步骤 3:检测异常

标记异常模式:每个用户的新事件来源、首次 API 调用、地理 IP 变化、高错误率以及敏感 API 使用(IAM、KMS、S3 策略变更)。

步骤 4:生成检测报告

生成包含异常评分、最可疑用户和建议调查操作的 JSON 报告。

输出格式

包含事件统计、基线偏差、异常用户/IP、敏感 API 调用和错误率分析的 JSON 报告。

Skills guardadas