hosts 檔案 (C:\Windows\System32\drivers\etc\hosts) 權限高於 DNS,常被病毒/木馬/流氓軟體劫持,將正常網域導向惡意 IP 或本機 (127.0.0.1),導致無法存取正常網站、彈出廣告頁面。



notepad "%SystemRoot%\system32\drivers\etc\hosts"ipconfig /flushdnsexithosts.bat,雙擊即以記事本開啟 hosts 並自動清除 DNS 快取。hosts.bat,刪除所有非授權行,僅保留 127.0.0.1 localhost,儲存。attrib +s +h +r "%SystemRoot%\system32\drivers\etc\hosts"




定期檢查 hosts 檔案、使用可信殺毒軟體即時防護、不隨意執行來源不明程式,是防範劫持根本之道。