Tắt/Vô hiệu hóa các tính năng bảo mật mạng Windows - Hướng dẫn và Cảnh báo
⚠️ CẢNH BÁO: Tắt bảo mật mạng Windows làm tăng rủi ro nhiễm mã độc, rò rỉ dữ liệu, truy cập trái phép. Chỉ làm khi: Troubleshooting tạm thời, môi trường lab cách ly, hoặc thay thế bằng giải pháp bảo mật doanh nghiệp (EDR/XDR, Firewall phần cứng). Luôn bật lại sau khi xong.
1. Tắt Windows Defender Firewall
GUI (Settings)
- Win + I > Privacy & Security > Windows Security
- Firewall & Network Protection
- Chọn profile: Domain / Private / Public
- Chuyển "Microsoft Defender Firewall" sang Off
PowerShell (Admin)
# Tắt tất cả profile
Set-NetFirewallProfile -All -Enabled False
# Tắt profile cụ thể
Set-NetFirewallProfile -Profile Domain,Private,Public -Enabled False
# Bật lại
Set-NetFirewallProfile -All -Enabled True
Group Policy (GPO - Doanh nghiệp)
Computer Config > Admin Templates > Network > Network Connections > Windows Firewall > Domain/Private/Public Profile > "Windows Firewall: Protect all network connections" = Disabled
2. Tắt Windows Defender Antivirus (Real-time Protection)
Tạm thời (Settings)
- Windows Security > Virus & Threat Protection
- Manage settings > Real-time protection = Off
- Tự bật lại sau thời gian ngắn hoặc reboot
Vĩnh viễn (Group Policy / Registry - Chỉ nếu có EDR thay thế)
# Group Policy
Computer Config > Admin Templates > Windows Components > Microsoft Defender Antivirus
> "Turn off Microsoft Defender Antivirus" = Enabled
# Registry (Run as Admin)
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v DisableAntiSpyware /t REG_DWORD /d 1 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\Real-Time Protection" /v DisableRealtimeMonitoring /t REG_DWORD /d 1 /f
3. Tắt Network Credentials / Password Protected Sharing
- Control Panel > Network and Sharing Center > Change advanced sharing settings
- All Networks > Password protected sharing = Turn off
- Lưu thay đổi
Rủi ro: Ai cũng truy cập share không cần user/pass. Chỉ dùng mạng nhà tin cậy, tắt ngay sau.
4. Tắt Network Discovery
- Advanced sharing settings (như trên)
- Private / Guest or Public profile > Network discovery = Turn off
- Turn off automatic setup of network connected devices
5. Tắt File and Printer Sharing
Advanced sharing settings > File and printer sharing = Turn off
Dùng khi: Máy tính công cộng, không cần chia sẻ file/in ấn qua mạng.
6. Bypass Network Credentials (Đăng nhập tự động share)
- Win + R >
netplwiz> Enter - Bỏ tích "Users must enter a user name and password to use this computer"
- Apply > Nhập user/pass hiện tại > OK
- Lưu ý: Chỉ áp dụng đăng nhập cục bộ, không ảnh hưởng share credentials
7. Quản lý Credential Manager (Xóa network credentials lưu)
- Control Panel > Credential Manager > Windows Credentials
- Xóa các entry không cần / cũ
- Hoặc:
cmdkey /list>cmdkey /delete:TargetName
8. Tắt Windows Security Center Notifications
Windows Security > Settings (bánh răng) > Notifications > Manage notifications > Tắt các loại không muốn.
9. Hardening thay vì Tắt (Khuyên dùng)
Thay vì tắt, hãy cấu hình chặt chẽ:
- Firewall: Block inbound default, allowlist outbound cần thiết
- Defender: Cloud-delivered protection = On, Tamper protection = On, Controlled Folder Access = On
- App & Browser Control: Reputation-based protection = On
- Exploit Protection: Default settings hoặc custom cho app legacy
- Account Protection: Dynamic Lock, Windows Hello
Kiểm tra trạng thái bảo mật
# PowerShell kiểm tra
Get-MpComputerStatus | Select-Object AMServiceEnabled, AntispywareEnabled, RealTimeProtectionEnabled, BehaviorMonitorEnabled
Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction
Khi nào CẦN tắt (Use Cases hợp lệ)
- Cài đặt phần mềm legacy conflict với Defender (tắt tạm, bật ngay sau)
- Troubleshoot kết nối mạng bị chặn bởi Firewall (test rule)
- Môi trường Air-gapped / Isolated lab
- Triển khai EDR/XDR thay thế (CrowdStrike, SentinelOne, Cortex XDR, Defender for Endpoint) - theo hướng dẫn vendor
- Performance testing baseline
Kết luận
Windows Security (Defender + Firewall) là baseline bảo mật miễn phí, tích hợp sâu OS, hiệu quả cao. Tắt nó giống như "tháo khóa cửa trước nhà". Nếu cần giải pháp khác: Triển khai thay thế trước, tắt sau, cấu hình exception cho vendor tool. Luôn tuân thủ chính sách bảo mật tổ chức.