Wednesday, May 11, 2005

Blocking Spyware and other Parasites the simple way.

We've all heard of these terms even if some of us may not know what they all mean.
  • Trojans
  • Spyware
  • Malware
  • HiJacks
  • BHO (Browser Help object)
Whether you know what all these terms or not isn't important. The important thing you know is that they're all BAD news. You've done your homework, I know you have. You've got a spyware cleaner, maybe even two; antivirus software is always watching your PC's health and you've got Ad-Aware "just incase.

This is all great news. But there's one common demoninator here. In all cases your "Protection" is really a "remedy". Much like a Flu shot, you've given your PCs Immune system a boost, but all these tools are designed to clean your PC after the evil buggers have arrived on your PC.

What if there was a way to prevent the crap from even hitting your computer in the first place? It may sound like Eutopia, but there is a very simple way you can limit your PCs exposure to these parasites on the internet.

Enter the HOSTS File.

The hosts file is a text file on every Windows® computer. This file has a mapping of host names to IP addresses. This overrides the DNS Server you normally use when connected to the Internet. Essentially Hosts Files are used if you want to connect to another computer with a name rather than a number. For example, you may have a home network and the other pc could be at but you want to connect to it using the name "KidsPC" you can put this in the HOSTS file of your computer and then you can reference the Kids PC by the Name "KidsPC" rather than the number. Infact some viruses in the past have modified this file to prevent users from browsing to antivirus websites.

Okay. Now that you know what the HOSTS file is. What can you do to protect yourself? So. If you had a list of all the websites out there that propigate parasites you could override the ability for your PC to access these websites by adding fake IP addresses for each Hostname.

There's one very important IP address to know. Luckly it's also very easy to remember. This IP address is "Home" or the local computer. Infact your computer will have 1 entry in the HOSTS file. this entry is:
  • localhost
This means that your computer is known as localhost. You can define any website as in your hosts file and this will prevent browsing to that website. (parents, this is a simpleway to block your kids from going to certain sites too.)

So How Do I Know What Sites to Put in the HOSTS File?

Here's the easy part. Somebody's done this for you. All you need to do is download the hosts file from Website. Then either replace your hosts file with the one from or if you've tweaked your hosts file, add the mappings from their hosts file to yours.


Drumsticks said...
This comment has been removed by a blog administrator.
Drumsticks said...

I have been using the hosts file to keep my step-father, of all people, away from the porn sites that like to download parasites and nice things on the computer. I am frankly tired of fixing the computer after every use, so I decided to block the sites that are bad.

With that said, in order to be sure that you are blocking the site thoroughly, make sure you omit the 'www' and type in only the domain name first, for example

Then, add the 'www' preceding the domain name, for example:

If you do not add both types of addresses for one domain name, the site will be accessible if the user types the domain name address type that is not included in your hosts file.

Also, there are routers that allow you to block sites for the entire network. This is handy if you have more than one computer in your network and want to block your entire network. It makes it easy so you do not have to adjust every single hosts file for every computer you own. All you have to do is include the domains in the 'blocked sites' list that is accessible in the router, and the sites are blocked before it can reach your local area network.

This is a good tip for germanpickle's fiance to prevent germanpickle from being on the computer so much. ;)