Aller au contenu
Skillpedia
Déploiement et cloud (DevOps)35k · #8204

performing-cloud-native-threat-hunting-with-aws-detective

Ce qu’il fait

Cet outil vous aide à enquêter sur les activités suspectes de votre compte Amazon Web Services (AWS). Il combine des informations de sécurité provenant de sources variées pour montrer comment un utilisateur ou un système s'est comporté dans le temps, ce qui facilite l'identification des attaques.

Quand l’utiliser

  • ✓Lorsque vous recevez une alerte de sécurité d'AWS concernant un événement inhabituel.
  • ✓Si vous soupçonnez que votre compte AWS a été compromis.
  • ✓Pour comprendre comment un attaquant s'est déplacé au sein de votre compte AWS.

Lien du skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-cloud-native-threat-hunting-with-aws-detective/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-cloud-native-threat-hunting-with-aws-detective/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Analyse ce que l'utilisateur « admin » a fait au cours des dernières 24 heures dans mon compte AWS.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil collecte et analyse automatiquement les journaux de sécurité AWS. Il crée un « graphe de comportement » qui relie ces informations, ce qui vous permet de voir la chronologie des actions des utilisateurs et des systèmes.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Performing Cloud-Native Threat Hunting with AWS Detective

Overview

AWS Detective automatically collects and analyzes log data from AWS CloudTrail, VPC Flow Logs, GuardDuty findings, and EKS audit logs to build interactive behavior graphs. These graphs enable security analysts to investigate entities (IAM users, roles, IP addresses, EC2 instances) across time, identify anomalous API calls, detect lateral movement between accounts, and correlate GuardDuty findings into coherent attack narratives — all without manual log parsing.

Prerequisites

  • AWS account with Detective enabled (requires GuardDuty active for 48+ hours)
  • AWS CLI v2 configured with appropriate IAM permissions (detective:*, guardduty:List*)
  • Python 3.9+ with boto3
  • IAM policy: AmazonDetectiveFullAccess or custom policy with detective:SearchGraph, detective:GetInvestigation, detective:ListIndicators

Key Concepts

Concept Description
Behavior Graph Data structure linking CloudTrail, VPC Flow, GuardDuty, and EKS logs for an account/region
Entity Investigable object: IAM user, IAM role, EC2 instance, IP address, S3 bucket, EKS cluster
Finding Group Correlated set of GuardDuty findings linked to the same attack campaign
Entity Profile Timeline of API calls, network connections, and resource access for a specific entity
Scope Time Investigation window (default 24h, max 1 year) for behavioral analysis

Steps

Step 1: List Available Behavior Graphs

aws detective list-graphs --output table

Step 2: Investigate a Suspicious IAM User

# Get entity profile for an IAM user
aws detective get-investigation \
  --graph-arn arn:aws:detective:us-east-1:123456789012:graph:a1b2c3d4 \
  --investigation-id 000000000000000000001

Step 3: Search Entities Programmatically

#!/usr/bin/env python3
"""Search AWS Detective for suspicious entities."""
import boto3
import json
from datetime import datetime, timedelta

detective = boto3.client('detective')

def list_behavior_graphs():
    """List all Detective behavior graphs."""
    response = detective.list_graphs()
    return response.get('GraphList', [])

def get_investigation_indicators(graph_arn, investigation_id, max_results=50):
    """Get indicators for a specific investigation."""
    response = detective.list_indicators(
        GraphArn=graph_arn,
        InvestigationId=investigation_id,
        MaxResults=max_results
    )
    return response.get('Indicators', [])

def investigate_guardduty_findings(graph_arn):
    """List high-severity investigations correlated by Detective."""
    response = detective.list_investigations(
        GraphArn=graph_arn,
        FilterCriteria={
            'Severity': {'Value': 'CRITICAL'},
            'Status': {'Value': 'RUNNING'}
        },
        MaxResults=20
    )

    for investigation in response.get('InvestigationDetails', []):
        print(f"Investigation: {investigation['InvestigationId']}")
        print(f"  Entity: {investigation['EntityArn']}")
        print(f"  Status: {investigation['Status']}")
        print(f"  Severity: {investigation['Severity']}")
        print(f"  Created: {investigation['CreatedTime']}")
        print()

if __name__ == "__main__":
    graphs = list_behavior_graphs()
    for graph in graphs:
        print(f"Graph: {graph['Arn']}")
        investigate_guardduty_findings(graph['Arn'])

Step 4: Analyze Finding Groups for Attack Campaigns

# List investigations with high severity
aws detective list-investigations \
  --graph-arn arn:aws:detective:us-east-1:123456789012:graph:a1b2c3d4 \
  --filter-criteria '{"Severity":{"Value":"HIGH"}}' \
  --max-results 10

Step 5: Check Entity Indicators

# Get indicators for a specific investigation
aws detective list-indicators \
  --graph-arn arn:aws:detective:us-east-1:123456789012:graph:a1b2c3d4 \
  --investigation-id 000000000000000000001 \
  --max-results 50

Expected Output

The list-investigations command returns investigation metadata:

{
  "InvestigationDetails": [
    {
      "InvestigationId": "000000000000000000001",
      "Severity": "CRITICAL",
      "Status": "RUNNING",
      "State": "ACTIVE",
      "EntityArn": "arn:aws:iam::123456789012:user/suspicious-user",
      "EntityType": "IAM_USER",
      "CreatedTime": "2026-03-15T14:30:00Z"
    }
  ]
}

…

Questions fréquentes

Qu'est-ce qu'un « graphe de comportement » ?

C'est une manière d'organiser les données de sécurité qui montre les liens entre les différentes activités et les utilisateurs de votre compte AWS.

Que sont les « entités » ?

Ce sont les cibles de l'enquête, comme les utilisateurs, les systèmes (instances EC2) ou les adresses IP de votre compte AWS.

Faut-il configurer quelque chose avant de l'utiliser ?

Oui, vous devez disposer d'un compte AWS avec le service Detective activé et les autorisations appropriées configurées.

Détails

Description originale de l’auteur

Investigate AWS security incidents using Amazon Detective's behavior graphs, built from CloudTrail, VPC Flow Logs, GuardDuty, and EKS audit logs, to trace entity timelines and profile IAM users, roles, EC2 instances, and IP addresses for lateral movement. Use when triaging GuardDuty findings, investigating a suspected AWS compromise, or reconstructing an attacker's activity timeline across AWS acc

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularité

Étoiles GitHub
35k
Position au classement
#8204
Licence
Apache-2.0
Mis à jour
31/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires