performing-cloud-log-forensics-with-athena

Featured

Uses AWS Athena to query CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs for forensic investigation. Covers CREATE TABLE DDL with partition projection, forensic SQL queries for detecting unauthorized access, data exfiltration, lateral movement, and privilege escalation. Use when investigating AWS security incidents or building cloud-native forensic workflows at scale.

AI & Automation 36,355 stars 4443 forks Updated 2 months ago Apache-2.0

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
75
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Performing Cloud Log Forensics with AWS Athena ## When to Use - When investigating AWS security incidents that require querying massive volumes of cloud logs - When performing forensic analysis across CloudTrail, VPC Flow Logs, S3 access logs, and ALB logs - When building reusable Athena tables with partition projection for ongoing incident response - When hunting for indicators of compromise across multiple AWS log sources simultaneously - When creating evidence-grade SQL queries for compliance audits or legal proceedings ## Prerequisites - AWS account with Athena, S3, and Glue permissions - CloudTrail configured to deliver logs to an S3 bucket - VPC Flow Logs enabled and publishing to S3 - S3 server access logging enabled on target buckets - ALB access logging enabled and publishing to S3 - Python 3.8+ with boto3 installed - Appropriate IAM permissions for Athena queries and S3 access ## Instructions ### Phase 1: Create Athena Database and CloudTrail Table Create a dedicated forensics database and CloudTrail table using partition projection to automatically discover partitions without manual ALTER TABLE statements. ```sql CREATE DATABASE IF NOT EXISTS cloud_forensics; CREATE EXTERNAL TABLE cloud_forensics.cloudtrail_logs ( eventVersion STRING, userIdentity STRUCT< type: STRING, principalId: STRING, arn: STRING, accountId: STRING, invokedBy: STRING, accessKeyId: STRING, userName: STRING, sessi...

Details

Author
mukul975
Repository
mukul975/Anthropic-Cybersecurity-Skills
Created
8 months ago
Last Updated
2 months ago
Language
Python
License
Apache-2.0

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category