Unlock and Unblock the Windows Hosts File

Some anti-virus, anti-sypware/malware, and firewall software locks the Windows Hosts file so no one can edit it (by maintaining an open file-handle with no write share permissions on this file).

The file is -
C:\Windows\System32\drivers\etc\hosts

The most common Hosts file locker is SpyBot Search & Destroy. Others can be: ZoneAlarm, SpywareBlaster, Ad-Aware, WinPartol, HostsMan, etc.

Try to locate the application(s) that are responsible for this, and turn off the Hosts file lock in their settings (or uninstall/remove the application).

Unlocking the Windows Hosts File

Spybot S&D

With the Advanced Mode active
Tools section
IE Tweaks section
Uncheck: "Lock hosts file as protection against hijackers"

*you might need to start Spybot by right-clicking on it, and selecting ‘Run as admin’

ZoneAlarm

Firewall - Main - Advanced Button - Advanced Settings
Uncheck: "Lock Host File"
Reboot.

*you might also need to disable or configure ZoneAlarm’s OSFirewall

Other Applications

There are free tools you can use to find out who/what is locking this file. They will show you which process is maintaining the lock, and you can infer by the process’s name/path what the application is. Then open the application and go through the application’s settings.

Unlocker

Lock Hunter

Windows Sysinternals Process Explorer

Exclude Hosts File From Scans

Aside from unlocking the Hosts file, you’ll also need to make sure changes to this file are not marked as malicious and then undone – by excluding the Hosts file location from scanning.

Windows Defender & Security Esentials

On Windows 8, open Windows Defender. On Windows 7 and lower, open Windows Security Esentials.

Settings - Excluded files and locations
File locations: (type in...)
C:\Windows\System32\drivers\etc\;
Click Add, and then Save changes

Kaspersky

Settings - Threats & Exclusions - Exclusions - Settings
Add - Select file or Folder:
C:\Windows\System32\drivers\etc\

Notes

1. If you are unable to see this file, change Folder View options to: show hidden files and folders, show known file extensions, and NOT hide protected files.

2. The true HOSTS file path (under all Windows versions) is defined in this Registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\DataBasePath

3. Howto reset the Hosts file to it’s original default state.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>