« I guess it depends on perspective | Main | Weekly groceries around the world »

Use your host file to protect yourself against malware ads

AdBlock Plus had been spectacularly ineffective at blocking a browser-hijacking ad that showed up each time I browsed the Webcomic List forums, but someone responding to the thread I used to complain about it provided me with some heavier artillery: a gigantic list of malicious sites to add to your host file and a page containing an explanation of why it works and instructions for adding the list. I'd been vaguely aware of this possibility, but hadn't been motivated to give it a try. The instructions on the site are very much geared towards Windows user, but Mac OS X and Linux users can just edit their hosts file in a text editor. The linux hosts file is usually in /etc - you need the one that simply says 'hosts', not 'hosts.deny' or 'hosts.allow'. The poster said OS X users can find it in /private/etc — I haven't checked.

Two comments:
One, normally when I edit config files I use 'sudo pico [file]' and enter my password. That doesn't quite work because pico, a lightweight command-line editor, doesn't like it when you try to paste in long bits of text. So I used 'sudo kate /etc/hosts' instead.
Two, the list, while awe-inspiring in its comprehensiveness, is perhaps a bit too thorough. I actually rather like advertising as a source of income for sites that provide content or services, so I want to allow ad servers that I think are well-behaved. I have that problem with the preset blacklists in AdBlock Plus as well. I want to allow, at a minimum, Google adsense and Project Wonderful, because I use them on my own sites. The malicious hosts list provided by msvp.com blocks several Google ad servers; one AdBlock subscription list blocks both, which is why at home I use AdBlock without any pre-configured list. I'm in no position to tell you to allow these sites as I have a vested interest in people allowing them, but I would encourage you not to use block lists indiscriminately as your own criteria may be different from those of the people making the lists, or the information may be out of date.


This page contains a single entry from the blog posted on November 21, 2007 10:40 PM.

The previous post in this blog was I guess it depends on perspective.

The next post in this blog is Weekly groceries around the world.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 3.34