Worm (ไวรัมหนอน) คืออะไร
Computer Worm เป็น มัลแวร์ (Malware) ประเภทหนึ่ง ที่มีลักษณะเฉพาะคือ สามารถทำซ้ำตัวเอง (Self-replicate) และแพร่ระบาดด้วยตัวเอง (Self-propagate) โดยไม่ต้องการการกระทำจากผู้ใช้ และ ไม่ต้องติดไฟล์โฮสต์ (Host File) เช่นไวรัสทั่วไป
ความแตกต่าง: Worm vs Virus vs Trojan
| ลักษณะ | Worm (หนอน) | Virus (ไวรัส) | Trojan (ม้าตุย) |
| Self-replicate | ✅ ใช่ | ✅ ใช่ | ❌ ไม่ |
| ต้องการ Host File | ❌ ไม่ (Standalone) | ✅ ใช่ (ติดไฟล์) | ❌ ไม่ (แฝงในโปรแกรมปลอม) |
| ต้องการ User Interaction | ❌ ไม่ (Auto-propagate) | ✅ ใช่ (รันไฟล์ติดไวรัส) | ✅ ใช่ (หลอกให้รัน) |
| การแพร่ระบาด | Network, Email, USB, IM, Web | File Sharing, Email Attachment, USB | Social Engineering, Drive-by Download |
| ความเสียหายหลัก | Bandwidth Exhaustion, Payload Delivery, Botnet | File Corruption, System Damage | Data Theft, Backdoor, Ransomware Dropper |
วิธีการแพร่ระบาด (Propagation Vectors)
- Network Service Vulnerabilities: Exploit ช่องโหว่ใน Service (SMB, RDP, SSH, Web Server, Database) — เช่น WannaCry (EternalBlue/MS17-010), Code Red, Slammer
- Email: ส่งตัวเองผ่าน SMTP Server ที่เปิดอยู่ หรือ Mass-mailing จาก Address Book — ILOVEYOU, Mydoom
- Removable Media (USB): ใช้ Autorun.inf หรือ LNK Exploit — Stuxnet, Conficker
- Instant Messaging / Social Media: ส่งลิงก์/ไฟล์ผ่าน Skype, WhatsApp, Discord, Facebook Messenger
- File Shares (SMB/NFS): เขียนตัวเองลง Shared Folders ที่มี Write Permission
- Weak Credentials: Brute-force SSH/RDP/SMB แล้วคัดลอกตัวเองเข้าไป
- Web Exploits: SQLi, RCE ใน Web App → Drop Worm Binary
- IoT/Embedded Devices: Default Credentials, Unpatched Firmware (Mirai Botnet)
โครงสร้างและพฤติกรรมของ Worm
┌─────────────────────────────────────┐
│ WORM STRUCTURE │
├─────────────────────────────────────┤
│ 1. Propagation Module (Scanner/ │
│ Exploiter/Spreader) │
│ 2. Payload Module (Optional) │
│ - DDoS Bot, Ransomware, │
│ Crypto-miner, Info Stealer, │
│ Backdoor, Rootkit │
│ 3. Persistence Module │
│ - Registry, Service, Cron, │
│ Startup Folder, Bootkit │
│ 4. Evasion Module │
│ - Anti-VM, Anti-Debug, │
│ Polymorphism, Encryption │
│ 5. C2 Communication (Optional) │
│ - HTTP/HTTPS, DNS, P2P, Tor │
└─────────────────────────────────────┘
Worm ที่โด่งดังทางประวัติศาสตร์
| Worm | ปี | Vector | ผลกระทบ |
| Morris Worm | 1988 | Sendmail, Finger, rsh/rexec | Internet ล้ม 10% (60,000 hosts) - วิรัมหนอนแรกระดับโลก |
| ILOVEYOU | 2000 | Email (Social Engineering) | ความเสียหาย $15B+, ล้มระบบ Email ทั่วโลก |
| Code Red | 2001 | IIS Buffer Overflow (Index Server) | 359,000+ servers ใน 14 ชม. ต่อ White House |
| Nimda | 2001 | Multi-vector (Email, Web, Shares, IIS) | แพร่เร็วที่สุดในสมัยนั้น 22 นาที |
| SQL Slammer | 2003 | MS SQL Server Resolution Service (UDP 1434) | 75,000 ค้าบใน 10 นาที, Internet Congestion |
| Blaster (MSBlast) | 2003 | DCOM RPC (MS03-026) | Reboot loop, DDoS windowsupdate.com |
| Sasser | 2004 | LSASS Buffer Overflow (MS04-011) | Reboot loop, สายการบิน/ธนาคารหยุดชะงัก |
| Conficker (Downadup) | 2008 | MS08-067, USB, Weak Passwords | 9-15M hosts, P2P C2, Domain Generation Algorithm |
| Stuxnet | 2010 | USB, 4 Zero-days, Siemens PLC | ทำลายเซนทริฟิวจ Iran (Natanz) - Cyberweapon |
| WannaCry | 2017 | EternalBlue (SMBv1 MS17-010) | 200K+ คอมพิวเตอร์ 150+ ประเทศ, NHS UK ล้ม |
| NotPetya | 2017 | EternalBlue + Mimikatz + PsExec | $10B+ ไม่ใช่ Ransomware จริง (Wiper) |
| Mirai | 2016 | IoT Default Credentials (Telnet/SSH) | Botnet 600K+ DDoS 1.2 Tbps (Dyn, Krebs) |
อาการของการติด Worm (Symptoms)
- เครือข่ายช้าผิดปกติ (Bandwidth Saturation)
- CPU/RAM/Disk ใช้สูงผิดปกติบนหลายเครื่อง
- Reboot/Restart บ่อยครั้ง (Crash Loop)
- Process/Service แปลกปลอม รันอยู่ (Random names)
- ไฟล์แปลกปรากฏ (Random.exe, .tmp, .dll ใน Temp/System32)
- Firewall/IDS Alert: Port Scanning, Exploit Attempts, C2 Traffic
- Antivirus/EDR Alert หรือ Disabled เอง
- Log ไฟล์ขนาดใหญ่ผิดปกติ (Event Logs, Firewall Logs)
- Account Lockout บ่อย (Brute-force Spread)
การตรวจจับและกำจัด (Detection & Removal)
Detection
- Network-based: NetFlow/sFlow Analysis (Unusual Outbound, Scanning), IDS/IPS Signatures, DNS Anomalies (DGA), Zeek/Suricata
- Host-based: EDR/XDR (Behavioral: Process Injection, Lateral Movement), AV Signatures, YARA Rules, File Integrity Monitoring (FIM)
- Memory Forensics: Volatility (Malfind, Hollowfind, Netscan)
Containment & Eradication
- Isolate: Disconnect Network (Physical/VLAN Quarantine), Block C2 IPs/Domains
- Identify: Patient Zero, Propagation Vector, Payload
- Patch: Apply Security Update สำหรับช่องโหว่ที่ถูก Exploit
- Kill Process / Delete Files: ใช้ EDR/AV Offline Scanner (Windows Defender Offline, Kaspersky Rescue Disk)
- Remove Persistence: Registry, Services, Scheduled Tasks, Startup, WMI, Bootkit
- Credential Reset: สมมติ Credentials ถูกขโมย (Mimikatz) → Force Password Reset ทั้งองค์กร
- Verify Clean: Re-scan, Monitor Network Traffic, Re-test Vulnerability
- Restore: จาก Backup สะอาด (3-2-1 Rule, Immutable, Tested)
การป้องกัน (Prevention & Mitigation)
| มาตรการ | รายละเอียด |
| Patch Management | Patch Critical Vulns ภายใน 24-72 ชม. (WannaCry, NotPetya ใช้ช่องโหว่ที่มี Patch แล้ว) |
| Network Segmentation | VLAN, Micro-segmentation, Zero Trust — จำกัด Lateral Movement |
| Disable Unused Services | ปิด SMBv1, RDP, Telnet, FTP, Anonymous Shares หากไม่ใช้ |
| Strong Authentication | MFA ทุกที่, Key-based SSH, Disable Password Auth, PAM |
| Application Control | AppLocker, WDAC, SELinux — รันเฉพาะ Binary ที่อนุมัติ |
| Email/Web Security | Attachment Sandboxing, URL Rewriting, DMARC, User Training |
| USB Control | Disable Autorun, Block Unknown USB, Encrypted USB Only |
| EDR/XDR + 24/7 SOC | Behavioral Detection, Automated Response, Threat Hunting |
| Backup Strategy | 3-2-1, Immutable, Offline, Air-gapped, Tested RTO/RPO |
| Incident Response Plan | Playbook สำหรับ Worm Outbreak, Tabletop Exercise ประจำปี |
Worm ในสมัยใหม่ (Modern Worms)
- Fileless Worms: ใช้ PowerShell, WMI, .NET In-memory (No Disk Write)
- Cloud Worms: แพร่ใน Container/K8s (Exploit Kubelet, API Server), Serverless Functions
- Supply Chain Worms: ติดไว้ใน Dependency/Build Pipeline (SolarWinds, Codecov)
- AI-Generated Polymorphic Worms: โค้ดที่เปลี่ยนรูปแบบอัตโนมัติหลบ AV Signature
สรุป
Worm = Self-replicating + Self-propagating Malware ที่แพร่ผ่านเครือข่ายโดยไม่ต้องการ User Interaction
- อันตรายเพราะ: Speed, Scale, Automation, Payload Delivery (Ransomware, DDoS, Spyware)
- ป้องกันได้ด้วย: Patch + Segmentation + Strong Auth + EDR + Backup + IR Plan
- ไม่มี "Silver Bullet" ต้องใช้ Defense in Depth หลายชั้น