Communitygithub.com

CIS 벤치마크를 통한 클라우드 감사

Prowler 및 ScoutSuite와 같은 도구를 사용하여 AWS, Azure, GCP 환경을 CIS Foundations 벤치마크에 대해 자동 스캔하고, 실패한 컨트롤을 해석하며, 지속적 컴플라이언스를 위한 문제 해결을 추적합니다. 클라우드 보안 감사 수행, CIS 벤치마크 준수 확인(CIS v5 AWS, v4 Azure, v4 GCP), 또는 지속적인 클라우드 컴플라이언스 모니터링 구축 시 사용하세요.

CIS 벤치마크를 통한 클라우드 감사란 무엇인가요?

이 스킬은 Prowler 및 ScoutSuite와 같은 자동화된 스캔 도구를 사용하여 AWS, Azure, GCP 환경을 CIS Foundations 벤치마크(v5.0 AWS, v4.0 Azure, v4.0 GCP)에 대해 감사하는 방법을 설명합니다. 주요 워크플로는 적절한 CIS 벤치마크 버전 선택, 포괄적인 평가 실행, 결과 해석 및 우선순위 지정, 실패한 컨트롤 수정, 지속적 컴플라이언스 모니터링 설정의 5단계로 구성됩니다. SOC 2, ISO 27001과 같은 규제 감사, 신규 클라우드 계정의 보안 기준 설정, 또는 인수한 환경의 보안 상태 평가에 특히 유용합니다. 이 스킬은 수정을 위한 읽기 전용 액세스 권한과 CIS 벤치마크 구조(레벨 1 및 레벨 2 프로필)에 대한 이해가 필요하며, 런타임 위협 탐지나 애플리케이션 수준 보안 테스트에는 적합하지 않습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/auditing-cloud-with-cis-benchmarks

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

CIS 벤치마크를 통한 클라우드 감사은(는) 무엇을 하나요?

사용 시기

  • 업계 표준 벤치마크에 대한 클라우드 환경 초기 보안 감사 수행 시
  • CIS 컨트롤을 참조하는 SOC 2, ISO 27001 또는 규제 감사 준비 시
  • 신규 클라우드 계정 또는 구독에 대한 측정 가능한 보안 기준 설정 시
  • 정기적인 재평가를 통한 컴플라이언스 개선 추적 시
  • 인수하거나 상속받은 클라우드 환경의 보안 상태 평가 시

다음 경우에는 사용하지 마십시오: 런타임 위협 탐지(detecting-cloud-threats-with-guardduty 참조), 애플리케이션 수준 보안 테스트(conducting-cloud-penetration-testing 참조), 또는 CIS 기반이 아닌 컴플라이언스 프레임워크(특정 규제 스킬 파일 참조).

사전 요구 사항

  • 대상 클라우드 계정에 대한 읽기 전용 액세스(AWS SecurityAudit 정책, Azure Reader 역할, GCP Viewer 역할)
  • Prowler, ScoutSuite 또는 클라우드 네이티브 CSPM 도구가 설치 및 구성되어 있어야 함
  • CIS 벤치마크 구조(섹션, 컨트롤, 프로필(레벨 1 및 레벨 2))에 대한 이해
  • 수정 사항 구현을 위한 수정 액세스(감사 자격 증명과 별도)

워크플로

1단계: 적절한 CIS 벤치마크 버전 선택

각 클라우드 제공업체에 맞는 올바른 벤치마크 버전을 선택하십시오. 2025년 기준 최신 버전은 CIS AWS Foundations Benchmark v5.0, CIS Azure Foundations Benchmark v4.0, CIS GCP Foundations Benchmark v4.0입니다.

CIS 벤치마크 적용 범위:
+-------------------+-------------------------+------------------------+
| 섹션              | AWS v5.0                | Azure v4.0             |
+-------------------+-------------------------+------------------------+
| ID 및 액세스      | IAM 정책, MFA, 루트     | Azure AD, RBAC, PIM    |
| 로깅              | CloudTrail, Config      | 활동 로그, 진단 설정   |
| 모니터링          | CloudWatch 알람        | Defender, Sentinel     |
| 네트워킹          | VPC, SG, NACL          | NSG, ASG, 방화벽       |
| 스토리지          | S3 암호화, 액세스      | 스토리지 암호화        |
| 데이터베이스      | RDS 암호화             | SQL TDE, 감사          |
+-------------------+-------------------------+------------------------+

CIS 프로필 레벨:
  레벨 1: 성능에 큰 영향을 주거나 기능을 저하시키지 않으면서 구현할 수 있는 실용적인 보안 설정
  레벨 2: 기능을 제한하거나 구현을 위한 추가 계획이 필요할 수 있는 심층 방어 설정

2단계: Prowler로 자동 평가 실행

Prowler를 사용하여 AWS, Azure, GCP 전반에 걸쳐 포괄적인 CIS 벤치마크 스캔을 실행하여 컨트롤을 자동 평가합니다.

# AWS CIS v5.0 평가
prowler aws \
  --compliance cis_5.0_aws \
  --profile audit-account \
  --output-formats json-ocsf,html,csv \
  --output-directory ./cis-audit-$(date +%Y%m%d)

# Azure CIS v4.0 평가
prowler azure \
  --compliance cis_4.0_azure \
  --subscription-ids "sub-id-1,sub-id-2" \
  --output-formats json-ocsf,html,csv \
  --output-directory ./cis-audit-azure-$(date +%Y%m%d)

# GCP CIS v4.0 평가
prowler gcp \
  --compliance cis_4.0_gcp \
  --project-ids "project-1,project-2" \
  --output-formats json-ocsf,html,csv \
  --output-directory ./cis-audit-gcp-$(date +%Y%m%d)

# ScoutSuite를 사용한 다중 계정 AWS 스캔
scout suite aws \
  --profile audit-account \
  --report-dir ./scout-report \
  --ruleset cis-5.0 \
  --force

3단계: 결과 해석 및 수정 우선순위 지정

섹션 및 심각도별로 감사 결과를 분석합니다. 먼저 기본 보안 위생을 나타내는 레벨 1 컨트롤의 우선순위를 지정한 다음, 심층 방어를 위해 레벨 2 컨트롤을 처리합니다.

# 실패한 컨트롤에 대한 Prowler 결과 파싱
cat ./cis-audit-*/prowler-output-*.json | \
  jq '[.[] | select(.StatusExtended == "FAIL")] | group_by(.CheckID) |
  map({control: .[0].CheckID, description: .[0].CheckTitle,
  failed_resources: length, severity: .[0].Severity}) |
  sort_by(-.failed_resources)'

# 섹션별 컴플라이언스 점수 생성
cat ./cis-audit-*/prowler-output-*.json | \
  jq 'group_by(.Section) | map({
    section: .[0].Section,
    total: length,
    passed: [.[] | select(.StatusExtended == "PASS")] | length,
    failed: [.[] | select(.StatusExtended == "FAIL")] | length,
    score: (([.[] | select(.StatusExtended == "PASS")] | length) / length * 100 | round)
  })'

4단계: 중요 및 높은 수준의 컨트롤 수정

영향이 큰 항목부터 시작하여 실패한 컨트롤을 해결합니다. AWS Config 수정, Azure Policy 또는 Terraform을 사용하여 체계적으로 수정 사항을 적용합니다.

# CIS 1.4: 루트 계정 액세스 키가 없는지 확인
aws iam list-access-keys --user-name root
# 키가 있으면 삭제
aws iam delete-access-key --user-name root --access-key-id AKIAEXAMPLE

# CIS 2.1.1: S3 버킷 기본 암호화가 활성화되어 있는지 확인
for bucket in $(aws s3api list-buckets --query 'Buckets[*].Name' --output text); do
  aws s3api put-bucket-encryption --bucket "$bucket" \
    --server-side-encryption-configuration '{
      "Rules": [{"ApplyServerSideEncryptionByDefault": {"SSEAlgorithm": "AES256"}}]
    }' 2>/dev/null && echo "암호화됨: $bucket" || echo "실패: $bucket"
done

# CIS 3.1: 모든 리전에서 CloudTrail이 활성화되어 있는지 확인
aws cloudtrail create-trail \
  --name organization-trail \
  --s3-bucket-name cloudtrail-logs-bucket \
  --is-multi-region-trail \
  --enable-log-file-validation \
  --kms-key-id arn:aws:kms:us-east-1:123456789012:key/key-id

aws cloudtrail start-logging --name organization-trail

# CIS 4.x: CloudWatch 메트릭 필터 및 알람 구성
aws logs put-metric-filter \
  --log-group-name CloudTrail/DefaultLogGroup \
  --filter-name UnauthorizedAPICalls \
  --filter-pattern '{ ($.errorCode = "*UnauthorizedAccess*") || ($.errorCode = "AccessDenied*") }' \
  --metric-transformations metricName=UnauthorizedAPICalls,metricNamespace=CISBenchmark,metricValue=1

5단계: 지속적 컴플라이언스 모니터링 구축

정기적인 감사 사이에 구성 드리프트를 감지하기 위해 자동화된 컴플라이언스 모니터링을 배포합니다. AWS Security Hub, Azure Policy 또는 GCP Security Command Center를 사용합니다.

# AWS: Security Hub에서 CIS v5.0 활성화
aws securityhub batch-enable-standards \
  --standards-subscription-requests '[
    {"StandardsArn": "arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/5.0.0"}
  ]'

# Azure: CIS 벤치마크 정책 이니셔티브 할당
az policy assignment create \
  --name cis-azure-benchmark \
  --scope "/subscriptions/<sub-id>" \
  --policy-set-definition "1a5bb27d-173f-493e-9568-eb56638dbd0e" \
  --params '{"effect": {"value": "AuditIfNotExists"}}'

# 주기적인 Prowler 평가 예약
# cron 또는 CI/CD 파이프라인을 통해 매주 실행
0 2 * * 1 prowler aws --compliance cis_5.0_aws --output-formats csv --output-directory /opt/audits/weekly-$(date +\%Y\%m\%d)

주요 개념

용어정의
CIS 벤치마크Center for Internet Security에서 커뮤니티 합의를 통해 개발한 규범적 보안 구성 지침
레벨 1 프로필성능이나 기능에 큰 영향을 주지 않으면서 구현 가능한 실용적인 보안 컨트롤, 보안 위생을 나타냄
레벨 2 프로필기능을 제한할 수 있고 구현 전 신중한 계획이 필요한 심층 방어 컨트롤
Foundations 벤치마크IAM, 로깅, 모니터링, 네트워킹, 스토리지 보안을 다루는 클라우드 제공업체 전용 CIS 벤치마크
컨트롤 ID각 CIS 권장 사항에 대한 고유 숫자 식별자 (예: 1.4(루트 액세스 키 확인), 2.1.1(S3 암호화))
컴플라이언스 점수통과 상태인 CIS 컨트롤의 백분율, 시간 경과에 따른 보안 상태 개선 측정을 위해 추적됨
자동 평가벤치마크 요구 사항에 대한 리소스 구성을 확인하기 위해 클라우드 제공업체 API를 사용한 도구 기반 CIS 컨트롤 평가
수정 런북사전 확인 및 검증을 포함하여 특정 실패한 CIS 컨트롤을 수정하기 위한 문서화된 단계별 절차

도구 및 시스템

  • Prowler: AWS, Azure, GCP에 대한 CIS 벤치마크 평가를 포함하여 300개 이상의 검사를 수행하는 오픈소스 클라우드 보안 도구
  • ScoutSuite: CIS 벤치마크 규칙 세트로 HTML 보고서를 생성하는 멀티 클라우드 보안 감사 도구
  • AWS Security Hub: 보안 표준으로 CIS AWS Foundations Benchmark를 지원하는 네이티브 AWS 서비스
  • Azure Policy: 자동화된 컴플라이언스 모니터링을 위한 기본 제공 CIS 벤치마크 정책 이니셔티브가 있는 거버넌스 서비스
  • GCP Security Command Center: CIS GCP Foundations Benchmark에 대한 구성을 평가하는 네이티브 GCP 서비스

일반적인 시나리오

시나리오: SOC 2 인증을 위한 사전 감사 CIS 평가

컨텍스트: SOC 2 Type II 인증을 추진하는 SaaS 회사는 CIS 벤치마크에 부합하는 클라우드 보안 컨트롤을 입증해야 합니다. 감사자는 45개 AWS 계정에 걸친 지속적인 컴플라이언스 모니터링 증거를 요구합니다.

접근 방식:

  1. 모든 45개 계정에서 Prowler CIS v5.0 평가를 실행하여 기준 컴플라이언스 점수를 설정합니다.
  2. 결과를 CSV로 내보내고 섹션(IAM, 로깅, 모니터링, 네트워킹)별로 실패를 분류합니다.
  3. 각 CIS 컨트롤을 관련 SOC 2 신뢰 서비스 기준(CC6.1, CC6.6, CC7.1 등)에 매핑합니다.
  4. 모든 레벨 1 컨트롤 실패는 30일 이내, 레벨 2는 60일 이내에 수정합니다.
  5. 지속적인 모니터링 및 자동 드리프트 탐지를 위해 AWS Security Hub에서 CIS v5.0을 활성화합니다.
  6. 감사자에게 개선 추세를 보여주는 주간 컴플라이언스 보고서를 생성합니다.
  7. 위험 수용 사유와 함께 의도적으로 구현하지 않은 컨트롤에 대한 예외 사항을 문서화합니다.

함정: 스테이징 환경에서 먼저 테스트하지 않고 컨트롤을 수정하면 프로덕션 워크로드가 중단될 수 있습니다. 레벨 2 컨트롤을 완전히 무시하면 엄격히 요구되지 않더라도 감사 내러티브가 약화됩니다.

출력 형식

CIS 벤치마크 감사 보고서
============================
클라우드 제공업체: AWS
벤치마크 버전: CIS AWS Foundations Benchmark v5.0
평가 계정 수: 45
평가 날짜: 2025-02-23
도구: Prowler v4.3.0

전체 컴플라이언스 점수: 74%

섹션별 컴플라이언스:
  1. ID 및 액세스 관리:      68% (60개 컨트롤 중 41개 통과)
  2. 스토리지:                82% (34개 컨트롤 중 28개 통과)
  3. 로깅:                    91% (22개 컨트롤 중 20개 통과)
  4. 모니터링:                55% (33개 컨트롤 중 18개 통과)
  5. 네트워킹:                78% (41개 컨트롤 중 32개 통과)

가장 많이 실패한 컨트롤 (영향을 받는 계정 수 기준):
  [1.4]   루트 계정에 활성 액세스 키 있음                - 3/45 계정
  [1.5]   루트 계정에 MFA 활성화되지 않음                 - 2/45 계정
  [2.1.1] S3 기본 암호화 활성화되지 않음                  - 12/45 계정
  [3.1]   CloudTrail이 멀티 리전이 아님                   - 8/45 계정
  [4.3]   루트 계정 사용에 대한 알람 없음                 - 28/45 계정
  [5.1]   VPC 흐름 로그 활성화되지 않음                   - 15/45 계정
  [5.4]   보안 그룹이 0.0.0.0/0 인그레스 허용            - 22/45 계정

수정 우선순위:
  위급 (7일 이내 수정):  루트 액세스 키, 루트 MFA 누락
  높음 (30일 이내 수정): S3 암호화, CloudTrail, VPC 흐름 로그
  중간 (60일 이내 수정): CloudWatch 알람, 보안 그룹 제한
  낮음 (90일 이내 수정): 레벨 2 컨트롤, 정보 제공 항목

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-active-directory-acl-abuse

Detect dangerous ACL misconfigurations in Active Directory using ldap3

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

관련 스킬