區域網路 (LAN) 內預設開啟檔案/印表機共享、網路探索,導致同網段裝置可瀏覽彼此共享資料夾、甚至嘗試存取管理共享 (C$, ADMIN$),資安風險極高。
ncpa.cpl。net share # 列出所有共享
net share sharename /delete # 刪除指定共享
net share * /delete # 刪除所有非系統共享(需管理員)
compmgmt.msc → 系統工具 → 共用資料夾 → 開啟的檔案
# 右鍵選取 → 關閉開啟的檔案
139,445。New-NetFirewallRule -DisplayName "Block SMB Inbound" -Direction Inbound -Protocol TCP -LocalPort 139,445 -Action Block -Profile Any
# 同步封鎖網路探索 (UDP 137,138, LLMNR 5355, mDNS 5353)
New-NetFirewallRule -DisplayName "Block NetDiscovery Inbound" -Direction Inbound -Protocol UDP -LocalPort 137,138,5353,5355 -Action Block -Profile Any
# 從其他電腦測試
net view \\target-ip # 應顯示「存取被拒」或找不到網路路徑
\\target-ip\sharename # 應提示認證或失敗
Test-NetConnection -ComputerName target-ip -Port 445 # PowerShell 測試埠