AZ-500 LAB 46 ~45 phút Chương 11 MCSB · Compliance

Regulatory Compliance — MCSB Dashboard

Mở Regulatory Compliance dashboard, đọc Microsoft Cloud Security Benchmark (MCSB), drill-down vào controls và assessments bị fail, xác định resources non-compliant, thêm compliance standard tùy chỉnh và export báo cáo compliance cho kiểm toán.

🎯 Mục Tiêu Lab

Mở Regulatory Compliance dashboard và đọc tổng quan compliance status

Tìm hiểu cấu trúc Microsoft Cloud Security Benchmark (MCSB) v1

Drill-down vào các controls failed và resources non-compliant

Thêm compliance standard bổ sung (ISO 27001, PCI-DSS nếu muốn)

Export compliance report để chuẩn bị cho kiểm toán

Hiểu mối liên hệ giữa Compliance controls và Recommendations

📋 Chuẩn Bị

Yêu cầu:
  • Đã hoàn thành Lab 45 (Defender for Cloud bật)
  • Quyền Security Reader hoặc Security Admin
  • Thêm compliance standard ngoài MCSB cần Defender CSPM (trả phí)
  • Lab thiên về Portal — MCSB assessment chạy tự động
Cấu trúc MCSB v1 (12 domains):
NS — Network Security IM — Identity Management PA — Privileged Access DP — Data Protection AM — Asset Management LT — Logging & Threat IR — Incident Response PV — Posture & Vuln ES — Endpoint Security BR — Backup & Recovery DS — DevOps Security GS — Governance & Strategy

🏗️ Kịch Bản

Công ty đang chuẩn bị cho audit bảo mật nội bộ theo tiêu chuẩn Microsoft Cloud Security Benchmark. Bạn là Azure Security Engineer cần: (1) đánh giá mức độ compliance hiện tại theo MCSB, (2) xác định top controls bị fail và resources liên quan, (3) lên kế hoạch remediation ngắn hạn, (4) export compliance report để gửi cho auditor. Đây là quy trình chuẩn trong thực tế trước mỗi kỳ audit.

🧪 Các Bước Thực Hiện

1

Mở Regulatory Compliance Dashboard

Cách 1 — Portal (chính)
  1. 1.1Defender for Cloud → left menu → Regulatory compliance
  2. 1.2Đọc overview: tổng số Passed controls / Failed controls / Skipped assessments
  3. 1.3Xem các compliance standards đang được theo dõi — mặc định có Microsoft Cloud Security Benchmark
  4. 1.4Ghi nhận: % compliance score của MCSB → đây là baseline để so sánh sau remediation
Cách 2 — Azure CLI
Azure CLI— Bash / Cloud Shell
SUBSCRIPTION_ID=$(az account show --query id -o tsv)

# Xem các regulatory compliance standards đang theo dõi
az security regulatory-compliance-standards list \
  --output table \
  --query "[].{name:name, state:state, passed:passedControls, failed:failedControls, skipped:skippedControls}"
Output mẫu
Name                               State    Passed  Failed  Skipped
---------------------------------  -------  ------  ------  -------
Microsoft cloud security benchmark  Failed   38      24      12
2

Drill-down vào MCSB Controls Failed

Cách 1 — Portal (chính)
  1. 2.1Click vào "Microsoft cloud security benchmark" → xem breakdown theo 12 domains
  2. 2.2Mỗi domain hiển thị: màu đỏ = failed controls, màu xanh = passed. Click vào domain IM — Identity Management
  3. 2.3Xem controls trong domain → click control bị fail (ví dụ: IM-6: Use strong authentication controls)
  4. 2.4Mỗi control liên kết tới Assessments — click vào assessment để xem resources bị affected
  5. 2.5Ghi nhận: Control ID, Assessment name, Affected resources count → đây là nội dung báo cáo audit
Cách 2 — Azure CLI
Azure CLI— Bash / Cloud Shell
# Xem tất cả controls trong MCSB
az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --output table \
  --query "[].{control:name, state:state, passed:passedAssessments, failed:failedAssessments}"

# Xem controls bị FAIL
az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --query "[?state=='Failed'].{control:name, failed:failedAssessments, skipped:skippedAssessments}" \
  --output table

# Drill down vào 1 control cụ thể (ví dụ: IM-6)
az security regulatory-compliance-assessments list \
  --standard-name "Microsoft cloud security benchmark" \
  --control-name "IM-6" \
  --query "[].{assessment:name, state:state, description:description}" \
  --output table
3

Phân tích top controls failed theo domain

Thực hành đọc và phân tích 3 domain quan trọng nhất trong AZ-500: IM, DP và LT.

Cách 1 — Portal (chính)
Domain IM — Identity Management
  • IM-1: Use centralized identity and authentication system
  • IM-2: Protect identity and authentication systems
  • IM-6: Use strong authentication controls (MFA)
  • IM-7: Restrict resource access based on conditions (Conditional Access)
Domain DP — Data Protection
  • DP-2: Monitor anomalies and threats targeting sensitive data
  • DP-3: Encrypt sensitive data in transit
  • DP-4: Enable data at-rest encryption by default (TDE)
  • DP-5: Use customer-managed key option for data at-rest encryption
Domain LT — Logging and Threat Detection
  • LT-1: Enable threat detection capabilities (Defender plans)
  • LT-2: Enable threat detection for identity and access management
  • LT-4: Enable network logging for security investigation
Cách 2 — Azure CLI
Azure CLI— Bash / Cloud Shell
# Xem tóm tắt MCSB: failed controls theo tên
az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --query "
    [?state=='Failed'] |
    sort_by(@, &failedAssessments) |
    reverse(@) |
    [0:10] |
    [].{ControlID:name, Failed:failedAssessments, Passed:passedAssessments}
  " \
  --output table

# Xem assessments cụ thể cho DP-4 (TDE)
az security regulatory-compliance-assessments list \
  --standard-name "Microsoft cloud security benchmark" \
  --control-name "DP-4" \
  --query "[].{Assessment:name, State:state}" \
  --output table

# Xem assessments cho LT-1 (Defender plans)
az security regulatory-compliance-assessments list \
  --standard-name "Microsoft cloud security benchmark" \
  --control-name "LT-1" \
  --query "[].{Assessment:name, State:state}" \
  --output table
4

Thêm Compliance Standard bổ sung (ISO 27001 / PCI-DSS)

Lưu ý: Thêm compliance standard ngoài MCSB yêu cầu Defender CSPM plan (trả phí). Nếu chỉ dùng free tier, phần này chỉ xem — không thêm được thực sự. Có thể dùng free trial 30 ngày.
Cách 1 — Portal (chính)
  1. 4.1Regulatory compliance → "Manage compliance policies" (link ở góc trên)
  2. 4.2Click vào subscription → Security policy tab
  3. 4.3Cuộn xuống "Industry & regulatory standards" → tìm ISO 27001:2013 → toggle ON
  4. 4.4Chờ 30–60 phút → quay lại Regulatory compliance → thấy ISO 27001 xuất hiện trong dashboard
  5. 4.5So sánh: cùng một resource, compliance với MCSB vs ISO 27001 có điểm khác nhau không?
Cách 2 — Azure CLI (xem danh sách standards có sẵn)
Azure CLI— Bash / Cloud Shell
# Xem tất cả compliance standards có thể thêm (built-in)
az policy set-definition list \
  --query "[?metadata.category=='Regulatory Compliance'].{name:displayName, id:name}" \
  --output table | head -20

# Các standards phổ biến:
# - "Azure Security Benchmark"                  (MCSB)
# - "ISO 27001:2013"
# - "PCI DSS 3.2.1"
# - "NIST SP 800-53 Rev. 5"
# - "CIS Microsoft Azure Foundations Benchmark"
# - "SOC 2 Type 2"

# Nếu đã bật Defender CSPM — gán ISO 27001 initiative
ISO_ID=$(az policy set-definition list \
  --query "[?contains(displayName,'ISO 27001')].name" \
  -o tsv | head -1)

echo "ISO 27001 Policy Set ID: $ISO_ID"

# Gán vào subscription (yêu cầu Defender CSPM)
# az policy assignment create \
#   --name "iso-27001-assignment" \
#   --policy-set-definition "$ISO_ID" \
#   --scope "/subscriptions/$SUBSCRIPTION_ID"
5

Export Compliance Report cho Auditor

Cách 1 — Portal (chính)
  1. 5.1Regulatory compliance → Download report (button ở góc trên phải)
  2. 5.2Chọn format: PDF hoặc CSV → chọn standard: Microsoft Cloud Security Benchmark → Generate
  3. 5.3Report bao gồm: passed/failed controls, assessment details, resource names
  4. 5.4(Tùy chọn) Workbook: Defender for Cloud → Workbooks → "Compliance over time" để xem trend compliance theo thời gian
Cách 2 — Azure CLI (export ra JSON/CSV)
Azure CLI— Bash / Cloud Shell
# Export toàn bộ MCSB compliance data ra JSON
az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --output json > /tmp/mcsb-compliance-report.json

echo "Report saved: $(wc -l < /tmp/mcsb-compliance-report.json) lines"

# Tóm tắt nhanh: đếm passed / failed / skipped
az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --query "
  {
    total: length(@),
    passed: [?state=='Passed'] | length(@),
    failed: [?state=='Failed'] | length(@),
    skipped: [?state=='Skipped'] | length(@)
  }"

# Export assessments chi tiết cho từng control (dùng cho báo cáo đầy đủ)
CONTROLS=$(az security regulatory-compliance-controls list \
  --standard-name "Microsoft cloud security benchmark" \
  --query "[?state=='Failed'].name" -o tsv)

for ctrl in $CONTROLS; do
  echo "=== Control: $ctrl ==="
  az security regulatory-compliance-assessments list \
    --standard-name "Microsoft cloud security benchmark" \
    --control-name "$ctrl" \
    --query "[].{Assessment:name,State:state}" \
    --output table 2>/dev/null
done

🧹 Dọn Dẹp

Azure CLI
# Nếu đã gán ISO 27001 initiative, xóa assignment
# az policy assignment delete --name "iso-27001-assignment" \
#   --scope "/subscriptions/$SUBSCRIPTION_ID"

# Tắt Defender plans nếu bật ở Lab 45 và chưa tắt
az security pricing create --name VirtualMachines --tier Free
az security pricing create --name StorageAccounts --tier Free
az security pricing create --name SqlServers --tier Free

# Regulatory Compliance data (MCSB) vẫn hiển thị miễn phí
# Không cần và không thể "tắt" MCSB monitoring

📊 Kết Quả Đầu Ra Lab 46

MCSB Dashboard đọc được

Biết % compliance, số controls passed/failed, breakdown theo 12 domains

Controls failed xác định

Top controls fail trong IM, DP, LT domain được liệt kê với assessment details

Report exported

PDF/CSV hoặc JSON chứa compliance status sẵn sàng gửi auditor

Hiểu cấu trúc MCSB

12 domains, mỗi domain có controls, mỗi control mapped tới assessments/recommendations

❓ Câu Hỏi Ôn Tập

1. MCSB (Microsoft Cloud Security Benchmark) là gì? Nó thay thế cái gì trước đó?

Gợi ý: MCSB v1 (2022) thay thế Azure Security Benchmark (ASB) v3. MCSB là multi-cloud framework, áp dụng cả Azure, AWS, GCP. Dựa trên CIS Controls, NIST SP 800-53.

2. Control "Failed" trong MCSB nghĩa là gì? Có ảnh hưởng gì đến Secure Score không?

Gợi ý: Có ít nhất 1 assessment bên dưới control bị Unhealthy. Compliance score và Secure Score được tính riêng nhưng từ cùng assessment data — cải thiện 1 sẽ ảnh hưởng cả 2.

3. Tại sao cần Defender CSPM plan để thêm ISO 27001 / PCI-DSS? Free tier không hỗ trợ sao?

Gợi ý: Free tier chỉ bao gồm MCSB monitoring. Defender CSPM ($0.007/resource/hr) mở thêm: attack path analysis, Cloud Security Explorer, thêm nhiều compliance standards, governance rules.

4. "Skipped" assessments trong compliance report nghĩa là gì? Có nên lo lắng về chúng không?

Gợi ý: Skipped = not evaluated (resource loại này không áp dụng, hoặc thiếu data để đánh giá). Không phải fail nhưng cần review để đảm bảo không phải "exempt" sai.

5. Mối liên hệ giữa Regulatory Compliance controls và Azure Policy là gì?

Gợi ý: Mỗi MCSB control được backed bởi 1 hoặc nhiều Azure Policy definitions. Khi policy assessment = Non-compliant → control = Failed. Compliance dashboard là aggregated view của policy assessments.

Lab 45: Defender Secure Score Thư viện Labs Lab 47: Defender for Servers
Zalo