The hosts file location hasn’t changed in Windows 7 and is the same in Windows NT, 2000, XP, 2003, Vista and Windows 7. It’s an important system file to map hostnames to IP addresses. For example it can map domains to your PC (localhost) by adding the IP 127.0.0.1 in front of a domain name.
As we previously reported, you might get an error “access denied” when accessing the hosts file in Windows 7.
Here’s the solution: How to access hosts file in Windows 7
Here’s the solution: How to access hosts file in Windows 7
Where to find the hosts file in Windows 7, Vista, 2000, 2003, NT?
The location of the hosts file in Windows 7 is:
- C:\Windows\System32\drivers\etc
- Sidenote: In Windows 95, 98, ME the location is: %WinDir%\
Malware exploits your host file
As mentioned above your hosts file can map hostnames to IP’s. Malware can exploit that by adding sites of well-known system security tools so that they won’t resolve properly.
- Example: If you find the entry 127.0.0.1 symantec.com in your hosts file, you won’t be able to visit that site, because your PC is resolving that address to your own PC. It would not retrieve the IP of the website symantec.com, it would retrieve the IP of your “localhost” (127.0.0.1).
So, your hosts file can be used in a good or bad way. If you know the IP of malware sites or ad sites, you can prevent them from working and resolving properly, but this can also be used against you.