Softpanorama

May the source be with you, but remember the KISS principle ;-)
Home Switchboard Unix Administration Red Hat TCP/IP Networks Neoliberalism Toxic Managers
(slightly skeptical) Educational society promoting "Back to basics" movement against IT overcomplexity and  bastardization of classic Unix

Blocking spyware sites via the hosts file

News Main spyware page Recommended Links Recommended Papers Spyware Scanners Non-scanner antispyware tools
          Etc

You can modify the hosts file to control DNS name resolution. Here is the initial hosts files shipped with Windows:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1    localhost

If the entry exists in the host file it is used first, before DNS. This way you can block spyware sites pointing them to the address 127.0.0.1 which is so called local host --address pointing to your PC, for example,

127.0.0.1    abetterinternet.com

 To edit the hosts file, follow these steps:

1. Click Start, click Run, type notepad %windir%\system32\drivers\etc\hosts, and then click OK.
2. Add lines form you IE history (see below how to save it) that represent spyware sites.
3. On the File menu, click Save.
4. Quit Notepad.
5. Restart the computer.

Note If you do not want to restart the computer, flush the DNS resolver cache. To do this, follow these steps:
a. Click Start, click Run, type cmd, and then click OK.
b. At the command prompt, type ipconfig /flushdns, and then press ENTER.

Getting History from IE

The crude way of getting IE history is using strings utility on files from folders in

C:/Documents and Settings/username/Local Settings/history

But there is also programmatic way to do that as describes at CodeGuru Getting the History from Internet Explorer:

I just wanted to access the history of Internet Explorer. I found no code anywhere to get it directly, but somehow I managed to combine some of code and get this working application. The code isn't very great, but it is somewhat useful, you can say. I am not a great writer, so don't expect a good explanation. My coding style is self-explanatory. If you open the IEHistory.h file, you will get to see everything.
[
  #include <atlbase.h>
  #include <comdef.h>
  #include <mshtml.h>
  #include <UrlHist.h>
  #include <afxtempl.h>

  BOOL  GetHistory(CStringList & list)
  {
    STATURL url;
    CString strUrl;
    ULONG uFetched;
    IUrlHistoryStg2Ptr history;
    IEnumSTATURLPtr enumPtr;

    if(FAILED(CoCreateInstance(CLSID_CUrlHistory,
          NULL,
          CLSCTX_INPROC_SERVER,
          IID_IUrlHistoryStg2,
          ( void**)&history)))
          {
            return false ;
          }

          if(FAILED(history->EnumUrls(&enumPtr)))
      return false;

    while(SUCCEEDED(enumPtr->Next(1,&url,&uFetched)))
    {
      if(uFetched==0)
        break;
      strUrl = url.pwcsUrl;
      list.AddTail(strUrl);
    }
    return true;
  }
]
Download demo project - 28 Kb
Download source - 11 Kb

Top Visited
Switchboard
Latest
Past week
Past month

NEWS CONTENTS

Old News

block_ips free list

Feel free to circulate this list, use it to block unwanted or malicious activity, and/or incorporate it into anti-spyware software. However, please do not delete any rules from it. If you think something should be added or deleted, please email me at [email protected]. Remove the two capital Ps before emailing. You can, of course, quote part of it relevent to a specific spyware. My official site is www.geocities.com/yosponge and you can obtain updates there. Thank you!
NOTE: Entries for spyware which are new or changed will say so.

Risk key:
C = Common H=High
O = Occasional M=Moderate
R = Rare

Spyware Free Spy Software Blocking Tool

Tired of all that Spyware and Adware crap being installed by ActiveX ?
But don't want to lose out on functionality?

We have created a system that blocks all known "bad" ActiveX controls from running inside Internet Explorer by setting the "Kill bit".

When a page tries to install a component from our list, it will fail.
When a page tries to use a component from our list that was already present on your system, it will fail too!

Other, "friendly" components are not affected.
For a full technical explanation how this works, look at this Microsoft article.

Recommended Links

Google matched content

Softpanorama Recommended

Top articles

Sites

***** Spyware - Wikipedia, the free encyclopedia -- general spyware information

***** Blocking Unwanted Parasites with a Hosts File contains very useful information including Various Troubleshooting Articles

HostsMan is a freeware application that lets you manage your Hosts file.
Includes an option to turn off the unneeded DNS Client Service.

Resources Ad Blocking Resources

IE-SPYAD adds a long list of sites and domains associated with known advertisers, marketers, and crapware pushers to the Restricted sites zone of Internet Explorer. Once you merge this list of sites and domains into the Registry, the web sites for these companies will not be able to use cookies, ActiveX controls, Java applets, or scripting to compromise your privacy or your PC while you surf the Net. Nor will they be able to use your browser to push unwanted pop-ups, cookies, or auto-installing programs on your PC.

Please note that IE-SPYAD is not an ad blocker. It will not block standard banner ads in Internet Explorer. What this Restricted sites list of known advertisers and crapware pushers will do, however, is

AGNIS contains a set of customized ad block lists for AtGuard, Norton Internet Security 2000/2001/2002/2003, and Norton Personal Firewall 2003. These block lists are much more extensive than the default ad block lists shipped with all of these programs. AGNIS includes both a "full" and "lite" version of this customized ad block list for each application:

Spyware Warrior Rogue-Suspect Anti-Spyware Products & Web Sites

On June 23, 2005, just 3 months after moving against SpywareAssassin, the U.S. Federal Trade Commission announced that it had taken action against Trustsoft, the company behind SpyKiller 2005, an "anti-spyware" product that has been listed on these pages since June 26, 2004 (the very day this list was first published). In its complaint, the FTC specifically named several of the more deceptive and unfair practices that are employed by many of the "anti-spyware" applications listed on this page, namely:
  • falsely claiming to have scanned users' PCs remotely and detected "spyware"
  • using high pressure sales tactics through pop-ups and spam to compel users to buy its application, SpyKiller 2005
  • selling an "anti-spyware" product that falsely detects "spyware" on users' PCs
  • selling an "anti-spyware" product that fails to remove a substantial amount of "spyware" from users' PCs

You can read more about the FTC's action against SpyKiller 2005 here:



Etc

Society

Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers :   Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism  : The Iron Law of Oligarchy : Libertarian Philosophy

Quotes

War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda  : SE quotes : Language Design and Programming Quotes : Random IT-related quotesSomerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose BierceBernard Shaw : Mark Twain Quotes

Bulletin:

Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 :  Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method  : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law

History:

Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds  : Larry Wall  : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOSProgramming Languages History : PL/1 : Simula 67 : C : History of GCC developmentScripting Languages : Perl history   : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history

Classic books:

The Peter Principle : Parkinson Law : 1984 : The Mythical Man-MonthHow to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite

Most popular humor pages:

Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor

The Last but not Least Technology is dominated by two types of people: those who understand what they do not manage and those who manage what they do not understand ~Archibald Putt. Ph.D


Copyright © 1996-2021 by Softpanorama Society. www.softpanorama.org was initially created as a service to the (now defunct) UN Sustainable Development Networking Programme (SDNP) without any remuneration. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.

This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...

You can use PayPal to to buy a cup of coffee for authors of this site

Disclaimer:

The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the Softpanorama society. We do not warrant the correctness of the information provided or its fitness for any purpose. The site uses AdSense so you need to be aware of Google privacy policy. You you do not want to be tracked by Google please disable Javascript for this site. This site is perfectly usable without Javascript.

Last modified: March 12, 2019