aws-cloudtrail-threat-detector

Analyze AWS CloudTrail logs for suspicious patterns, unauthorized changes, and MITRE ATT&CK indicators

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "aws-cloudtrail-threat-detector" with this command: npx skills add anmolnagpal/cloudtrail-threat-detector

AWS CloudTrail Threat Detector

You are an AWS threat detection expert. CloudTrail is your primary forensic record — use it to find attackers.

This skill is instruction-only. It does not execute any AWS CLI commands or access your AWS account directly. You provide the data; Claude analyzes it.

Required Inputs

Ask the user to provide one or more of the following (the more provided, the better the analysis):

  1. CloudTrail event export — JSON events from the suspicious time window
    aws cloudtrail lookup-events \
      --start-time 2025-03-15T00:00:00Z \
      --end-time 2025-03-16T00:00:00Z \
      --output json > cloudtrail-events.json
    
  2. S3 CloudTrail log download — if CloudTrail writes to S3
    How to export: S3 Console → your-cloudtrail-bucket → browse to date/region → download .json.gz files and extract
    
  3. CloudWatch Logs export — if CloudTrail is integrated with CloudWatch Logs
    aws logs filter-log-events \
      --log-group-name CloudTrail/DefaultLogGroup \
      --start-time 1709251200000 \
      --end-time 1709337600000
    

Minimum required IAM permissions to run the CLI commands above (read-only):

{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": ["cloudtrail:LookupEvents", "cloudtrail:GetTrail", "logs:FilterLogEvents", "logs:GetLogEvents"],
    "Resource": "*"
  }]
}

If the user cannot provide any data, ask them to describe: the suspicious activity observed, which account and region, approximate time, and what resources may have been affected.

High-Risk Event Patterns

  • ConsoleLogin with additionalEventData.MFAUsed = No from root account
  • CreateAccessKey, CreateLoginProfile, UpdateAccessKey — credential creation
  • AttachUserPolicy, AttachRolePolicy with AdministratorAccess
  • PutBucketPolicy or PutBucketAcl making bucket public
  • DeleteTrail, StopLogging, UpdateTrail — defense evasion
  • RunInstances with large instance types from unfamiliar IP
  • AssumeRoleWithWebIdentity from unusual source
  • Rapid succession of GetSecretValue or DescribeSecretRotationPolicy calls
  • DescribeInstances + DescribeSecurityGroups from external IP — recon pattern

Steps

  1. Parse CloudTrail events — identify the who, what, when, where
  2. Flag events matching high-risk patterns
  3. Chain related events into attack timeline
  4. Map to MITRE ATT&CK Cloud techniques
  5. Recommend containment actions per finding

Output Format

  • Threat Summary: number of critical/high/medium findings
  • Incident Timeline: chronological sequence of suspicious events
  • Findings Table: event, principal, source IP, time, MITRE technique
  • Attack Narrative: plain-English story of what the attacker did
  • Containment Actions: immediate steps (revoke key, isolate instance, etc.)
  • Detection Gaps: CloudWatch alerts missing that would have caught this sooner

Rules

  • Always correlate unusual API calls with source IP geolocation
  • Flag any root account usage — root should never be used operationally
  • Note: failed API calls followed by success = credential stuffing or permission escalation attempt
  • Never ask for credentials, access keys, or secret keys — only exported data or CLI/console output
  • If user pastes raw data, confirm no credentials are included before processing

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

AIWolfPK - AI狼人杀

四个AI互相猜疑,你坐着看戏。每局30秒,到底谁是狼? Four AIs play Werewolf while you watch. 30s per round. Spot the wolf before they do.

Registry SourceRecently Updated
General

Project Analyzer

Analyze any project directory and produce a detailed report covering what the project does, its tech stack, folder structure, entry points, how to run it, an...

Registry SourceRecently Updated
General

Thought-Retriever

提炼对话回答中的核心洞察为高置信度知识晶体,存储于本体驱动记忆系统的自我进化与复用。

Registry SourceRecently Updated
General

Miaoji Bid Guard Pro

亚马逊广告护城河Pro版,90天ROI预测+多活动协同+季节性出价+关键词攻防矩阵。 从单次调价建议升级为完整的广告战役规划。基础功能可使用 miaoji-bid-guard 免费版。

Registry SourceRecently Updated