CISSP · Domain 7 · 13%

Vận hành bảo mật

Security Operations — Domain 7

Domain lớn nhất về độ phức tạp vận hành: SOC tiers, SIEM correlation, threat hunting theo MITRE ATT&CK, điều tra số (digital forensics), chuỗi bảo quản chứng cứ, DR/BCP exercises, và quản lý sự cố theo NIST 800-61. Day-to-day security management.

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

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:

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:

MITRE ATT&CK là knowledge base về adversary tactics và techniques:

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):

  1. 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.
  2. 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.
  3. 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.
  4. Examination: Phân tích forensic image trong isolated environment. Tìm artifacts: registry changes, prefetch files, browser history, deleted files, log entries.
  5. Analysis: Reconstruct timeline, identify TTP, attribute attacker behavior.
  6. 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:

Metrics quan trọng:

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:

1.5. Patch Management & Configuration Management (Operational controls)

Patch management at scale — 5 bước:

  1. Inventory: Biết tất cả assets (CMDB — Configuration Management Database).
  2. Scan: Vulnerability scanner xác định missing patches và CVE exposure.
  3. Prioritize: Dựa trên CVSS score + business criticality. Critical + exploited in wild → patch trong 24h. High → 7 days. Medium → 30 days.
  4. Test: Patch trong dev/staging environment trước khi production — tránh breaking changes.
  5. 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

Purdue Reference Model — kiến trúc phân cấp ICS:

Level Tên Thành phần
Level 0Field DevicesSensors, actuators, motors, valves — thiết bị vật lý thực tế
Level 1Control DevicesPLCs (Programmable Logic Controllers), RTUs — điều khiển field devices
Level 2SCADA / DCSSupervisory systems, HMIs, historian servers — giám sát và điều phối
Level 3MESManufacturing Execution Systems — lập kế hoạch sản xuất, scheduling
Level 4Corporate ITERP, email, business systems — mạng IT thông thường

ICS Security Controls:

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

🖥️ Platform: Windows Server 2022 · Ubuntu 22.04
🛠️ Tools: PowerShell 7 · Bash · auditd · grep · awk

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:

  1. Preparation (trước đó): IRP đã có, forensic toolkit đã sẵn sàng, chain of custody forms prepared, legal team notified on-call số.
  2. 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.
  3. 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.
  4. 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).
  5. 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.
  6. 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

  1. 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.
  2. 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?
  3. 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?
  4. 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?
  5. 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?
  6. 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?
C06: Đánh giá & Kiểm thử bảo mật C08: Bảo mật phát triển phần mềm
Thực hành trên công cụPowerShell 7 · Bash · auditd · grep
Nền tảngWindows Server 2022 · 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