Skip to content
BriteWork

BriteWork

Blocking Ads and Malware with MVPS HOSTS

Posted on October 30, 2012May 20, 2018 By britework No Comments on Blocking Ads and Malware with MVPS HOSTS

You can use the HOSTS file to block ads and banners, but you can also block many of the parasites and  malware that get onto our machines by surfing websites.  Here is a link to a MONSTER HOSTS:

http://www.mvps.org/winhelp2002/hosts.zip

Banner ads are not all evil and many respectable sites make a living with them. But even a respectable site can unknowingly display an ad that will get you get hijacked by a script or download that can render your machine unusable or worst begin gleaning your passwords by logging your key strokes.  After your download the above HOST file you will need to put that in a specific folder:

Where’s my hosts file?

  • Windows 95 / 98 / ME: C:\Windows (I think)
  • Windows NT: C:\WinNT\hosts
  • Windows 2000: C:\WinNT\system32\drivers\etc
  • Windows XP: C:\Windows\System32\drivers\etc
  • Windows Vista: C:\Windows\System32\drivers\etc
  • Windows 7: C:\Windows\System32\drivers\etc
  • FreeBSD / Linux / Mac OS X / Unixish operating systems: /etc/hosts
  • Classic Mac OS: please read this helpful information submitted by David “iNerd” B
  • Mac OS 9: Marcia Skidmore sent in details that hopefully explain what you need to know
  • Mac OS 10+: Tina Kent sent in details for later versions of Mac OS

What Does it Do?

The HOST file redirects the browser to look for banner content at 127.0.0.1 instead of the actual banner host on the interwebs. 127.0.0.1 is a special IP address which, to a computer, always means that computer. Any time a machine sends a network request to 127.0.0.1, it is talking to itself. This is very useful when it comes to blocking ads, because all we have to do is specify the IP address of any ad server to be 127.0.0.1. And to do that, all we have to do is edit the hosts file. What will happen then is something like this:

  1. you visit a web page
  2. the web page contains a banner ad stored on the server “ads.example.com”
  3. your computer says “ads.example.com? never heard of it. wait a second, let’s see if I’ve got the number on me…”
  4. your computer finds its hosts file and checks to see if ads.example.com is listed
  5. it finds the hostname, which points to 127.0.0.1
  6. “great”, says the computer, and sends off a request to 127.0.0.1 for the banner ad that’s supposed to be on the page
  7. “oh”, says the computer, and fails to show anything because it just sent a request to itself for a banner ad

 

Once that is done then close your browsers and reopen and viola you should no longer see any banners.

 

Security

Post navigation

Next Post: WMIC remotely find out who is logged into a system or what kind of system it is (pizza box?!?)

Leave a Reply

You must be logged in to post a comment.

Categories

  • CMD
  • Database
  • Linux
  • Oracle
  • Security
  • Tools
  • Uncategorized
  • Windows
October 2012
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
    Nov »

Copyright © 2025 BriteWork.

Powered by PressBook Masonry Dark