01 · Lý thuyết
MDE là gì? – EDR vs AV
Microsoft Defender for Endpoint (MDE) là giải pháp EDR (Endpoint Detection and Response) — vượt xa Antivirus truyền thống. Trong khi AV chỉ phát hiện malware đã biết (signature-based), MDE phân tích hành vi để phát hiện tấn công nâng cao (APT).
| Tính năng | Antivirus (Defender AV) | MDE (EDR) |
|---|---|---|
| Phát hiện malware | ✓ Signature-based | ✓ Signature + Behavioral |
| Zero-day threats | Giới hạn (cloud protection) | ✓ ML + behavior analysis |
| Timeline & investigation | ✗ | ✓ 180 ngày device timeline |
| Threat hunting | ✗ | ✓ Advanced Hunting (KQL) |
| Live Response | ✗ | ✓ Remote shell vào thiết bị |
| Automated Investigation | ✗ | ✓ AI tự điều tra & remediate |
| Vulnerability Management | ✗ | ✓ Phát hiện CVE trên thiết bị |
MDE Licensing – Plan 1 vs Plan 2
| Tính năng | MDE Plan 1 | MDE Plan 2 |
|---|---|---|
| Next-gen AV | ✓ | ✓ |
| Attack Surface Reduction | ✓ | ✓ |
| EDR (timeline, alerts) | ✗ | ✓ |
| Advanced Hunting | ✗ | ✓ |
| Threat Intelligence | ✗ | ✓ |
| Vulnerability Management | ✗ | ✓ (add-on) |
| Included in | M365 Business Premium, A3 | M365 E5, E5 Security, A5 |
Onboarding Methods – Cách deploy MDE sensor
| Phương pháp | Phù hợp với | Cơ chế |
|---|---|---|
| Intune (recommended) | Cloud-managed devices | Endpoint Security policy → MDE onboarding package |
| Group Policy (GPO) | On-premises AD joined | Deploy onboarding script qua GPO |
| SCCM/ConfigMgr | Co-managed environments | Deploy package qua ConfigMgr |
| Local script | Onboard thủ công (lab, test) | Chạy WindowsDefenderATPOnboardingScript.cmd trực tiếp |
| VDI onboarding | Non-persistent VDI | Script đặc biệt cho VDI environments |
Advanced Hunting – Threat Hunting với KQL
Advanced Hunting cho phép security team chủ động tìm kiếm mối đe dọa trong 30 ngày dữ liệu từ tất cả thiết bị, sử dụng ngôn ngữ truy vấn KQL (Kusto Query Language).
02 · Thực hành
Lab A: Onboard thiết bị vào MDE qua Intune
Thực hành tại: intune.microsoft.com → Endpoint security → Microsoft Defender for Endpoint
- Vào intune.microsoft.com → Endpoint security → Microsoft Defender for Endpoint
- Enable Connect Windows devices... to Microsoft Defender for Endpoint → Save
- Tạo Endpoint Security profile: Endpoint detection and response
Platform: Windows 10 and later → Profile: Endpoint detection and response - Name:
MDE-Onboarding-All-Windows - Microsoft Defender for Endpoint client configuration package type: Auto from connector
- Sample sharing: All (gửi suspicious files lên Microsoft cloud để phân tích)
- Telemetry reporting frequency: Normal
- Assign to All Devices → Create
- Sau 15–30 phút: thiết bị xuất hiện trong security.microsoft.com → Devices
Lab B: Kết nối MDE với Intune Compliance
Lab C: Advanced Hunting – Tìm PowerShell đáng ngờ
Lab D: Live Response – Điều tra thiết bị từ xa
03 · Tình huống thực tế
Tổng công ty Điện lực EVN – Phát hiện tấn công APT vào hạ tầng quan trọng
EVN phát hiện bất thường: một số máy tính ở trung tâm điều độ có traffic kỳ lạ ban đêm. Không có AV alert nào — malware này bypass signature detection. Đây là điển hình APT (Advanced Persistent Threat) nhắm vào cơ sở hạ tầng quan trọng.
Quy trình điều tra với MDE:
- ✓ Alert triage: MDE alert "Suspicious PowerShell execution" trên 3 máy — medium severity
- ✓ Device Timeline: Trace lại 7 ngày — thấy Excel file mở → macro chạy → PowerShell encoded → C2 connection đêm
- ✓ Advanced Hunting: Tìm tất cả máy có cùng pattern C2 IP → phát hiện 5 máy thêm đã bị compromise
- ✓ Isolate: Immediate isolation 8 máy khỏi mạng (vẫn giữ MDE connection để điều tra)
- ✓ Live Response: Thu thập malware sample, xóa persistence mechanisms (scheduled tasks, registry keys)
- ✓ Root cause: Phishing email với macro-enabled Excel → nâng cấp ASR rules block Office macros toàn hệ thống
Kết quả:
- • Phát hiện và ngăn chặn APT trong 4 giờ (vs. trung bình 197 ngày theo Ponemon Institute)
- • Không có hệ thống OT (điều độ điện) nào bị ảnh hưởng — isolation kịp thời
- • MDE Automated Investigation: tự clean 6/8 máy, chỉ 2 máy cần manual intervention