One of the simplest ways of protecting yourself against outbound traffic to known malicious websites is with a Hosts file. If you want to prevent access to a known malicious website, for instance, www.badhacker.org, you would add an entry
Using a Hosts file in this way has its pluses and its minuses.
- A Hosts file requires no software installation. The Hosts file is referenced, natively, by every IP stack in every operating system.
- A Hosts file is universally used. There are multiple well known and reliable providers of free Hosts files, which define known malicious websites.
- Each entry defines precisely one website. The entry
blocks access to only www.badhacker.org. A separate entry is required for badhacker.org, and another for www1.badhacker.org.
- The Hosts file will become quite large. The HPGuru, a very comprehensive file, is currently over 1M in size, when expanded and installed.
- Loading the file takes significant CPU power, if not configured properly. If the DNS Client service is running on your computer, and you make any change to Hosts, your system could be unusable for 10 to 16 minutes.
- To be effective, the file must be kept up to date. The bad guys are constantly creating new domains, and subdomains.
- It will only block access by website name. Neither of the following will work: