본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)35k · #7675

auditing-aws-s3-bucket-permissions

하는 일

이 도구는 클라우드 데이터 '보관함'(Amazon Web Services의 S3 버킷)이 안전한지 확인합니다. 지나치게 열린 접근, 잘못된 설정, 누락된 보호 장치를 찾아, 권한 있는 사람만 데이터를 볼 수 있도록 합니다.

사용하는 경우

  • ✓Amazon 계정에 대한 일반적인 보안 점검을 할 때.
  • ✓중요한 데이터가 공개적으로 노출되지 않도록 확인해야 할 때.
  • ✓새 Amazon 계정을 설정하면서 처음부터 데이터 저장소가 안전한지 확인하고 싶을 때.

스킬 링크

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/auditing-aws-s3-bucket-permissions/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/auditing-aws-s3-bucket-permissions/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“내 Amazon S3 데이터 '보관함'의 보안을 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 도구는 특정 명령을 사용해 각 데이터 '보관함'의 설정을 살펴봅니다. 누가 접근할 수 있는지, 활성화된 보호 기능이 있는지, 암호화가 켜져 있는지 분석합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Auditing AWS S3 Bucket Permissions

When to Use

  • When conducting a security assessment of AWS environments to identify publicly exposed data
  • When onboarding a new AWS account and establishing a security baseline for storage resources
  • When responding to an alert about potential S3 data exposure from AWS Trusted Advisor or Security Hub
  • When compliance frameworks (SOC 2, PCI DSS, HIPAA) require periodic review of data access controls
  • When a breach or credential compromise necessitates immediate review of all accessible S3 resources

Do not use for auditing non-AWS object storage (use provider-specific tools), for real-time monitoring (use S3 Event Notifications with Lambda), or for auditing S3 access patterns (use S3 Access Analyzer or CloudTrail S3 data events).

Prerequisites

  • AWS CLI v2 configured with credentials that have s3:GetBucketPolicy, s3:GetBucketAcl, s3:GetBucketPublicAccessBlock, s3:GetEncryptionConfiguration, and s3:ListAllMyBuckets permissions
  • Prowler installed (pip install prowler) for automated CIS benchmark checks
  • S3audit or similar enumeration tool for quick public bucket detection
  • Access to AWS Organizations if auditing across multiple accounts
  • Python 3.8+ with boto3 for custom audit scripts

Workflow

Step 1: Enumerate All S3 Buckets and Account-Level Block Public Access

Check the account-level S3 Block Public Access settings first, then list all buckets with their regions.

# Check account-level S3 Block Public Access settings
aws s3control get-public-access-block \
  --account-id $(aws sts get-caller-identity --query Account --output text) \
  --output json

# List all buckets with creation dates
aws s3api list-buckets \
  --query 'Buckets[*].[Name,CreationDate]' \
  --output table

# Get bucket regions for each bucket
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
  region=$(aws s3api get-bucket-location --bucket "$bucket" --query 'LocationConstraint' --output text)
  echo "$bucket -> ${region:-us-east-1}"
done

Step 2: Check Each Bucket's Public Access Block and ACL Configuration

Iterate through all buckets to evaluate their individual public access blocks and ACL grants.

# Check per-bucket Block Public Access settings
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
  echo "=== $bucket ==="
  aws s3api get-public-access-block --bucket "$bucket" 2>/dev/null || echo "  No Block Public Access configured"

  # Check ACL for public grants
  aws s3api get-bucket-acl --bucket "$bucket" \
    --query 'Grants[?Grantee.URI==`http://acs.amazonaws.com/groups/global/AllUsers` || Grantee.URI==`http://acs.amazonaws.com/groups/global/AuthenticatedUsers`]' \
    --output json
done

Step 3: Analyze Bucket Policies for Overly Permissive Access

Review bucket policies for wildcard principals, missing conditions, and statements that allow broad access.

# Extract and analyze bucket policies
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
  policy=$(aws s3api get-bucket-policy --bucket "$bucket" --output text 2>/dev/null)
  if [ -n "$policy" ]; then
    echo "=== $bucket policy ==="
    echo "$policy" | python3 -c "
import json, sys
policy = json.load(sys.stdin)
for stmt in policy.get('Statement', []):
    principal = stmt.get('Principal', {})
    effect = stmt.get('Effect', '')
    if principal == '*' or principal == {'AWS': '*'}:
        print(f'  WARNING: {effect} with wildcard principal')
        print(f'  Actions: {stmt.get(\"Action\", \"\")}')
        print(f'  Condition: {stmt.get(\"Condition\", \"NONE\")}')
"
  fi
done

Step 4: Verify Encryption and Versioning Settings

Check that all buckets have server-side encryption enabled and versioning configured for data protection.

# Check encryption and versioning status for all buckets
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
  echo "=== $bucket ==="

  # Encryption configuration
  aws s3api get-bucket-encryption --bucket "$bucket" 2>/dev/null \
    && echo "  Encryption: ENABLED" \
    || echo "  Encryption: DISABLED"

  # Versioning status
  aws s3api get-bucket-versioning --bucket "$bucket" \
    --query 'Status' --output text

  # Logging status
  aws s3api get-bucket-logging --bucket "$bucket" \
    --query 'LoggingEnabled' --output text 2>/dev/null
done

…

자주 묻는 질문

'S3 버킷'이란 무엇인가요?

Amazon Web Services(AWS) 클라우드에서 파일과 데이터를 저장할 수 있는 폴더, 즉 '보관함'과 같습니다.

'공개 접근'이란 무엇인가요?

계정이나 특별한 권한이 없어도 인터넷의 누구나 그 '보관함'에 저장된 데이터를 볼 수 있다는 뜻입니다.

'암호화'란 무엇인가요?

데이터를 뒤섞는 비밀 코드와 같습니다. 올바른 '열쇠'(권한)가 있는 사람만 내용을 읽을 수 있습니다.

상세 정보

작성자의 원본 설명

Systematically audit AWS S3 bucket permissions to identify publicly accessible buckets, overly permissive ACLs, misconfigured bucket policies, and missing encryption settings using AWS CLI, S3audit, and Prowler to enforce least-privilege data access controls. '

repo: mukul975/Anthropic-Cybersecurity-Skills

인기도

GitHub 스타
35k
순위
#7675
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬