Blocking Spyware Using the HOSTS File

June 18th, 2007

When considering manual system
defense against internet threats, most of the users come to the question of
using the HOSTS file for increased anti-spyware protection, sooner or later.
However, the problem of apparent complexity involved when using it sometimes
turns away even those interested in protecting their systems manually.

 

However, it’s not as hard as it
might seem, and this tutorial in using the HOSTS file for anti-spyware defense
needs will illustrate the actual simplicity of this task.

 

 

What is a HOSTS file?

Simply put, the HOSTS file caches
all the IP addresses of the websites you visit for increased internet
connectivity and speed, as these addresses are kept in the HOSTS file, which is
actually checked before your system queries the DNS servers.

 

For example, you have the BBC
website cached in your HOSTS file: its entry would be displayed as
212.58.224.131 www.bbc.co.uk. Therefore, it would be easily reachable and it would
load faster than websites that are not cached in your HOSTS file.

 

That said you could make a list of trusted and most visited
websites in this file for increased loading speed.

 

OR, you could BLOCK unwanted sites by using the same HOSTS
file and adding these websites and changing their IP addresses to that of your
own computer.

 

Where is the HOSTS file located?

Windows NT/2K/XP = [System root]\System32\Drivers\Etc
Windows 95/98/ME = [Drive]\Windows
The [drive] is usually drive "C:"
The [System root] is usually "C:\WinNT" or "C:\Windows"

 

How is the HOSTS
related to spyware?

 

Most malware and spyware parasites
hijack your HOSTS file in order to redirect you to malicious websites by
changing the IP addresses of legitimate ones to websites of intruder’s
choosing.

 


Blocking undesirable sites with HOSTS file


However, the abovementioned process may be
reversed, as you can use the same tactics to redirect any possible malicious
sites to another site in order to prevent infection. Instead of opening a
malicious site, your web browser will show a “Page not found” error. To block
an undesirable site in your HOSTS file, do the following:

 

·       
Locate the HOSTS file

·       
Right-click the file,
select Open With…

·       
Select Notepad from
the program list

·       
Press OK

·       
Enter the address of a
website you wish to block (e.g. www.bbc.co.uk)

·       
Enter 127.0.0.1 in the
IP field

·       
Save the HOSTS file

 

Congratulations! You are now able
to block undesirable sites with the HOSTS file.

 

Does blocking malicious sites offer the ultimate protection
against spyware?

 

No. Although a well-edited HOSTS
file does offer increased passive anti-spyware protection, the sheer amount of
malicious websites is just way too large. You’ll have to constantly update your
HOSTS file with hundreds of new addresses if you want this method to offer
complete protection.

 

Moreover, not every malware
parasite hijacks the hosts file or uses site redirection to cause harm. Some
are known to tamper with the registry, while others operate via backdoors.
There are a myriad ways for spyware to damage your system, and using the HOSTS
file for malicious purposes is just one of them.

 

We recommend using the latest
versions of spyware removers in conjunction with edited HOSTS file for maximum
anti-spyware protection.

  1. No comments yet.
  1. No trackbacks yet.