Mục tiêu bài học — Learning Objectives
- So sánh qualitative vs. quantitative risk assessment — khi nào dùng phương pháp nào
- Áp dụng FAIR (Factor Analysis of Information Risk) model để định lượng rủi ro bằng tiền (ALE/AV/EF/ARO)
- Xây dựng Risk Register với risk appetite, risk tolerance và risk response strategies (Avoid/Transfer/Mitigate/Accept)
- Thực hiện Business Impact Analysis (BIA) — xác định RTO, RPO, MTD cho critical systems
- Phân biệt BCM vs. DRP vs. COOP — vai trò từng kế hoạch trong business continuity
Lý thuyết — Theory
1. Qualitative vs. Quantitative Risk Assessment
- Phương pháp: Risk Matrix (5x5), Red/Amber/Green (RAG) scoring
- Scale: Low/Medium/High/Critical hoặc 1-5
- Ưu điểm: Nhanh, ít dữ liệu, dễ communicate
- Nhược điểm: Chủ quan, khó so sánh, không giúp ROI decisions
- Dùng khi: Initial risk assessment, khi thiếu historical data
- Phương pháp: FAIR, ALE, Monte Carlo simulation
- Scale: Giá trị tiền (USD/VND), probability (%)
- Ưu điểm: Objective, hỗ trợ ROI/budget decisions
- Nhược điểm: Cần nhiều data, tốn thời gian
- Dùng khi: Justifying security investment với CFO/Board
2. FAIR Model — Factor Analysis of Information Risk
FAIR là tiêu chuẩn quốc tế (Open Group) để định lượng cyber risk bằng tiền. Không phải framework kiểm soát — là ontology để phân tích và đo lường risk một cách nhất quán.
3. Risk Register & Risk Response Strategies
Risk Register là "living document" trung tâm của risk management program. Mỗi risk có owner, inherent risk score, controls, residual risk score, và treatment plan.
| Risk ID | Risk Description | Inherent | Controls | Residual | Response | Owner |
|---|---|---|---|---|---|---|
| R001 | Ransomware encrypts production DB | Critical | EDR, backup, segmentation | High | Mitigate | CISO |
| R002 | GDPR fine for data breach | High | Encryption, DLP, awareness | Medium | Mitigate + Transfer | DPO |
| R003 | Cloud provider outage >4h | High | Multi-region DR, SLA contract | Medium | Transfer | CTO |
4. Business Impact Analysis (BIA)
BIA xác định critical business functions và tác động tài chính, operational, reputational khi chúng bị gián đoạn. Là đầu vào quan trọng nhất để xây dựng BCM/DRP.
5. BCM / DRP / COOP — Ba kế hoạch liên tục nghiệp vụ
Chương trình tổng thể đảm bảo tổ chức có thể hoạt động trong và sau disruption. Bao gồm DRP, crisis communication, supply chain continuity, workarounds thủ công.
Subset của BCM, focus vào khôi phục IT systems và data sau disaster. Hot/Warm/Cold site, backup strategies, failover procedures, RTO/RPO targets.
Kế hoạch duy trì essential functions tại alternate location. Phổ biến trong government và critical infrastructure. Alternate site + delegations of authority.
Bài thực hành — Hands-on Labs
ALE Calculator & Risk Register — PowerShell Quantitative Risk Assessment
# Quantitative Risk Assessment — ALE Calculator + Risk Register
$risks = @(
[PSCustomObject]@{
RiskID = "R001"; Name = "Ransomware Attack"
AssetValue = 5000000; # VND triệu = $5M asset value
EF = 0.80; # Exposure Factor: 80% asset destroyed
ARO = 0.60; # Annual Rate of Occurrence: 0.6/year
ControlCost = 150000; # Cost of EDR + backup solution
PostControlARO = 0.10 # After controls: 0.1/year
},
[PSCustomObject]@{
RiskID = "R002"; Name = "Insider Data Theft"
AssetValue = 2000000; EF = 0.30; ARO = 0.25
ControlCost = 80000; PostControlARO = 0.05
},
[PSCustomObject]@{
RiskID = "R003"; Name = "DDoS Attack (e-commerce)"
AssetValue = 1000000; EF = 0.20; ARO = 2.0
ControlCost = 60000; PostControlARO = 0.5
}
)
$results = foreach ($r in $risks) {
$sle = $r.AssetValue * $r.EF
$aleBefore = $sle * $r.ARO
$aleAfter = $sle * $r.PostControlARO
$controlValue = $aleBefore - $aleAfter - $r.ControlCost
[PSCustomObject]@{
RiskID = $r.RiskID
Risk = $r.Name
SLE = "$([int]$sle / 1000)K"
ALE_Before = "$([int]$aleBefore / 1000)K"
ALE_After = "$([int]$aleAfter / 1000)K"
ControlCost = "$($r.ControlCost / 1000)K"
ControlValue = "$([int]$controlValue / 1000)K"
Decision = if ($controlValue -gt 0) { "INVEST" } else { "REVIEW" }
}
}
$results | Format-Table -AutoSize
$results | Export-Csv "C:\GRC\risk-register-ale.csv" -NoTypeInformation
RiskID Risk SLE ALE_Before ALE_After ControlCost ControlValue Decision ------ ---- --- ---------- --------- ----------- ------------ -------- R001 Ransomware Attack 4000K 2400K 400K 150K 1850K INVEST R002 Insider Data Theft 600K 150K 30K 80K 40K INVEST R003 DDoS Attack (e-commerce) 200K 400K 100K 60K 240K INVEST CSV exported: C:\GRC\risk-register-ale.csv All 3 controls have positive ROI — recommend implementation
BIA & DR Test Simulation — Bash Script kiểm tra RTO/RPO thực tế
#!/bin/bash
# DR Test Script — kiểm tra RTO/RPO thực tế cho database failover
TARGET_RTO=120 # 120 seconds target
TARGET_RPO=300 # 300 seconds (5 min) max data loss
REPORT="/tmp/dr-test-$(date +%Y%m%d-%H%M).txt"
log() { echo "[$(date +%H:%M:%S)] $1" | tee -a $REPORT; }
log "=== DR TEST START ==="
log "Target RTO: ${TARGET_RTO}s | Target RPO: ${TARGET_RPO}s"
# Phase 1: Record last backup timestamp (simulate RPO check)
BACKUP_TIME=$(date -d "-4 minutes" +%s) # Last backup was 4 min ago
NOW=$(date +%s)
DATA_LOSS_SECS=$(( NOW - BACKUP_TIME ))
log "Last backup: $(date -d @$BACKUP_TIME) | Data loss window: ${DATA_LOSS_SECS}s"
if [ $DATA_LOSS_SECS -le $TARGET_RPO ]; then
log "RPO CHECK: PASS (${DATA_LOSS_SECS}s <= ${TARGET_RPO}s)"
else
log "RPO CHECK: FAIL (${DATA_LOSS_SECS}s > ${TARGET_RPO}s) — backup too old!"
fi
# Phase 2: Simulate failover to DR database (Docker)
log "Starting DR database container..."
RTO_START=$(date +%s)
# Start DR MySQL container
docker run -d --name mysql-dr \
-e MYSQL_ROOT_PASSWORD=drpassword \
-e MYSQL_DATABASE=appdb \
-p 3307:3306 \
mysql:8.0 &>/dev/null
# Wait for DB to be ready (max 60s)
WAIT=0
until docker exec mysql-dr mysqladmin ping -u root -pdrpassword --silent 2>/dev/null; do
sleep 2; (( WAIT+=2 ))
if [ $WAIT -ge 60 ]; then log "FAIL: DR DB not ready in 60s"; exit 1; fi
done
log "DR database ready after ${WAIT}s"
# Restore from backup (simulate)
log "Restoring database from latest backup..."
sleep 5 # Simulate restore time
# Phase 3: Validate restored data
RECORD_COUNT=$(docker exec mysql-dr mysql -u root -pdrpassword appdb \
-e "SELECT COUNT(*) FROM information_schema.tables WHERE table_schema='appdb';" \
--skip-column-names 2>/dev/null || echo 0)
log "Data validation: ${RECORD_COUNT} tables accessible"
RTO_END=$(date +%s)
ACTUAL_RTO=$(( RTO_END - RTO_START ))
log "Actual RTO: ${ACTUAL_RTO}s"
if [ $ACTUAL_RTO -le $TARGET_RTO ]; then
log "RTO CHECK: PASS (${ACTUAL_RTO}s <= ${TARGET_RTO}s)"
else
log "RTO CHECK: FAIL (${ACTUAL_RTO}s > ${TARGET_RTO}s) — optimize failover!"
fi
# Cleanup
docker stop mysql-dr &>/dev/null && docker rm mysql-dr &>/dev/null
log "=== DR TEST COMPLETE | Report: $REPORT ==="
[09:15:00] === DR TEST START === [09:15:00] Target RTO: 120s | Target RPO: 300s [09:15:00] Last backup: 2026-05-24 09:11:00 | Data loss window: 240s [09:15:00] RPO CHECK: PASS (240s <= 300s) [09:15:00] Starting DR database container... [09:15:18] DR database ready after 18s [09:15:18] Restoring database from latest backup... [09:15:23] Data validation: 7 tables accessible [09:15:23] Actual RTO: 83s [09:15:23] RTO CHECK: PASS (83s <= 120s) [09:15:23] === DR TEST COMPLETE | Report: /tmp/dr-test-20260524-0915.txt ===
Tình huống doanh nghiệp — Business Scenario
Hanoi Stock Exchange (HNX) là critical infrastructure — downtime trong giờ giao dịch gây thiệt hại hàng nghìn tỷ đồng. UBCKNN yêu cầu RTO ≤ 2 giờ, RPO ≤ 15 phút. BIA phân tích hệ thống giao dịch là Most Critical System.
Tự kiểm tra — Self-Assessment (5 câu)
1. Asset Value = $2M, Exposure Factor = 40%, ARO = 0.5. ALE là bao nhiêu?
SLE = $2M × 0.4 = $800K; ALE = $800K × 0.5 = $400K.
2. Một tổ chức mua cyber insurance để chuyển rủi ro tài chính của data breach. Đây là risk response strategy nào?
3. RTO = 4h, MTD = 6h. Work Recovery Time (WRT) là bao nhiêu?
WRT = MTD - RTO = 6h - 4h = 2h. Đây là thời gian để verify và reconcile data sau khi hệ thống restore.
4. Recovery site nào phù hợp nhất cho hệ thống với RTO = 30 phút?
5. FAIR model phân tích Risk = Probable Loss Frequency × Probable Loss Magnitude. Loss Magnitude bao gồm hai thành phần là gì?
FAIR: Primary Loss (productivity, response, replacement) + Secondary Loss (reputation, legal/regulatory, competitive). Secondary thường bị underestimate nhưng có thể lớn hơn Primary.
Định lượng rủi ro nâng cao — FAIR Model
FAIR — Factor Analysis of Information Risk
FAIR là mô hình định lượng rủi ro mạng duy nhất được quốc tế công nhận — cho phép biểu diễn rủi ro bằng đô la thay vì màu đỏ/vàng/xanh trên heat map định tính.
- • Threat Event Frequency: Số lần tác nhân đe dọa tiếp xúc tài sản/năm
- • Vulnerability: Xác suất kiểm soát bị vượt qua khi bị tấn công (0–1)
- • Primary Loss: Thiệt hại trực tiếp — khôi phục dữ liệu, downtime, pháp lý
- • Secondary Loss: Tổn thất gián tiếp — danh tiếng, regulatory fines, cạnh tranh
Monte Carlo Simulation — 10.000 kịch bản
Thay vì tính một con số duy nhất, FAIR chạy 10.000 kịch bản ngẫu nhiên để tạo ra phân phối rủi ro — cho phép trình bày rủi ro theo ngôn ngữ mà Board of Directors hiểu.
So sánh: Định tính vs FAIR (Định lượng)
| Tiêu chí | Qualitative (Heat Map) | FAIR (Quantitative) |
|---|---|---|
| Output | Red / Yellow / Green | $2.3M at 90th pct |
| Ngôn ngữ Board | Khó so sánh với ngân sách | Trực tiếp so sánh ROI kiểm soát |
| Độ chính xác | Chủ quan, định tính | Phạm vi xác suất (range) |
| Phù hợp | Screening ban đầu, nhanh | Báo cáo C-suite, quyết định đầu tư |
| Tiêu chuẩn | Phổ biến, nhiều biến thể | Tiêu chuẩn quốc tế duy nhất (Open FAIR) |
Python — pyfair thư viện FAIR
# pip install pyfair
from pyfair import FairModel, FairSimpleReport
# Khởi tạo model
model = FairModel(name="Data Breach Risk")
# Input: Threat Event Frequency — phân phối chuẩn, mean=10 lần/năm
model.input_data('Threat Event Frequency', mean=10, stdev=3)
# Input: Vulnerability — xác suất bị vượt qua khi tấn công xảy ra
model.input_data('Vulnerability', mean=0.3, stdev=0.1)
# Input: Primary Loss — phân phối PERT (low/mode/high)
model.input_data('Primary Loss', low=100_000, mode=500_000, high=2_000_000)
# Chạy 10,000 Monte Carlo simulations
model.calculate_all()
# Output: risk distribution, VaR tại 90th percentile
results = model.export_results()
print(results.describe())
# → count, mean, std, 10%, 25%, 50%, 75%, 90% annual loss values
# Tạo báo cáo HTML
report = FairSimpleReport([model])
report.to_html('fair_report.html')
Annual Loss Exposure count 10000.000000 mean 460,230.00 std 318,150.00 10% 98,400.00 50% 392,000.00 90% 2,310,000.00 ← "90th pct annual loss = $2.3M" max 6,100,000.00
CGRC exam kiểm tra FAIR là tiêu chuẩn định lượng quốc tế duy nhất cho rủi ro mạng, không chỉ là heat map định tính. Nhớ: Open FAIR được The Open Group công nhận. Khi đề bài hỏi về "quantitative risk analysis" trong bối cảnh cybersecurity — đáp án là FAIR, không phải chỉ ALE/SLE.