Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows Server 系統教學 >> Server 2003

關閉 Windows 危險連接埠 445(SMB)的註冊檔一鍵修法

編輯:Server 2003

操作步驟

  1. 開啟登錄編輯器 regedit。
  2. 瀏覽至 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters。
  3. 右鍵空白處 → 新增 → **DWORD (32 位元) 值**,名稱:SMBDeviceEnabled。
  4. 數值資料保持預設 0(即停用)。
  5. 重開機生效,netstat -an 即不再顯示 TCP 445 監聽。

原理說明

  • SMBDeviceEnabled = 0 告訴 NetBT 驅動不載入 SMB 裝置,直接封鎖 TCP 445(直接裝載 SMB over TCP,不經 NetBIOS)。
  • 此法不影響檔案共享功能(仍可透過 NetBIOS over TCP/IP 139 埠存取),但阻斷 WannaCry、EternalBlue 等利用 445 埠傳播的蠕蟲/勒索軟體。

補充:若需完整封鎖 NetBIOS 相關埠

建議搭配 IPSec 原則或 Windows 防火牆封鎖 TCP 135/139/445、UDP 137/138,參考「Windows 作業系統停用危險連接埠保護系統安全」一文。

Copyright © Windows教程網 All Rights Reserved