Appender Infection & Malware - Kiến thức cốt lõi An ninh mạng (Quizlet style)
Bài viết giải thích các khái niệm malware cơ bản thường gặp trong ôn thi Security+, CEH, CISSP hoặc lab phân tích mã độc.
1. Appender Infection (Nhiễm virus dạng chèn cuối)
Định nghĩa: Loại virus truyền thống chèn mã độc vào cuối file thực thi (.exe, .com) và sửa đổi điểm nhập (Entry Point) của file để trỏ đến mã virus.
Cơ chế:
- Tìm file target (.exe/.com)
- Kiểm tra đã nhiễm chưa (signature/marker)
- Chèn mã virus vào cuối file (Append)
- Sửa Entry Point (Header PE/NE) → Trỏ đến code virus
- Virus chạy trước → Giải mã/giải nén/nhiễm file khác → Chạy chương trình gốc
Đặc điểm: Dễ phát hiện bởi signature-based AV (kích thước file thay đổi, entry point bất thường), dễ viết, phổ biến thời DOS/Win16/Win32 sớm.
2. Malware (Mã độc) - Phân loại chính
| Loại | Đặc điểm | Mục đích | Ví dụ |
|---|---|---|---|
| Virus | Gắn vào file/host, cần hành động user chạy để lan | Phá hoại, replicate, payload | CIH/Chernobyl, Sality, Virut |
| Worm (Sâu) | Tự lan truyền qua mạng, KHÔNG cần host file, exploit vuln | Lan nhanh, DDoS, drop payload | WannaCry, Conficker, Stuxnet, Mirai |
| Trojan (Mã ngựa Troia) | Giả vờ phần mềm hợp pháp, không tự replicate | Backdoor, Stealer, RAT, Downloader, Banker | Emotet, TrickBot, Zeus, Remcos, AsyncRAT |
| Ransomware | Mã hóa file đòi tiền chuộc (Double/Triple Extortion) | Tiền chuộc, phá hoại, diversion | LockBit, BlackCat, Conti, REvil, Akira |
| Spyware / Stalkerware | Thu thập thông tin bí mật (keylog, screen, mic, location) | Gián điệp, đánh cắp credential, PII | Pegasus, FinSpy, Commercial spyware |
| Adware / PUA | Hiển thị quảng cáo không mong muốn, redirect, track | Doanh thu quảng cáo, data collection | Bundled installers, Browser hijackers |
| Rootkit | Ẩn sự hiện diện (file, process, registry, network, driver) | Persistence, Stealth, Privilege escalation | TDL4, Necurs, Kernel rootkits (Linux/Windows) |
| Backdoor / RAT | Cổng sau truy cập từ xa, bypass authentication | C2, Command execution, Data exfil | Cobalt Strike Beacon, Sliver, Metasploit Meterpreter, QuasarRAT |
| Botnet | Mạng thiết bị bị kiểm soát (bot) bởi C2 server | DDoS, Spam, Mining, Proxy, Credential stuffing | Mirai, Emotet, TrickBot, Qakbot, Gamaredon |
| Fileless Malware | Chạy trong memory, dùng công cụ hệ thống (LOLBins), không drop file đĩa | Evasion, Stealth, Persistence via WMI/Registry | PowerShell Empire, WMImplant, SharpSploit |
3. Backdoor (Cổng sau) - Chi tiết
- Định nghĩa: Phương pháp bí mật bypass authentication/authorization để truy cập hệ thống
- Loại: Hardcoded credentials, Hidden service/port, Web shell, Rootkit backdoor, Firmware implant, Supply chain backdoor
- Ví dụ nổi tiếng: FinSpy (FinFisher) - Spyware cấp nhà nước, backdoor persistence, cập nhật qua C2. SolarWinds Sunburst - Supply chain backdoor trong Orion. xz-utils (CVE-2024-3094) - Backdoor trong library nén.
- Phát hiện: Netstat/ss (lạ port), Process anomaly, File integrity monitoring (FIM), EDR behavioral, Network traffic analysis (NDR), YARA rules
4. Rootkit - Đặc điểm & Khó khăn loại bỏ
- Chế độ: User-mode (Ring 3 - Hook API, DLL injection) / Kernel-mode (Ring 0 - Driver, DKOM, SSDT hook, eBPF) / Bootkit (MBR/VBR/UEFI) / Hypervisor (Ring -1)
- Chức năng độc hại: Credential stealer, Keylogger, AV disabler, DDoS bot, Ransomware loader, Network sniffer
- Tại sao khó xóa: Ẩn file/process/registry/network từ OS & AV. Cần boot môi trường sạch (WinPE, Linux Live, Helix, TRK) hoặc Reinstall OS.
- Công cụ detect: GMER, RootkitRevealer, TDSSKiller, chkrootkit, rkhunter, Lynis, Volatility (memory forensics)
5. Macro Virus (Vi-rút Macro)
- Nhiễm file tài liệu (Word .docm, Excel .xlsm, PowerPoint .pptm) qua macro VBA
- Kích hoạt khi mở file (AutoOpen, Document_Open, Workbook_Open)
- Lan sang file khác qua template (Normal.dotm) hoặc code tự replicate
- Phòng chống: Disable macro mặc định, "Disable all macros with notification", Digital signature macro, Application Guard, Protected View
6. Vector lây lan Malware (Infection Vectors)
- Phishing Email (Attachment/Link) - #1 vector
- Exploit Public-Facing Application (Web, VPN, RDP, Exchange)
- Drive-by Download / Malvertising
- Removable Media (USB - AutoRun/Shortcut/LNK)
- Supply Chain (Software update, Dependency confusion, Typosquatting)
- Lateral Movement (Pass-the-Hash, SMB, RDP, SSH, WMI, RPC)
- Cloud Metadata Service / Container Escape
7. Dấu hiệu nhiễm Malware (IOC - Indicators of Compromise)
- Hệ thống chậm, CPU/RAM/Disk cao bất thường
- BSOD (Blue Screen of Death) thường xuyên
- Chương trình tự mở/đóng, cửa sổ lạ
- Ổ cứng đầy bất ngờ (log, encrypted files, mining)
- Hoạt động mạng/đĩa liên tục khi idle
- Popup, toolbar, homepage browser bị đổi, redirect
- Email/spam gửi từ tài khoản mình
- File bị đổi tên/extension (.encrypted, .lockbit, .kira)
8. Phòng chống & Xử lý sự cố Malware
- Prevention: EDR/NGAV (CrowdStrike, SentinelOne, Defender for Endpoint), AppLocker/WDAC, Email Security, Web Proxy, Patch Management, Hardening, User Training
- Detection: SIEM/SOAR, NDR, Threat Hunting, YARA, Sigma, MITRE ATT&CK mapping
- Response: Isolate (Network/Host), Collect Evidence (Memory, Disk, Log), Analyze (Static/Dynamic/Behavioral), Eradicate (Remove malware, Rotate creds, Patch vuln), Recover (Restore from clean backup, Verify)
- Post-Incident: Root Cause Analysis, Lessons Learned, Update Detection/Prevention, Threat Intel Sharing