Mục tiêu chương / Learning objectives
- Phân tích mối đe dọa bảo mật tại từng lớp OSI và biện pháp kiểm soát tương ứng.
- So sánh TLS 1.3 vs phiên bản cũ, DNSSEC, SSH v2, HTTPS/HSTS — lý do upgrade và rủi ro khi không upgrade.
- Thiết kế kiến trúc Zero Trust Network (ZTNA) và giải thích sự khác biệt với VPN truyền thống.
- Áp dụng microsegmentation và cloud network security (VPC, NSG, Security Groups) để giảm lateral movement.
- Nhận biết và đề xuất biện pháp chống: BGP hijacking, ARP poisoning, DNS poisoning, route hijacking.
- Thiết kế giải pháp secure remote access: PAM + bastion host, privileged session recording.
1. Lý thuyết cốt lõi / Core theory
1.1. Bảo mật theo lớp OSI (OSI security per layer)
CISSP yêu cầu tư duy bảo mật theo từng lớp OSI — mỗi lớp có attack surface và control riêng:
| Layer | Attacks | Controls |
|---|---|---|
| L7 Application | SQL Injection, XSS, CSRF, API abuse | WAF, Input validation, OWASP controls |
| L6 Presentation | SSL stripping, weak cipher negotiation | TLS 1.3, HSTS, cert pinning |
| L5 Session | Session hijacking, replay attacks | Secure session tokens, anti-replay |
| L4 Transport | TCP SYN flood, port scanning | Firewall, SYN cookies, rate limiting |
| L3 Network | IP spoofing, ICMP redirect, BGP hijack | ACL, uRPF, RPKI/ROA, IPSec |
| L2 Data Link | ARP poisoning, VLAN hopping, MAC flooding | Dynamic ARP Inspection, 802.1X, VLAN ACL |
| L1 Physical | Cable tapping, rogue device | Physical security, fiber optic, port security |
1.2. Giao thức bảo mật nâng cao (Secure protocols deep dive)
TLS 1.3 (RFC 8446) — cải tiến đột phá so với TLS 1.2:
- 1-RTT handshake (thay vì 2-RTT) — nhanh hơn 50% cho kết nối đầu tiên. 0-RTT cho resumed connections (cẩn thận replay attack).
- Bắt buộc Perfect Forward Secrecy: Loại bỏ hoàn toàn RSA key exchange — chỉ dùng ECDHE/DHE. Mọi cipher suite TLS 1.3 đều có PFS.
- Loại bỏ cipher yếu: Không còn RC4, DES, 3DES, MD5, SHA-1, export-grade ciphers. Chỉ 5 cipher suites: TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_GCM_SHA256, v.v.
- Encrypted handshake: ServerHello metadata được mã hóa — giảm thông tin lộ cho observer.
DNSSEC — ký số DNS responses để ngăn DNS poisoning/spoofing. Chain of trust từ root zone → TLD → authoritative NS. Không mã hóa DNS (dùng DoH/DoT cho privacy). RPKI (Resource Public Key Infrastructure) — ký số BGP route announcements → ngăn BGP hijacking (tương tự DNSSEC cho routing).
BGP Hijacking — thực tế: 2018: Pakistan Telecom hijack YouTube traffic → outage toàn cầu 2 giờ. 2022: nhiều ISP Nga hijack traffic của các tổ chức phương Tây. Countermeasures: RPKI Route Origin Validation (ROV), BGPsec (signing path), peering filters, monitoring (BGPMon, RIPE RIS). CISSP góc nhìn quản lý: đây là supply chain risk — phụ thuộc vào ISP upstream.
1.3. Zero Trust Network Architecture (ZTNA vs traditional VPN)
Zero Trust dựa trên nguyên lý: "Never trust, always verify" — không implicit trust cho bất kỳ entity nào, kể cả bên trong network perimeter.
Traditional VPN (Castle-and-Moat)
- Once inside VPN → trust everything on internal network
- Lateral movement dễ dàng sau khi compromise 1 endpoint
- Bandwidth bottleneck qua VPN concentrator
- Không phân biệt managed vs unmanaged device
Zero Trust (ZTNA)
- Verify: user identity + device health + context
- Per-session, per-application access control
- Microsegmentation — minimal blast radius
- Continuous monitoring — revoke access mid-session nếu risk thay đổi
5 pillars of Zero Trust (NIST SP 800-207): Identity → Device → Network → Application Workload → Data. Mỗi pillar phải có visibility và control. Microsoft SASE (Secure Access Service Edge) kết hợp ZTNA + SD-WAN + CASB + FWaaS vào một platform.
1.4. Cloud Network Security & Microsegmentation (VPC, NSG, Security Groups)
Cloud networking security theo AWS/Azure/GCP:
- VPC (Virtual Private Cloud): Network isolation layer — subnet private/public, route tables, internet gateway. AWS: default VPC mở quá nhiều; best practice: custom VPC với private subnets cho workloads.
- Security Groups (AWS) / NSG (Azure Network Security Group): Stateful firewall ở instance/NIC level — track connections, chỉ cần allow inbound. Nguyên lý: whitelist approach, deny by default.
- NACLs (Network Access Control Lists): Stateless, subnet level — phải allow cả inbound lẫn outbound explicitly. Defense-in-depth layer trước Security Groups.
- Microsegmentation: Phân chia network thành zones nhỏ (micro-perimeters) — mỗi workload có policy riêng. VMware NSX, Cisco ACI, hoặc Calico (Kubernetes) triển khai microsegmentation. Giảm lateral movement: compromise web tier không tự động được phép kết nối database tier.
1.5. Secure Remote Access & PAM (PAM + Bastion host + Session recording)
PAM (Privileged Access Management) kiểm soát và giám sát tài khoản đặc quyền — rủi ro cao nhất trong môi trường IT:
- Vaulting: Lưu credential trong encrypted vault (CyberArk, HashiCorp Vault). Không ai biết password admin thực — chỉ checkout theo request với time limit.
- Just-in-Time (JIT) access: Cấp quyền admin chỉ khi cần, tự động revoke sau N phút — giảm standing privilege.
- Session recording: Mọi privileged session được record full (keystrokes + screen) — forensic evidence và deterrence.
- Bastion host / Jump server: Single hardened entry point cho admin access — không admin trực tiếp từ laptop → server production. Mọi kết nối qua bastion → logged và monitored.
1.6. mTLS và Zero Trust Network Access (mTLS & ZTNA)
mTLS (Mutual TLS) mở rộng TLS thông thường — thay vì chỉ client verify server, cả hai phía đều phải xuất trình certificate hợp lệ. Loại bỏ sự phụ thuộc vào username/password trong giao tiếp microservices và API:
- Trong microservices: Service A gọi Service B phải prove identity bằng client cert — không cần secret chia sẻ, không có password rotation headache. Service mesh (Istio, Linkerd) tự động hóa mTLS giữa tất cả services.
- Zero Trust API: Mọi API call đều phải authenticated bằng cert — không có "internal network trust". Phù hợp với NIST SP 800-207 Zero Trust Architecture.
# Tạo CA và mTLS cert chain (Lab brief)
# 1. Tạo Root CA
openssl genrsa -out ca.key 4096
openssl req -x509 -new -key ca.key -out ca.crt -days 365 -subj "/CN=Test-CA"
# 2. Tạo client key và CSR
openssl genrsa -out client.key 2048
openssl req -new -key client.key -out client.csr -subj "/CN=client"
# 3. CA ký client cert
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key \
-CAcreateserial -out client.crt -days 365
# Kết quả: client.crt + client.key → dùng cho mTLS authentication
# Server verify: openssl verify -CAfile ca.crt client.crtZTNA (Zero Trust Network Access) — mô hình thay thế VPN truyền thống:
VPN truyền thống (Castle-and-Moat)
- Người dùng authenticate một lần → full network access
- Lateral movement dễ dàng sau khi vào được mạng
- Hairpin traffic về datacenter → latency cao
- Khó audit truy cập theo từng resource
ZTNA (Never Trust, Always Verify)
- Per-resource authentication — mỗi app riêng biệt
- Device posture check trước mỗi lần truy cập
- Direct-to-app routing — không expose network
- Continuous verification: identity + device + context
Các giải pháp ZTNA phổ biến: Zscaler Private Access (ZPA) — cloud-native, agent-based; Cloudflare Access — browser-based, no agent option; Palo Alto Prisma Access — SASE platform tích hợp ZTNA + SWG + CASB + FWaaS. Tất cả đều loại bỏ khái niệm "trusted internal network" — mọi truy cập đều qua policy engine.
CISSP Exam Tip: ZTNA không chỉ là công nghệ — là kiến trúc tư duy. Câu hỏi thi: "Tổ chức muốn loại bỏ implicit trust cho remote workers, đảm bảo mỗi app được authenticate riêng, device được verify trước khi truy cập. Giải pháp nào?" → ZTNA. "Tại sao ZTNA tốt hơn VPN split-tunnel?" → Vì ZTNA không cấp network-level access, chỉ per-resource access, giảm blast radius nếu device bị compromise.
2. Bài thực hành / Hands-on labs
Lab 1 — Network Security Assessment (PowerShell)
OS: Windows Server 2022 · Tool: PowerShell 7
# === NETWORK SECURITY ASSESSMENT ===
Write-Host "=== 1. Network Connectivity & Port Check ===" -ForegroundColor Cyan
# Test critical ports (authorized systems only)
@(
@{Host="dc01"; Port=445; Name="SMB/CIFS"},
@{Host="dc01"; Port=389; Name="LDAP"},
@{Host="dc01"; Port=636; Name="LDAPS"},
@{Host="dc01"; Port=3389; Name="RDP"},
@{Host="dc01"; Port=88; Name="Kerberos"}
) | ForEach-Object {
$result = Test-NetConnection -ComputerName $_.Host -Port $_.Port -WarningAction SilentlyContinue
$status = if($result.TcpTestSucceeded){"OPEN"}else{"CLOSED"}
$color = if($result.TcpTestSucceeded -and $_.Port -eq 3389){"Yellow"}
elseif($result.TcpTestSucceeded){"Green"}else{"Red"}
Write-Host " $($_.Name) [$($_.Port)]: $status" -ForegroundColor $color
}
Write-Host "`n=== 2. Network Adapters & Wake-on-LAN (security risk) ===" -ForegroundColor Cyan
Get-NetAdapter | Get-NetAdapterAdvancedProperty |
Where-Object { $_.DisplayName -like "*Wake*" } |
Select-Object Name, DisplayName, DisplayValue | Format-Table -AutoSize
Write-Host "`n=== 3. DNS Configuration (check for rogue DNS) ===" -ForegroundColor Cyan
Get-DnsClientServerAddress | Where-Object { $_.AddressFamily -eq 2 } |
Select-Object InterfaceAlias, ServerAddresses | Format-Table -AutoSize
Write-Host "`n=== 4. Network Configuration Overview ===" -ForegroundColor Cyan
Get-NetIPConfiguration | Select-Object InterfaceAlias,
@{N='IPv4';E={$_.IPv4Address.IPAddress}},
@{N='Gateway';E={$_.IPv4DefaultGateway.NextHop}},
@{N='DNS';E={($_.DNSServer | Where-Object AddressFamily -eq 2).ServerAddresses -join ', '}} |
Format-Table -AutoSize
Write-Host "`n=== 5. Open Listening Ports (potential attack surface) ===" -ForegroundColor Cyan
Get-NetTCPConnection -State Listen |
Select-Object LocalAddress, LocalPort,
@{N='Process';E={(Get-Process -Id $_.OwningProcess -EA SilentlyContinue).ProcessName}} |
Sort-Object LocalPort | Format-Table -AutoSize
Write-Host "`n=== 6. Windows Firewall Status ===" -ForegroundColor Cyan
Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction |
Format-Table -AutoSize
✅ Kết quả mong đợi: SMB/LDAP/Kerberos open (expected cho DC). RDP nên CLOSED trên production servers — dùng bastion host thay thế. Wake-on-LAN nên Disabled (rogue wakup attack). DNS chỉ trỏ về internal DNS servers (không phải 8.8.8.8 public). Listening ports: không có unexpected ports. Firewall: tất cả 3 profiles (Domain/Private/Public) đều Enabled, DefaultInbound=Block.
Lab 2 — TLS Security & DNS Security Check (Bash)
OS: Ubuntu 22.04 · Tool: Bash + openssl + dig (cài testssl.sh nếu có)
#!/bin/bash
TARGET="google.com"
echo "=== 1. TLS 1.3 Connection Test ==="
echo | openssl s_client -connect ${TARGET}:443 -tls1_3 2>/dev/null | \
grep -E "Protocol|Cipher|Session-ID|Verify"
echo -e "\n=== 2. Certificate Details ==="
echo | openssl s_client -connect ${TARGET}:443 2>/dev/null | \
openssl x509 -noout -subject -issuer -dates -fingerprint 2>/dev/null
echo -e "\n=== 3. Cipher Suite Analysis ==="
# Check if weak ciphers are offered
for cipher in TLS_RSA_WITH_RC4_128_SHA TLS_RSA_WITH_3DES_EDE_CBC_SHA; do
result=$(echo | openssl s_client -connect ${TARGET}:443 -cipher $cipher 2>&1 | grep -c "Cipher is")
[ "$result" -gt 0 ] && echo "WEAK cipher $cipher: ACCEPTED [FAIL]" || echo "Weak cipher $cipher: REJECTED [OK]"
done
echo -e "\n=== 4. DNSSEC Validation ==="
dig +dnssec +short ${TARGET} A
echo "---"
dig +dnssec ${TARGET} | grep -E "RRSIG|NSEC|flags"
echo -e "\n=== 5. DMARC/SPF/DKIM Records (email security) ==="
dig @8.8.8.8 _dmarc.${TARGET} TXT +short
dig @8.8.8.8 ${TARGET} TXT +short | grep "v=spf"
echo -e "\n=== 6. DNS over HTTPS availability ==="
curl -s "https://cloudflare-dns.com/dns-query?name=${TARGET}&type=A" \
-H "accept: application/dns-json" 2>/dev/null | \
python3 -c "import sys,json; d=json.load(sys.stdin); [print(a['data']) for a in d.get('Answer',[])]" 2>/dev/null
echo -e "\n=== 7. BGP/Route Security (RPKI check via API) ==="
curl -s "https://stat.ripe.net/data/rpki-validation/data.json?resource=8.8.8.0/24&sourceapp=hoatranlab" \
2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('RPKI Status:', d.get('data',{}).get('status','unknown'))" 2>/dev/null
✅ Kết quả mong đợi: TLS 1.3 Protocol, Cipher: TLS_AES_256_GCM_SHA384 hoặc CHACHA20. Weak ciphers RC4/3DES: REJECTED. DNSSEC: thấy RRSIG records. DMARC: "v=DMARC1; p=reject" — tốt nhất. SPF: "v=spf1 include:..." hợp lệ. RPKI: "valid" — route announcement được ký số hợp lệ. Nếu RC4 được chấp nhận → ngay lập tức update TLS config.
3. Tình huống doanh nghiệp / Enterprise scenario
Bối cảnh:
Công ty logistics VNLogistics có 5,000 nhân viên làm việc từ xa sau COVID. Họ đang dùng VPN split-tunnel: nhân viên dùng VPN để vào internal apps, nhưng traffic internet đi thẳng ra. CISO nhận ra: một laptop bị compromise có thể là pivot point vào toàn bộ internal network khi kết nối VPN. Board yêu cầu migrate sang Zero Trust trong 12 tháng.
Migration plan:
- Identity pillar: Deploy Azure Entra ID với MFA bắt buộc. Conditional Access: block access nếu device không managed hoặc location risk cao.
- Device pillar: Microsoft Intune MDM — compliance policy (encryption on, AV up-to-date, OS patched). Non-compliant devices → quarantine VLAN.
- Network pillar: Thay VPN bằng ZTNA (Azure VPN + App Proxy hoặc Zscaler). Per-app access thay vì full network access. Microsegmentation: web → app → database tiers isolated.
- Application pillar: Tất cả internal apps publish qua Application Gateway (WAF). No direct IP access từ internet.
- Privileged Access: CyberArk PAM cho tài khoản admin. Bastion host Azure cho SSH/RDP. Mọi admin session recorded.
Bài học CISSP: Zero Trust không phải product — là strategy. Cần roadmap rõ ràng, không thể "flip a switch". VPN không chết ngay — vẫn cần cho legacy apps trong giai đoạn chuyển tiếp.
4. Tự kiểm tra / CISSP-style knowledge check
- Kẻ tấn công thực hiện ARP poisoning để intercept traffic giữa workstation và default gateway. Biện pháp nào ở Layer 2 ngăn chặn hiệu quả nhất? Giải thích cơ chế hoạt động.
- Công ty bạn nhận thấy toàn bộ traffic đến data center đột ngột đi qua ISP ở quốc gia không quen thuộc. Đây có thể là loại tấn công gì? Biện pháp phòng ngừa dài hạn là gì?
- ZTNA vs VPN: Một nhân viên HR cần truy cập HR system từ laptop cá nhân (unmanaged). Với ZTNA, quyết định access nên dựa trên những yếu tố nào?
- DNSSEC ngăn chặn DNS poisoning bằng cơ chế gì? Tại sao DNSSEC không ngăn được DNS eavesdropping, và cần thêm gì để giải quyết vấn đề privacy?
- TLS 1.3 bắt buộc Perfect Forward Secrecy. Điều này có ý nghĩa gì cho forensic/lawful interception? Doanh nghiệp cần biết điều gì khi migrate lên TLS 1.3?
- Thiết kế bastion host architecture cho 50 admin quản lý 200 servers. Liệt kê tối thiểu 5 security controls phải có trên bastion host.