One of our readers (Fiat_bm) had a problem that his hosts file was hidden. Let’s try to unhide that file!
Easy Solution: Remove System Protection
The easiest solution would be to make sure that you can actually see protected system file. If that is not the case, you will not be able to see the hosts file. A virus might have changed the file attributes to make invisible to less advanced users who did not enable this option. However, there are also far more advanced viruses that remove the header of a file or use some other nasty techniques to hide the hosts file.
0. Before following the steps below, simply set the settings to show protected system files. Learn more
Some smart viruses may not allow you to change that setting, then you have to change the file attributes manually via command line:
1. Step Open an elevated command prompt
2. Step Enter cd C:\Windows\system32\drivers\etc
3. Step Enter attrib -r -a -h -s hosts
-r (remove read-only)
-a (remove archive attrib)
-h (remove hidden attrib)
-s (remove system attrib)
Hidden is the first layer of protection. “System” normally protects system files and you may not see them.
Scan With Malwarebytes
If you have a more advanced virus on your machine you should scan the hosts file directory with Malwarebytes. I recommend to run a quick full scan via command prompt.
Please read this tutorial: How to run Malwarebytes from command prompt
Additionally, it would be in your interest to download HijackThis and run a scan. Possibly post your HijackThis log on some tech support forums, you may need some professional help.
Secure Windows 7 With This Hosts File
After running a scan, you may want to secure Windows 7 with this hosts file that prevents access to some common spam sites that spread viruses and malware: