Mục tiêu chương / Learning objectives
- Mô tả cấu trúc SOC 3 tiers, escalation path, và KPIs quan trọng (MTTD, MTTR).
- Xây dựng SIEM use cases và correlation rules để phát hiện các TTP phổ biến.
- Thực hành threat hunting hypothesis-driven theo MITRE ATT&CK framework.
- Giải thích 6 giai đoạn vòng đời điều tra số và yêu cầu chain of custody.
- Phân biệt DR (Disaster Recovery) và BCP (Business Continuity Planning) — RTO, RPO, MTD.
- Thiết kế patch management program và configuration management baseline.
1. Lý thuyết cốt lõi / Core theory
1.1. SOC Operations & SIEM (Security Operations Center)
SOC structure — 3 tiers với trách nhiệm rõ ràng:
Tier 1 — Analyst
- Monitor SIEM alerts (L1 triage)
- Initial investigation: true/false positive
- Ticket creation, basic containment
- Escalate complex cases to T2
- KPI: Alert response time <15 min
Tier 2 — Investigator
- Deep-dive incident investigation
- Malware analysis (static/dynamic)
- Threat intelligence correlation
- Playbook execution, containment
- KPI: Incident closure <4h
Tier 3 — Hunter/Expert
- Proactive threat hunting
- Advanced forensics & attribution
- SIEM rule/use case development
- Threat intelligence production
- KPI: New TTP coverage/month
SIEM (Security Information & Event Management) — nền tảng kỹ thuật của SOC:
- Log aggregation: Thu thập từ firewall, IDS, AD, endpoint, cloud, applications vào centralized store.
- Correlation rules: "Nếu cùng user có >5 failed logins trong 5 phút, rồi 1 successful login từ different country → alert Medium." Rules được viết theo TTP của MITRE ATT&CK.
- SIEM tuning: Giảm false positive — quan trọng để không overwhelm analysts. Baseline normal behavior trước, rồi alert on deviation.
- MTTD / MTTR: Mean Time To Detect và Mean Time To Respond — hai KPI quan trọng nhất. Mục tiêu MTTD <24h (industry average 200+ days), MTTR <8h.
1.2. Threat Hunting & MITRE ATT&CK (Proactive threat detection)
Threat hunting là hoạt động chủ động tìm kiếm dấu hiệu của attacker đang ẩn trong hệ thống — không chờ alert. Ba phương pháp:
- Hypothesis-driven: Bắt đầu từ giả thuyết dựa trên threat intel. "Attackers targeting our industry use T1059.001 (PowerShell) for execution" → hunt PowerShell anomalies.
- TTP-based (MITRE ATT&CK): Mapping defense coverage lên ATT&CK matrix. Xác định gaps → hunt những TTP chưa có detection.
- Data-driven: ML/analytics phát hiện outliers trong large dataset mà rules không catch.
MITRE ATT&CK là knowledge base về adversary tactics và techniques:
- 14 Tactics (high-level goals): Reconnaissance → Resource Development → Initial Access → Execution → Persistence → Privilege Escalation → Defense Evasion → Credential Access → Discovery → Lateral Movement → Collection → Command & Control → Exfiltration → Impact.
- Techniques & Sub-techniques: Cụ thể cách thực hiện mỗi tactic. Ví dụ T1059.001 = PowerShell (sub-technique của Command and Scripting Interpreter).
- Navigator: Tool visualize coverage — mỗi technique được màu sắc theo detection/mitigation status.
1.3. Digital Forensics & Chain of Custody (Investigation lifecycle)
Digital forensics lifecycle theo NIST 800-86 gồm 4 giai đoạn (CISSP hay dùng 6 bước chi tiết hơn):
- Identification: Xác định hệ thống liên quan, scope của sự cố, pháp lý áp dụng. Chuẩn bị forensic toolkit.
- Preservation: Cô lập hệ thống (network isolation, not shutdown nếu volatile evidence cần thu thập). Snapshot VM memory trước khi shutdown.
- Collection: Thu thập chứng cứ theo thứ tự độ volatile (RAM → swap → disk → network state → logs). Forensic image (bit-for-bit copy) với write blockers. Hash verification (MD5/SHA-256) ngay sau khi image.
- Examination: Phân tích forensic image trong isolated environment. Tìm artifacts: registry changes, prefetch files, browser history, deleted files, log entries.
- Analysis: Reconstruct timeline, identify TTP, attribute attacker behavior.
- Presentation: Report cho management và nếu cần — expert witness testimony. Phải reproducible và defensible.
Chain of Custody (CoC): Tài liệu hóa mọi người đã handle chứng cứ, từ lúc thu thập đến lúc presented in court. Mỗi transfer phải có: timestamp, người nhận/giao, trạng thái chứng cứ, mục đích. Vi phạm CoC → chứng cứ bị loại khỏi tòa án. CISSP: đây là lý do không nên "fix" máy bị hack trước khi forensics — bạn destroy chứng cứ và CoC.
1.4. DR & BCP (Disaster Recovery & Business Continuity)
Phân biệt rõ hai khái niệm:
- BCP (Business Continuity Planning): Đảm bảo các business functions quan trọng tiếp tục trong khi DR đang diễn ra. Bao gồm con người, quy trình, alternate work sites.
- DRP (Disaster Recovery Plan): Khôi phục hệ thống IT sau thảm họa. Subset của BCP.
Metrics quan trọng:
- RTO (Recovery Time Objective): Thời gian tối đa để hệ thống khôi phục sau thảm họa. Ví dụ: "Email phải restore trong 4 giờ."
- RPO (Recovery Point Objective): Lượng dữ liệu tối đa có thể mất. Ví dụ: "Chấp nhận mất tối đa 1 giờ dữ liệu." → backup mỗi 1 giờ.
- MTD (Maximum Tolerable Downtime): Thời gian downtime tối đa trước khi business không thể recover. MTD > RTO.
DR site types: Hot site — fully operational, failover trong minutes (cao giá). Warm site — partially configured, failover trong hours. Cold site — empty facility, phải setup từ đầu (hours to days). Mobile/Cloud: Cloud DR (DRaaS) ngày càng phổ biến — on-demand recovery với pay-per-use.
BCP testing types:
- Tabletop exercise: Họp thảo luận scenarios — không disruptive, nhưng không test actual recovery.
- Functional exercise: Kích hoạt một số components của plan trong controlled environment.
- Full-scale exercise: Simulate actual disaster — most disruptive, nhưng test toàn bộ plan. Yêu cầu hàng tháng trời chuẩn bị.
1.5. Patch Management & Configuration Management (Operational controls)
Patch management at scale — 5 bước:
- Inventory: Biết tất cả assets (CMDB — Configuration Management Database).
- Scan: Vulnerability scanner xác định missing patches và CVE exposure.
- Prioritize: Dựa trên CVSS score + business criticality. Critical + exploited in wild → patch trong 24h. High → 7 days. Medium → 30 days.
- Test: Patch trong dev/staging environment trước khi production — tránh breaking changes.
- Deploy & Verify: WSUS/SCCM/Ansible deployment + re-scan để confirm patch applied.
Configuration Management Baseline: CIS Benchmarks cung cấp hardening baseline cho Windows/Linux/Cloud. Dùng CIS-CAT tool để assess và remediate. Trong CI/CD: Infrastructure-as-Code (IaC) đảm bảo mọi deployment đều conform to baseline — không manual configuration drift. CISSP: configuration management là preventive control, patch management là corrective control.
1.6. Bảo mật OT/ICS/SCADA (Operational Technology Security)
OT (Operational Technology) bao gồm ICS (Industrial Control Systems), SCADA (Supervisory Control and Data Acquisition) và các hệ thống điều khiển công nghiệp — khác biệt căn bản với IT truyền thống:
IT Security (CIA truyền thống)
- Ưu tiên: Confidentiality → Integrity → Availability
- Patch windows linh hoạt, downtime chấp nhận được
- Hệ thống có vòng đời 3-5 năm
- Standard IT protocols (TCP/IP, HTTP, TLS)
OT Security (AIC đảo ngược)
- Ưu tiên: Availability → Integrity → Confidentiality
- Không thể patch: downtime = nhà máy ngừng hoạt động
- Hệ thống vòng đời 15-25 năm (legacy protocols)
- Proprietary protocols: Modbus, DNP3, PROFINET, OPC
Các cuộc tấn công OT nổi bật
- Colonial Pipeline (2021): DarkSide ransomware tấn công mạng IT của Colonial Pipeline — do lo ngại lây lan sang OT, công ty chủ động tắt hệ thống OT điều khiển đường ống dầu. Kết quả: 5 ngày đóng cửa, thiếu nhiên liệu tại 17 bang Đông Bộ Mỹ, ransom $4.4M (sau đó DOJ thu hồi $2.3M). Bài học: phân tách IT/OT network không đủ — cần incident response plan cho OT.
- Stuxnet (2010): Worm nhắm vào PLC Siemens S7 điều khiển máy ly tâm uranium tại Natanz (Iran) — làm máy quay nhanh rồi chậm bất thường trong khi báo cáo "bình thường" cho SCADA. Phá hủy ~1,000 máy ly tâm. Đây là cyberweapon đầu tiên gây thiệt hại vật lý có thể xác nhận.
- Industroyer/Crashoverride (2016): Tấn công lưới điện Ukraine — mất điện cho 230,000 hộ dân tại Kiev. Malware biết giao thức ICS (IEC 104, IEC 101, IEC 61850) để ra lệnh cho circuit breakers.
- TRITON/TRISIS (2017): Nhắm vào Safety Instrumented Systems (SIS) tại nhà máy hóa dầu Saudi Arabia — hệ thống được thiết kế để ngăn thảm họa vật lý. Đây là tấn công đầu tiên nhắm trực tiếp vào safety systems.
Purdue Reference Model — kiến trúc phân cấp ICS:
| Level | Tên | Thành phần |
|---|---|---|
| Level 0 | Field Devices | Sensors, actuators, motors, valves — thiết bị vật lý thực tế |
| Level 1 | Control Devices | PLCs (Programmable Logic Controllers), RTUs — điều khiển field devices |
| Level 2 | SCADA / DCS | Supervisory systems, HMIs, historian servers — giám sát và điều phối |
| Level 3 | MES | Manufacturing Execution Systems — lập kế hoạch sản xuất, scheduling |
| Level 4 | Corporate IT | ERP, email, business systems — mạng IT thông thường |
ICS Security Controls:
- Air-gapping: Cô lập hoàn toàn mạng OT khỏi IT/internet — giảm attack surface nhưng phức tạp vận hành (USB là vector phổ biến để bridge air gap).
- Unidirectional gateways (Data diodes): Cho phép data chảy một chiều (OT → IT) nhưng không có đường ngược lại — Waterfall Security Solutions, Owl Cyber Defense là vendor phổ biến.
- OT Visibility: Dragos (chuyên ICS threat intelligence), Claroty, Nozomi Networks — passive monitoring không interrupt OT traffic.
- Patch compensating controls: Vì không thể patch OT, dùng virtual patching (IDS/IPS với OT signatures), network segmentation, application whitelisting.
CISSP Exam Tip: "OT security prioritizes Availability over Confidentiality" — đây là điểm phân biệt quan trọng với IT security. Đề thi hỏi: "Tại sao không thể áp dụng patch management thông thường vào ICS?" → Vì downtime có thể gây thiệt hại vật lý, không thể reboot PLC đang điều khiển quy trình công nghiệp đang chạy.
1.7. Phân loại kiểm thử DR (DR Test Types — so sánh)
| Loại kiểm thử | Mô tả | Hệ thống production | Chi phí | Độ thực tế |
|---|---|---|---|---|
| Tabletop Exercise | Họp thảo luận kịch bản thảm họa — "Nếu X xảy ra, chúng ta làm gì?" Không có hành động thực tế. | Không ảnh hưởng | Thấp nhất | Thấp nhất |
| Walk-Through / Structured Walkthrough | Đi qua từng bước của DRP trên giấy — xác minh tính đầy đủ của plan, không kích hoạt hệ thống. | Không ảnh hưởng | Thấp | Trung bình thấp |
| Simulation Exercise | Mô phỏng điều kiện thảm họa, một số thành phần được kích hoạt trong isolated environment. | Tối thiểu | Trung bình | Trung bình |
| Parallel Test | DR systems được kích hoạt và chạy song song với production — không failover thật sự. Kiểm tra DR có hoạt động không. | Production tiếp tục | Cao | Cao |
| Full Interruption Test | Production thực sự bị cắt — failover hoàn toàn sang DR site. Test toàn bộ plan trong điều kiện thực tế. | Bị cắt hoàn toàn | Cao nhất | Cao nhất |
CISSP Exam Tip: Nhớ hai cực: "Most thorough = Full Interruption Test" (thực tế nhất, phát hiện mọi vấn đề nhưng rủi ro cao nhất — production thực sự bị cắt). "Least disruptive = Tabletop Exercise" (chỉ thảo luận, không ảnh hưởng gì). Câu hỏi thi thường hỏi "loại test nào cung cấp highest level of assurance?" → Full Interruption. "Loại test nào an toàn nhất để thực hiện mà không ảnh hưởng business?" → Tabletop.
2. Bài thực hành / Hands-on labs
Lab 1 — SIEM-style Threat Detection với Windows Event Logs (PowerShell)
OS: Windows Server 2022 · Tool: PowerShell 7 (Run as Administrator)
# === SIEM-STYLE THREAT DETECTION: WINDOWS EVENT LOGS ===
$TimeWindow = (Get-Date).AddHours(-24)
Write-Host "=== 1. Failed Logon Attempts (Event 4625) — Brute Force Detection ===" -ForegroundColor Cyan
$failedLogons = Get-WinEvent -FilterHashtable @{
LogName = 'Security'
Id = 4625
StartTime = $TimeWindow
} -ErrorAction SilentlyContinue -MaxEvents 1000
# Group by target username — find top attacked accounts
$failedLogons | Group-Object { $_.Properties[5].Value } |
Sort-Object Count -Descending | Select-Object -First 10 |
ForEach-Object {
Write-Host " [$($_.Count) failures] User: $($_.Name)" `
-ForegroundColor $(if($_.Count -gt 10){"Red"}else{"Yellow"})
}
Write-Host "`n=== 2. Suspicious PowerShell Execution (Event 4688) ===" -ForegroundColor Cyan
Get-WinEvent -FilterHashtable @{
LogName = 'Security'
Id = 4688
StartTime = $TimeWindow
} -ErrorAction SilentlyContinue -MaxEvents 500 |
Where-Object { $_.Message -match "powershell|cmd|wscript|cscript|mshta|rundll32" } |
Select-Object TimeCreated,
@{N='Process';E={$_.Properties[5].Value}},
@{N='CommandLine';E={$_.Properties[8].Value}} |
Where-Object { $_.CommandLine -match "encoded|bypass|hidden|downloadstring|iex|invoke" } |
Format-Table -AutoSize
Write-Host "`n=== 3. Privilege Escalation — New Admin Account (Event 4732) ===" -ForegroundColor Cyan
Get-WinEvent -FilterHashtable @{
LogName = 'Security'
Id = 4732
StartTime = $TimeWindow
} -ErrorAction SilentlyContinue |
Where-Object { $_.Message -match "Administrators" } |
Select-Object TimeCreated, Message | Format-List
Write-Host "`n=== 4. Lateral Movement Detection — Network Logons (Event 4624 Type 3) ===" -ForegroundColor Cyan
Get-WinEvent -FilterHashtable @{
LogName = 'Security'
Id = 4624
StartTime = $TimeWindow
} -ErrorAction SilentlyContinue -MaxEvents 500 |
Where-Object { $_.Properties[8].Value -eq 3 } | # Type 3 = Network logon
Group-Object { $_.Properties[18].Value } | # Group by source IP
Sort-Object Count -Descending | Select-Object -First 10 |
Select-Object @{N='SourceIP';E={$_.Name}}, Count |
Format-Table -AutoSize
Write-Host "`n=== 5. Account Lockout Events (Event 4740) ===" -ForegroundColor Cyan
Get-WinEvent -FilterHashtable @{
LogName = 'Security'
Id = 4740
StartTime = $TimeWindow
} -ErrorAction SilentlyContinue |
Select-Object TimeCreated,
@{N='LockedUser';E={$_.Properties[0].Value}},
@{N='CallerComputer';E={$_.Properties[1].Value}} |
Format-Table -AutoSize
✅ Kết quả mong đợi: Failed logons: >10 failures trên 1 account trong 24h → likely brute force → investigate source IP → block if external. PowerShell với "bypass" hoặc "encodedcommand" → alert Tier 2 immediately (MITRE T1059.001). New admin account additions → verify với HR/management — unauthorized → incident. Lateral movement: nhiều source IPs lạ → investigate. Account lockouts từ cùng CallerComputer → likely spray attack từ compromised host đó.
Lab 2 — Threat Hunting Exercise trên Linux (Bash)
OS: Ubuntu 22.04 · Tool: Bash + auditd + grep + awk
#!/bin/bash
# === THREAT HUNTING: LINUX INDICATORS OF COMPROMISE ===
echo "=== HUNT 1: Reverse Shell Indicators (T1059.004) ==="
# Common reverse shell patterns in auth log
grep -E "wget|curl.*http|nc |bash -i|/bin/sh|python.*socket|perl.*socket" \
/var/log/auth.log /var/log/syslog 2>/dev/null | tail -20
echo -e "\n=== HUNT 2: Suspicious Executed Commands (auditd) ==="
sudo ausearch -k exec --start today 2>/dev/null | grep -A2 "type=EXECVE" | \
grep "a0=" | sed 's/.*a0=//' | sort | uniq -c | sort -rn | head -20
echo -e "\n=== HUNT 3: Files in Temp Directories (staging area for malware) ==="
find /tmp /var/tmp /dev/shm -type f 2>/dev/null | while read f; do
echo " $(stat -c '%y %n' "$f") [$(file -b "$f" | cut -c1-40)]"
done
echo -e "\n=== HUNT 4: Executables newer than /etc/passwd (recent installs) ==="
find /usr/bin /usr/local/bin /home -executable -type f \
-newer /etc/passwd 2>/dev/null | head -20
echo -e "\n=== HUNT 5: Unusual SUID/SGID binaries ==="
find / -perm /4000 -o -perm /2000 2>/dev/null | \
grep -v -E "^/usr/bin|^/usr/sbin|^/bin|^/sbin|^/usr/lib" | head -10
echo -e "\n=== HUNT 6: Running processes analysis ==="
ps aux | awk '{print $11}' | sort -u | grep -v "^\[" | \
while read proc; do
# Flag processes with suspicious names or paths
echo "$proc" | grep -qE "^/tmp|^/dev/shm|\.sh$|python.*-c|perl.*-e" && \
echo " [SUSPICIOUS] $proc"
done
echo -e "\n=== HUNT 7: Scheduled Tasks (persistence mechanism T1053) ==="
echo "--- crontab (root) ---"
crontab -l -u root 2>/dev/null
echo "--- /etc/crontab ---"
cat /etc/crontab | grep -v "^#" | grep -v "^$"
echo "--- cron.d ---"
ls -la /etc/cron.d/ 2>/dev/null
echo -e "\n=== HUNT 8: Network Connections to unusual ports ==="
ss -tnp | grep -v -E ":(22|80|443|53|25|389|636|88|3389)\s" | head -15
echo -e "\n=== HUNT 9: SSH Authorized Keys (backdoor detection) ==="
find /home /root -name "authorized_keys" 2>/dev/null | while read f; do
count=$(wc -l < "$f")
echo " $f: $count keys"
cat "$f" 2>/dev/null | grep -v "^#" | awk '{print " Key: "$NF}'
done
✅ Kết quả mong đợi: Reverse shell indicators: bất kỳ "bash -i" hay "nc" trong auth.log → immediate investigation. Executables in /tmp → malware staging. SUID binaries ngoài /usr/bin,/bin → privesc risk. Unusual cron entries → persistence mechanism. SSH authorized_keys với unknown keys → backdoor. Network connections trên unexpected ports → C2 communication. Đây là hunt list dựa trên real-world APT TTPs theo MITRE ATT&CK.
3. Tình huống doanh nghiệp / Enterprise scenario
Bối cảnh:
3:47 AM thứ Hai. SIEM alert: "Unusual data transfer — 50GB uploaded to external IP từ file-server-01 trong 2 giờ." Analyst Tier 1 escalate lên Tier 2. File server lưu trữ hợp đồng khách hàng và source code. CISO được wake-up call lúc 4 AM.
Incident Response theo NIST 800-61:
- Preparation (trước đó): IRP đã có, forensic toolkit đã sẵn sàng, chain of custody forms prepared, legal team notified on-call số.
- Detection & Analysis: Xác nhận true positive (SIEM log + network capture). Identify: account "svc-backup" đã authenticate lúc 1:30 AM, sau đó robocopy 50GB → external IP tại Nga. Account bị compromise qua phishing 2 tuần trước.
- Containment: Network isolation file-server-01 (không shutdown — RAM forensics cần). Disable compromised account. Block external IP tại firewall. Notify affected business units.
- Eradication: Remove malware/backdoor phát hiện qua forensics. Audit tất cả accounts cho signs of lateral movement (Event 4624 Type 3 từ file-server IP).
- Recovery: Restore từ clean backup (verified clean snapshot 2 tuần trước incident). Harden: service accounts không có interactive logon, MFA cho tất cả privileged accounts.
- Lessons Learned (30 days post): Root cause: phishing không bị filter, service account có excessive permissions, no alerting trên large data transfer. → Update email gateway, implement least privilege for svc accounts, add DLP rule.
Bài học CISSP: Incident response phải được chuẩn bị trước — playbooks, contacts, forensic tools. Tốc độ Containment quan trọng hơn tốc độ Eradication. Không bao giờ shutdown host trước khi volatile forensics được thu thập.
4. Tự kiểm tra / CISSP-style knowledge check
- SOC Tier 1 analyst phát hiện alert "mass failed RDP login attempts" từ internal server. Bước đầu tiên theo incident response process là gì — containment hay investigation? Giải thích lý do và risk của từng lựa chọn.
- Forensic investigator muốn thu thập chứng cứ từ server bị hack đang chạy. Thứ tự thu thập chứng cứ nào đúng và tại sao thứ tự này quan trọng?
- Chain of Custody bị vi phạm khi forensic image được copy sang USB drive không được log trong CoC form. Hậu quả pháp lý là gì? Điều này ảnh hưởng như thế nào đến vụ kiện?
- Công ty có RTO=4h và RPO=1h cho email server. Loại DR site nào phù hợp và cần backup frequency tối thiểu bao nhiêu?
- Threat hunter phát hiện MITRE T1053.005 (Scheduled Task) trên 3 servers. Hypothesis tiếp theo cần test là gì và data sources nào cần hunt?
- Patch management SLA của bạn: Critical CVE = 24h. Log4Shell (CVSS 10.0, exploited in wild) được công bố lúc 6 PM thứ Sáu. SLA yêu cầu patch trong 24h — không thể do change freeze cuối tuần. Giải quyết conflict này như thế nào theo CISSP thinking?