Communitygithub.com

クラウドCISベンチマーク監査

ProwlerやScoutSuiteなどのツールを使ってAWS、Azure、GCP環境をCIS Foundations Benchmarkに対して自動スキャンし、失敗したコントロールを解釈し、継続的コンプライアンスのために改善を追跡します。クラウドセキュリティ監査、CISベンチマーク準拠確認(CIS v5 AWS、v4 Azure、v4 GCP)、継続的コンプライアンスモニタリングの設定時に使用します。

クラウドCISベンチマーク監査 とは?

このスキルは、クラウド環境をCIS Foundations Benchmarkに対して監査するための包括的なワークフローを提供します。AWS、Azure、GCPの主要クラウドプロバイダーをサポートし、ProwlerやScoutSuiteなどの自動化ツールを使用して、CISコントロールの評価、結果の解釈、改善の優先順位付けを効率的に行います。SOC 2やISO 27001などの監査前のセキュリティ評価、新規アカウントのセキュリティベースライン確立、買収した環境のセキュリティ評価など、複数のユースケースに対応します。ワークフローは、ベンチマークバージョンの選択、自動評価の実行、結果の分析、重要コントロールの改善、そしてAWS Security HubやAzure Policyを用いた継続的コンプライアンス監視の設定まで、段階的にカバーします。さらに、SOC 2監査前のCIS評価など、実際のシナリオに基づいた具体的なアプローチ方法と、改善作業時の注意点も提供し、実践的な運用を支援します。

対応~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、root | 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: rootアカウントアクセスキーが存在しないことを確認
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 "Encrypted: $bucket" || echo "FAILED: $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ベンチマークインターネットセキュリティセンター(CIS)がコミュニティの合意を通じて開発した、規範的なセキュリティ設定ガイドライン
レベル1プロファイルパフォーマンスや機能に大きな影響を与えずに実装可能な実用的なセキュリティコントロール。セキュリティ衛生を表す
レベル2プロファイル機能を制限する可能性があり、実装前に慎重な計画が必要な多層防御コントロール
FoundationsベンチマークIAM、ロギング、監視、ネットワーキング、ストレージのセキュリティをカバーする、クラウドプロバイダー向けのCISベンチマーク
コントロールID各CIS推奨事項に割り当てられた一意の数値識別子(例:1.4(rootアクセスキーの確認)、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タイプ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]   rootアカウントにアクティブなアクセスキーがある       - 3/45アカウント
  [1.5]   rootアカウントにMFAが有効化されていない              - 2/45アカウント
  [2.1.1] S3のデフォルト暗号化が有効化されていない             - 12/45アカウント
  [3.1]   CloudTrailがマルチリージョンではない                 - 8/45アカウント
  [4.3]   rootアカウント使用時のアラームがない                 - 28/45アカウント
  [5.1]   VPCフローログが有効化されていない                     - 15/45アカウント
  [5.4]   セキュリティグループが0.0.0.0/0のインバウンドを許可  - 22/45アカウント

改善優先度:
  クリティカル(7日以内に修正): rootアクセスキー、root 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,

関連スキル