Skip to main content

detecting-aws-cloudtrail-anomalies

Detect unusual API call patterns in AWS CloudTrail logs using boto3, statistical baselining, and behavioral analysis to identify credential compromise, privilege escalation, and unauthorized resour...

Datos de origen

Repositorio
GrayCodeAI/starling
Última actividad en el origen
13 de julio de 2026 a las 09:28
Idioma detectado de SKILL.md
inglés
Estrellas
2
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Explorador de archivos
4 archivos

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
detecting-aws-cloudtrail-anomalies
description
Detect unusual API call patterns in AWS CloudTrail logs using boto3, statistical baselining, and behavioral analysis to identify credential compromise, privilege escalation, and unauthorized resour...
license
MIT
tags
["cloud-security","aws","cloudtrail","anomaly-detection","threat-detection"]
domain
cybersecurity
subdomain
cloud-security
version
1
author
mahipal
# 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. ## Prerequisites - Python 3.9+ with `boto3` library - 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. @ref(api-reference.md)
Ver en GitHub