Playbook: มัลแวร์ (Malware Infection)
ID: PB-03
ระดับความรุนแรง: สูง | หมวดหมู่: Endpoint Security
MITRE ATT&CK: T1204 (User Execution), T1059 (Command & Scripting Interpreter)
ทริกเกอร์: EDR alert, AV detection, sandbox result, ผู้ใช้รายงานอาการผิดปกติ
ผังการตัดสินใจ
graph TD
Alert["🚨 Malware Alert"] --> Type{"🦠 ประเภท?"}
Type -->|Trojan/RAT| RAT["🕵️ Remote Access"]
Type -->|Worm| Worm["🐛 Self-propagating"]
Type -->|Ransomware| Ransom["🔒 Encryption"]
Type -->|Infostealer| Stealer["🔑 Credential Theft"]
Type -->|Dropper/Loader| Drop["📥 Second-stage"]
RAT --> C2{"📡 C2 Callback?"}
Worm --> Lateral{"🖥️ กี่เครื่อง?"}
Ransom --> Escalate["🔴 ยกระดับ PB-02"]
Stealer --> Creds["🔐 หมุนเวียน Creds ทันที"]
C2 -->|ใช่| Isolate["🔒 Isolate + Block C2"]
C2 -->|ไม่| Contain["🟠 Contain + Clean"]
Lateral -->|>3 เครื่อง| Major["🔴 Major Incident"]
หลังเหตุการณ์ (Post-Incident)
1. การวิเคราะห์
1.1 ประเภทมัลแวร์
| ประเภท |
ลักษณะ |
ความรุนแรง |
| Trojan/RAT |
Remote access, keylogger |
🔴 สูง |
| Worm |
Self-replicating, network spread |
🔴 สูง |
| Ransomware |
เข้ารหัสไฟล์, ransom note |
🔴 วิกฤต |
| Infostealer |
ขโมย browser passwords, cookies |
🔴 สูง |
| Dropper/Loader |
ดาวน์โหลด payload เพิ่มเติม |
🟠 สูง |
| Rootkit |
ซ่อน process, kernel-level |
🔴 วิกฤต |
| Cryptominer |
ใช้ CPU/GPU mining |
🟠 ปานกลาง |
1.2 รายการตรวจสอบ
| รายการ |
วิธีตรวจสอบ |
เสร็จ |
| ประเภทมัลแวร์ |
EDR classification |
☐ |
| File hash (SHA256) |
EDR |
☐ |
| VT / TI lookup |
VirusTotal, OTX |
☐ |
| Entry vector (email/USB/download/exploit) |
EDR timeline |
☐ |
| Parent process chain |
EDR process tree |
☐ |
| มี C2 callback? |
EDR network events |
☐ |
| มี lateral movement? |
SIEM correlation |
☐ |
| มี persistence? (registry, scheduled task, service) |
EDR / Autoruns |
☐ |
| มีข้อมูลถูกนำออก? |
DLP / Netflow |
☐ |
| มี host อื่นติดเชื้อ? |
SIEM IoC search |
☐ |
ผังกระบวนการวิเคราะห์มัลแวร์
graph LR
Hash["#️⃣ Hash"] --> VT["🔍 VirusTotal"]
VT --> Known{"✅ รู้จัก?"}
Known -->|ใช่| Report["📋 ใช้ TI report"]
Known -->|ไม่| Sandbox["🧪 Sandbox"]
Sandbox --> Static["📝 Static Analysis"]
Static --> Dynamic["▶️ Dynamic Analysis"]
Dynamic --> IOC["🎯 สกัด IoC"]
style Hash fill:#3498db,color:#fff
style Sandbox fill:#e74c3c,color:#fff
style IOC fill:#27ae60,color:#fff
ผังขั้นตอนการควบคุม
sequenceDiagram
participant EDR
participant SOC
participant FW as Firewall
participant SIEM
EDR->>SOC: 🚨 Malware detected
SOC->>EDR: Isolate host
SOC->>EDR: Block hash (org-wide)
SOC->>FW: Block C2 IP/domain
SOC->>SIEM: Sweep IOCs ทั้งองค์กร
SIEM-->>SOC: ผลลัพธ์ (additional hosts?)
2. การควบคุม
| # |
การดำเนินการ |
เครื่องมือ |
เสร็จ |
| 1 |
Isolate host ทันที (network quarantine) |
EDR |
☐ |
| 2 |
Kill malicious process |
EDR |
☐ |
| 3 |
Block file hash ทั้งองค์กร |
EDR policy |
☐ |
| 4 |
Block C2 domain/IP ที่ proxy, firewall, DNS |
All |
☐ |
| 5 |
ค้นหา IoC (hash, IP, domain) ใน host อื่น |
SIEM |
☐ |
| 6 |
บล็อก entry vector (email attachment hash, URL) |
Mail gateway |
☐ |
3. การกำจัด
| # |
การดำเนินการ |
เสร็จ |
| 1 |
ลบ malware binary + dropped files |
☐ |
| 2 |
ลบ persistence ทั้งหมด (registry, task, service, cron) |
☐ |
| 3 |
หมุนเวียน credentials ที่อาจถูกขโมย |
☐ |
| 4 |
หาก worm → ตรวจทุก host ใน segment |
☐ |
| 5 |
หาก rootkit → rebuild จาก clean image (ไม่ clean ได้) |
☐ |
4. การฟื้นฟู
| # |
การดำเนินการ |
เสร็จ |
| 1 |
Rebuild/restore host จาก known-good image |
☐ |
| 2 |
อัปเดต EDR signatures + detection rules |
☐ |
| 3 |
ปรับ email gateway rules (block attachment types) |
☐ |
| 4 |
อัปเดต firewall/proxy blocklists |
☐ |
| 5 |
อบรมผู้ใช้ (หาก entry vector = phishing/download) |
☐ |
| 6 |
ติดตาม 14 วัน |
☐ |
5. เกณฑ์การยกระดับ
ผัง Malware Analysis Pipeline
graph LR
Sample["🦠 Sample"] --> Static["📋 Static Analysis"]
Static --> Sandbox["🏖️ Sandbox"]
Sandbox --> IOC["🔍 Extract IOCs"]
IOC --> TI["📊 Threat Intel"]
TI --> Block["🔒 Block"]
Block --> Hunt["🎯 Hunt across org"]
style Sample fill:#e74c3c,color:#fff
style Block fill:#27ae60,color:#fff
ผัง EDR Response Flow
sequenceDiagram
participant EDR
participant SOC
participant Endpoint
participant SIEM
EDR->>SOC: 🚨 Malware detected
SOC->>EDR: Isolate host
EDR->>Endpoint: 🔒 Network isolated
SOC->>EDR: Collect forensic data
EDR-->>SOC: 📋 Process tree + artifacts
SOC->>SIEM: เพิ่ม IOCs ใน blocklist
กฎตรวจจับ (Sigma)
เอกสารที่เกี่ยวข้อง
Malware Family Classification
| Category |
Behavior |
Priority |
Example |
| Ransomware |
File encryption |
Critical |
LockBit, BlackCat |
| RAT |
Remote control |
Critical |
Cobalt Strike |
| Worm |
Self-propagation |
High |
Emotet |
| Trojan |
Disguised payload |
High |
Trickbot |
| Cryptominer |
Resource hijacking |
Medium |
XMRig |
Containment Decision Matrix
| Factor |
Isolate |
Monitor |
Full Wipe |
| Single endpoint |
✅ |
- |
If persistent |
| Server |
✅ |
Short-term |
After backup |
| Domain controller |
✅ |
❌ |
After DSRM |
| Multiple hosts |
Network segment |
❌ |
Phased |
Malware Sample Handling
| Step |
Action |
| 1 |
Calculate SHA256 hash |
| 2 |
Check VirusTotal reputation |
| 3 |
Submit to sandbox (if unknown) |
อ้างอิง