CISSP · Domain 3 · 13%

Kiến trúc & Kỹ thuật bảo mật

Security Architecture & Engineering — Domain 3

Domain bao phủ các mô hình bảo mật học thuật (Bell-LaPadula, Biba), khung kiến trúc doanh nghiệp (SABSA, TOGAF), nguyên lý thiết kế bảo mật, phần cứng tin cậy (TPM/HSM), và bảo mật vật lý. Tư duy kiến trúc — bảo mật được xây dựng vào thiết kế, không phải thêm vào sau.

Mục tiêu chương / Learning objectives

1. Lý thuyết cốt lõi / Core theory

1.1. Các mô hình bảo mật học thuật (Security models)

CISSP yêu cầu hiểu sâu 4 mô hình bảo mật nền tảng:

Bell-LaPadula (BLP) — Confidentiality Model

Hai quy tắc: Simple Security Property (SS-property / "no read up"): Subject không được đọc object ở level cao hơn. *-property (Star / "no write down"): Subject không được ghi xuống level thấp hơn. Ví dụ: Mật ở mức Secret không thể đọc tài liệu Top Secret, và không thể sao chép tài liệu Secret vào file Unclassified. Dùng trong hệ thống quân sự, chính phủ.

Biba — Integrity Model

Hai quy tắc ngược BLP: "No read down": Không đọc dữ liệu có integrity thấp hơn (tránh nhiễm bẩn). "No write up": Không ghi lên object có integrity cao hơn (tránh làm ô nhiễm dữ liệu đáng tin). Ví dụ: Kế toán junior không được sửa báo cáo tài chính cuối năm (integrity cao hơn level của họ).

Clark-Wilson — Commercial Integrity Model

Thiết kế cho môi trường thương mại. Sử dụng: CDI (Constrained Data Items — dữ liệu được kiểm soát), UDI (Unconstrained), IVP (Integrity Verification Procedures), TP (Transformation Procedures). Nguyên lý: chỉ truy cập CDI thông qua TP đã được phê duyệt — giống separation of duties trong accounting.

Brewer-Nash (Chinese Wall) — Conflict of Interest

Ngăn conflict of interest bằng cách tạo "information barrier" động. Một consultant tư vấn cho Coca-Cola không thể đồng thời truy cập thông tin của PepsiCo. Barrier thay đổi dựa trên lịch sử truy cập — mô hình phù hợp với hãng luật, tư vấn tài chính, audit firm.

Mô hình Trọng tâm Quy tắc cốt lõi Ứng dụng thực tế
Bell-LaPadula Confidentiality No read up · No write down Hệ thống quân sự, phân loại tài liệu chính phủ
Biba Integrity No read down · No write up Hệ thống tài chính, phòng ngừa nhập dữ liệu không tin cậy
Clark-Wilson Integrity thương mại Well-formed transactions, CDI chỉ truy cập qua TP ERP, accounting systems, separation of duties
Brewer-Nash Conflict of interest Dynamic information barrier dựa trên lịch sử truy cập Hãng luật, tư vấn tài chính, audit firm

CISSP Exam Tip: Nhớ nhanh: BLP = "nọc độc chảy lên" (confidentiality — data không leo thang lên cao, không rỉ xuống thấp). Biba = ngược BLP hoàn toàn (integrity — không đọc data tệ hơn mình, không viết vào data tốt hơn mình). Clark-Wilson = thương mại có kiểm soát quy trình. Brewer-Nash = "Chinese Wall" ngăn conflict of interest. Đề thi CISSP hay dùng tình huống để hỏi mô hình nào phù hợp.

1.2. Khung kiến trúc bảo mật doanh nghiệp (Enterprise security architecture)

Ba khung kiến trúc phổ biến trong CISSP:

1.3. Nguyên lý thiết kế bảo mật (Security design principles — Saltzer & Schroeder)

8 nguyên lý kinh điển từ Saltzer & Schroeder (1975) — vẫn là nền tảng của thiết kế bảo mật hiện đại:

Least Privilege: Chỉ cấp quyền tối thiểu cần thiết để thực hiện nhiệm vụ.
Fail-Safe Defaults: Trạng thái mặc định là từ chối — explicit permit, không phải explicit deny.
Economy of Mechanism: Thiết kế đơn giản — phức tạp = nhiều attack surface.
Complete Mediation: Mọi truy cập phải được kiểm tra mỗi lần — không cache authorization.
Open Design: Bảo mật không phụ thuộc vào bí mật của thiết kế (Kerckhoffs's principle).
Separation of Privilege: Cần nhiều điều kiện/người phê duyệt cho thao tác quan trọng.
Least Common Mechanism: Tối thiểu hóa cơ chế dùng chung giữa các user — giảm side-channel.
Psychological Acceptability: Interface bảo mật phải dễ dùng — complexity dẫn đến bypass.

1.4. Phần cứng bảo mật tin cậy (Trusted hardware: TPM, HSM, Secure Enclave)

TCB (Trusted Computing Base) là tập hợp tất cả phần cứng, firmware, và phần mềm chịu trách nhiệm thực thi chính sách bảo mật. TCB càng nhỏ càng tốt (economy of mechanism). Reference Monitor là khái niệm trừu tượng kiểm soát mọi truy cập — phải: always invoked, tamperproof, verifiable.

Side-Channel Attacks: Tấn công khai thác thông tin rò rỉ từ quá trình thực thi (không phải từ input/output trực tiếp). Timing attack: đo thời gian thực thi để suy ra key. Power analysis (SPA/DPA): đo tiêu thụ điện của thiết bị crypto. Cold boot attack: đọc nội dung RAM sau khi tắt nguồn đột ngột — key encryption còn lưu trong RAM. Countermeasures: constant-time algorithms, memory encryption, key scrubbing on shutdown.

1.5. Bảo mật vật lý & Triển khai mật mã (Physical security & cryptographic implementation)

Physical security defense-in-depth từ ngoài vào trong:

Cryptographic best practices cho CISSP: AES-256 cho symmetric, RSA-2048+ hoặc ECC-256+ cho asymmetric, SHA-256+ cho hash. Perfect Forward Secrecy (PFS) — mỗi session dùng ephemeral key riêng; compromise long-term key không decrypt được session cũ. TLS 1.3 bắt buộc PFS (ECDHE). Cloud shared responsibility: customer quản lý keys (Customer-Managed Keys/BYOK), CSP quản lý infrastructure encryption.

1.6. Mật mã hậu lượng tử (Post-Quantum Cryptography)

Máy tính lượng tử đủ mạnh sẽ phá vỡ RSA và ECC bằng thuật toán Shor — toàn bộ nền tảng PKI hiện tại sẽ lỗi thời. NIST đã hoàn thiện các tiêu chuẩn mật mã hậu lượng tử đầu tiên vào năm 2024:

Mối đe dọa "Harvest Now, Decrypt Later"

Các đối thủ quốc gia (nation-state adversaries) đang thu thập và lưu trữ encrypted traffic hiện tại với kỳ vọng giải mã trong tương lai khi máy tính lượng tử đủ mạnh. Dữ liệu bí mật có vòng đời dài (10-20 năm) như thiết kế vũ khí, kế hoạch ngoại giao, bí mật thương mại — đặc biệt nguy hiểm vì vẫn còn giá trị khi bị giải mã trong tương lai.

Timeline ước tính: "Cryptographically Relevant Quantum Computer" (CRQC) có thể khả dụng trong 10-15 năm — migration phải bắt đầu ngay hôm nay.

Crypto-agility — khả năng thay thế thuật toán mã hóa mà không cần re-architect toàn bộ hệ thống:

CISSP Angle: Đề thi CISSP đang tích hợp PQC vào domain Cryptography và Enterprise Architecture Planning. Câu hỏi điển hình: "CISO cần làm gì NGAY HÔM NAY để chuẩn bị cho mối đe dọa lượng tử?" → Đáp án: inventory cryptographic usage, adopt crypto-agility, prioritize migration cho data có classification cao và vòng đời dài, monitor NIST PQC standards. Không phải: "chờ đến khi máy tính lượng tử thực sự tồn tại."

2. Bài thực hành / Hands-on labs

🖥️ Platform: Windows 11 Pro/Enterprise · Ubuntu 22.04
🛠️ Tools: PowerShell 7 · Bash · openssl · curl

Lab 1 — TPM & Secure Boot Audit (PowerShell)

OS: Windows 11 Pro/Enterprise · Tool: PowerShell 7 (Run as Administrator)

# === TRUSTED HARDWARE & SECURE BOOT AUDIT ===

Write-Host "=== TPM Status ===" -ForegroundColor Cyan
$tpm = Get-Tpm
$tpm | Select-Object TpmPresent, TpmReady, TpmEnabled, TpmActivated,
    TpmOwned, RestartPending, ManufacturerId | Format-List

Write-Host "`n=== Secure Boot State ===" -ForegroundColor Cyan
try {
    $secureBoot = Confirm-SecureBootUEFI
    Write-Host "Secure Boot: $(if($secureBoot){'ENABLED [OK]'}else{'DISABLED [RISK]'})" `
        -ForegroundColor $(if($secureBoot){"Green"}else{"Red"})
} catch {
    Write-Host "Secure Boot check not supported on this hardware" -ForegroundColor Yellow
}

Write-Host "`n=== BitLocker Volume Encryption Status ===" -ForegroundColor Cyan
Get-BitLockerVolume | Select-Object MountPoint, VolumeType,
    EncryptionMethod, VolumeStatus, ProtectionStatus,
    @{N='KeyProtectors';E={$_.KeyProtector.KeyProtectorType -join ', '}} |
    Format-Table -AutoSize

Write-Host "`n=== BitLocker Protector Types ===" -ForegroundColor Cyan
Get-BitLockerVolume | ForEach-Object {
    Write-Host "  Drive $($_.MountPoint):" -ForegroundColor Yellow
    $_.KeyProtector | ForEach-Object {
        Write-Host "    - $($_.KeyProtectorType): $($_.KeyProtectorId)" -ForegroundColor White
    }
}

Write-Host "`n=== UEFI Secure Boot Policy ===" -ForegroundColor Cyan
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\SecureBoot\State" `
    -ErrorAction SilentlyContinue | Select-Object UEFISecureBootEnabled

Write-Host "`n=== Virtualization-Based Security (VBS/HVCI) ===" -ForegroundColor Cyan
$vbs = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" `
    -ErrorAction SilentlyContinue
$vbs | Select-Object EnableVirtualizationBasedSecurity,
    RequirePlatformSecurityFeatures, HypervisorEnforcedCodeIntegrity | Format-List

✅ Kết quả mong đợi: TPM: TpmPresent=True, TpmReady=True, TpmEnabled=True. SecureBoot: ENABLED. BitLocker: EncryptionMethod=XtsAes256, ProtectionStatus=On, KeyProtectors bao gồm TpmPin hoặc TpmStartupKey. VBS enabled — Credential Guard bảo vệ NTLM hashes khỏi Pass-the-Hash attacks. Bất kỳ trạng thái "disabled" nào đều là security gap cần remediate.

Lab 2 — Security Architecture Review: Cipher Suites & Security Headers (Bash)

OS: Ubuntu 22.04 · Tool: Bash + openssl + curl

#!/bin/bash
# === SECURITY ARCHITECTURE REVIEW ===

echo "=== 1. System Hardware Security Info ==="
sudo dmidecode -t 1 2>/dev/null | grep -E "Manufacturer|Product|Version"

echo -e "\n=== 2. Secure Boot Status (Linux) ==="
if command -v mokutil &>/dev/null; then
    mokutil --sb-state 2>/dev/null
else
    [ -d /sys/firmware/efi ] && echo "UEFI boot detected" || echo "Legacy BIOS"
    cat /sys/class/tpm/tpm0/device/description 2>/dev/null || echo "TPM: check /sys/class/tpm"
fi

echo -e "\n=== 3. Disk Encryption Status ==="
lsblk -o NAME,TYPE,FSTYPE,MOUNTPOINT,SIZE | grep -v loop
sudo dmsetup status 2>/dev/null | grep -i crypt

echo -e "\n=== 4. Strong Cipher Suites (HIGH, no weak) ==="
openssl ciphers -v 'TLSv1.3' 2>/dev/null | head -10
echo "---"
openssl ciphers -v 'HIGH:!aNULL:!MD5:!RC4:!DES:!3DES' 2>/dev/null | head -10

echo -e "\n=== 5. TLS Security Check against target ==="
TARGET="google.com"
echo | openssl s_client -connect ${TARGET}:443 -tls1_3 2>/dev/null | \
    grep -E "Protocol|Cipher|Verify return"

echo -e "\n=== 6. HTTP Security Headers Check ==="
curl -sI https://${TARGET} | grep -E \
    "Strict-Transport|X-Frame-Options|Content-Security|X-Content-Type|Referrer-Policy"

echo -e "\n=== 7. Certificate Chain Validation ==="
echo | openssl s_client -connect ${TARGET}:443 2>/dev/null | \
    openssl x509 -noout -subject -issuer -dates -fingerprint 2>/dev/null

✅ Kết quả mong đợi: TLS 1.3 với cipher TLS_AES_256_GCM_SHA384 hoặc TLS_CHACHA20_POLY1305_SHA256. Security headers: HSTS (max-age≥31536000), X-Frame-Options: DENY, Content-Security-Policy hiện diện. Certificate: Verify return code 0 (ok). Nếu site vẫn hỗ trợ TLS 1.0/1.1 → vi phạm PCI-DSS 4.0. Thiếu HSTS → susceptible to SSL stripping.

3. Tình huống doanh nghiệp / Enterprise scenario

Bối cảnh:

Ngân hàng TechBank Vietnam muốn xây dựng hệ thống core banking mới trên hybrid cloud. Board yêu cầu: dữ liệu khách hàng không được lưu cleartext bất kỳ đâu; keys phải do ngân hàng kiểm soát (không phải cloud provider); hệ thống phải pass PCI-DSS Level 1 và SWIFT CSP audit.

Giải pháp kiến trúc SABSA-based:

  1. Contextual layer (Business): Risk appetite = Zero tolerance cho data breach. Business driver: regulatory compliance + customer trust.
  2. Conceptual layer: Áp dụng Bell-LaPadula cho phân loại dữ liệu: transaction data (Secret), customer PII (Confidential), public rates (Unclassified).
  3. Logical layer: Zero Trust architecture — không implicit trust ngay cả internal network. mTLS giữa microservices. Policy-based access via OPA (Open Policy Agent).
  4. Physical layer: HSM on-premise (Thales/SafeNet) cho key management. BYOK (Bring Your Own Key) với Azure/AWS — cloud chỉ thấy encrypted data. TPM-based attestation cho server provisioning.
  5. Fail-safe defaults: API gateway từ chối mọi request không có valid mTLS cert — whitelist approach.

Bài học: Kiến trúc bảo mật phải bắt đầu từ business requirements (SABSA), không phải từ công nghệ. TCB càng nhỏ càng dễ verify và audit.

4. Tự kiểm tra / CISSP-style knowledge check

  1. Hệ thống quân sự phân loại tài liệu theo Top Secret/Secret/Confidential. Áp dụng mô hình Bell-LaPadula: một người dùng có clearance "Secret" muốn đọc file "Top Secret" — cho phép hay từ chối, theo quy tắc nào?
  2. Kế toán của công ty cần nhập hóa đơn từ vendor email (nguồn không tin cậy) vào hệ thống ERP (integrity cao). Mô hình Biba hay Clark-Wilson phù hợp hơn để kiểm soát? Tại sao?
  3. Nguyên lý "Fail-Safe Defaults" được vi phạm như thế nào trong ví dụ: firewall rule cuối cùng là "allow all" thay vì "deny all"? Hậu quả là gì?
  4. TPM vs HSM: khi nào nên dùng TPM và khi nào phải dùng HSM? Cho ví dụ cụ thể từ thực tế doanh nghiệp.
  5. Cold boot attack khai thác điểm yếu gì của kiến trúc máy tính? BitLocker với TPM có ngăn được không? Tại sao cần thêm PIN?
  6. Nguyên lý "Open Design" (Kerckhoffs) có mâu thuẫn với việc giữ bí mật source code của thuật toán mã hóa không? Giải thích bằng ví dụ thực tế (DES vs AES).
C02: Bảo mật tài sản C04: An ninh mạng & Truyền thông
Thực hành trên công cụPowerShell 7 · Bash · openssl · curl
Nền tảngWindows 11 Pro/Enterprise · Ubuntu 22.04
Thời điểm phát hànhQ2/2026
Ngày biên soạn24/05/2026
Người biên soạnTrần Văn Hòa (MCT)
Phiên bảnv1.0
Zalo