Mục tiêu chương / Learning objectives
- So sánh các mô hình bảo mật: Bell-LaPadula (confidentiality), Biba (integrity), Clark-Wilson, Brewer-Nash.
- Giải thích vai trò Trusted Computing Base (TCB) và Reference Monitor trong kiến trúc hệ thống an toàn.
- Áp dụng 8 nguyên lý thiết kế bảo mật của Saltzer & Schroeder vào đánh giá kiến trúc.
- Phân biệt TPM, HSM, Secure Enclave và trường hợp sử dụng mỗi loại.
- Mô tả các loại tấn công side-channel và biện pháp giảm thiểu.
- Thiết kế bảo mật vật lý theo mô hình defense-in-depth: perimeter → facility → work area → equipment.
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:
- SABSA (Sherwood Applied Business Security Architecture): Khung dựa trên rủi ro kinh doanh. 6 lớp từ Contextual (business) → Conceptual → Logical → Physical → Component → Operational. Tập trung vào business-driven security — phù hợp nhất với tư duy CISSP.
- TOGAF (The Open Group Architecture Framework): Khung kiến trúc doanh nghiệp tổng quát (không chỉ security). ADM (Architecture Development Method) — 9 pha từ Preliminary đến Architecture Change Management. Security là một concern xuyên suốt.
- Zachman Framework: Ma trận 6×6 (What/How/Where/Who/When/Why × Contextual đến Detailed). Mô tả kiến trúc từ nhiều góc nhìn — không prescriptive như TOGAF/SABSA.
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:
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.
- TPM (Trusted Platform Module): Chip hardware chuyên dụng (TCG standard) lưu trữ cryptographic keys, đo lường boot integrity (PCR registers). Dùng cho BitLocker, Secure Boot attestation, platform identity. TPM 2.0 là yêu cầu Windows 11.
- HSM (Hardware Security Module): Thiết bị chuyên dụng lưu trữ và thực hiện crypto operations (sign, encrypt, key gen). Tamper-evident/tamper-resistant — key không bao giờ rời HSM dạng plaintext. Dùng trong CA, payment processing (PCI-DSS), PKI.
- Secure Enclave (Intel SGX / ARM TrustZone): Vùng nhớ được cô lập phần cứng ngay trong CPU — ngay OS/hypervisor cũng không đọc được. Dùng cho biometric keys trên iPhone, credential vault trong enterprise.
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:
- Perimeter security: Fencing (tối thiểu 8ft với barbed wire cho high-security), lighting (2 foot-candles minimum), CCTV, security guards, vehicle barriers (bollards).
- Facility entry: Mantrap (airlock — chỉ 1 người vào 1 lần), badge access, visitor management, reception control.
- Work area: Tailgating prevention, clean desk policy, screen privacy filters, document shredders.
- Equipment protection: Cable locks, server rack locks, equipment labeling, RFID asset tracking.
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:
- FIPS 203 (ML-KEM / Kyber): Thuật toán trao đổi khóa và đóng gói khóa dựa trên Module Learning With Errors. Thay thế RSA/ECDH cho key exchange. Được thiết kế tích hợp vào TLS, SSH, VPN.
- FIPS 204 (ML-DSA / Dilithium): Thuật toán chữ ký số dựa trên lattice. Thay thế RSA/ECDSA cho digital signatures — code signing, certificate chains, document signing.
- FIPS 205 (SLH-DSA / SPHINCS+): Chữ ký số dựa trên hash functions (stateless) — không phụ thuộc vào giả thuyết toán học phức tạp, conservative choice cho high-assurance environments.
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:
- Thiết kế hệ thống với abstraction layer — algorithm là config, không phải hardcode.
- Dùng hybrid approach: kết hợp thuật toán classical (ECDH) + post-quantum (Kyber) — nếu một cái bị phá vỡ, cái kia vẫn bảo vệ.
- Inventory mọi nơi sử dụng mật mã — TLS certs, VPN configs, code signing certs, database encryption — để lập kế hoạch migration.
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
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:
- Contextual layer (Business): Risk appetite = Zero tolerance cho data breach. Business driver: regulatory compliance + customer trust.
- Conceptual layer: Áp dụng Bell-LaPadula cho phân loại dữ liệu: transaction data (Secret), customer PII (Confidential), public rates (Unclassified).
- 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).
- 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.
- 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
- 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?
- 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?
- 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ì?
- 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.
- 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?
- 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).