Slashdot Mirror


Cloaking Detection?

drcrja asks: "I am conducting some academic research on the use of cloaking and how it affects search engine rankings (cloaking is the practice of delivering a specially optimized page to search engine spiders while delivering a completely different page to the user). I am currently using Alta Vista's Babel Fish to retrieve pages and compare those pages to the pages on the actual web sites but I am trying to find other methods of detecting cloaking. I am wondering if any members of the /. community have any experience with this?"

42 comments

  1. user agent. by QuodEratDemonstratum · · Score: 2, Funny
    1. Get a browser which lets you alter the useragent, or use a proxy.
    2. Set it to the name the search engine's spider uses.
    3. Browse away.
    4. ???
    5. profit.
  2. You left out by Anonymous Coward · · Score: 0

    3a. Steal underpants
    4. ???
    5. profit

  3. Re:Just follow the ion emissions by irony+nazi · · Score: 4, Informative
    Well, that is the way to detect Vulcan cloaking, but in order to detect website cloaking, try some variation of the following:

    Ingredients:
    Computer
    Perl
    Internet Connection
    LibWWW, UserAgent, and all the dependencies, I forgot which
    Optional: Perl Cookbook, by Christianson and Torkingham.

    Directions:
    Start with the Perl Cookbook to give you a quick background of how to design an autonomous www agent that will crawl around gathering webpages. You can have them visit links or read from a list of links or whatever you want.

    Read the documentation from the Perl UserAgent libs and figure out how to change the http headers to spoof various browsers. I've done this before. I think that I ended up going into the UserAgent code and doing this manually. I don't remember exactly how I accomplished this, I just remember that it was easy.

    Now have to agents to crawl websites and compare output from one website using the "Spider" http headers with the output from spoofing the "IE" http headers. Websites would sometimes still think the IE headers were a robot. The key is to pause the request so that it is as though a human is reading the page/clicking the links/etc.

    Keep track of the sites that are different or keep track of whatever stats that you need.

    Mix, Stir, Burn, Enjoy.

    I've actually done this type of thing before in order to test various IE only websites on non-IE browsers (non-MS computers). My results were that all of the pages the *require* IE render perfectly in Mozilla and most render fine in Opera. I still don't understand why businesses would *turn-away* potential customers only for having different http headers!

    --

    Bringing irony to the Slash-masses
  4. I'd make or modify an existing program to do this by stienman · · Score: 5, Informative

    I imagine wget or another HTTP client can be coaxed to spit out the spider and browser type strings associated with search engine spiders. It would be a simple, straightforward hack to make a script that would request a page twice, once reporting itself as a search engine (and requesting the robots.txt file for good measure) and secondly as a regular browser. Then do a simple compare.

    You could give it a list of sites and it could go through dozens or hundreds of sites a minute, rather than you doing it by hand. You could have it save pages that show differences, or at least give you the URLs so you could load them later and study the differences (if that is a goal).

    You could use PHP, perl, java, etc to do this very simply as well. I imagine a simple PHP script could well be less than 50 lines, and could even call your browser and load the two pages side by side each time it found a difference.

    -Adam

  5. Use Konqueror by JabberWokky · · Score: 3, Informative
    Use Konqueror and set your UserAgent to that of a search engine spider. I'm sure this can be done with most any web browser - in Konqueror, just go to Tools/Change Brower Identification. You'll probably have to add a new one (for some reason a spider userid string isn't common enough to be a standard one) - you can do that in Settings/Configure Konqueror/Browser Identification.

    --
    Evan

    --
    "$30 for the One True Ring. $10 each additional ring!" -- JRR "Bob" Tolkien
    1. Re:Use Konqueror by QuodEratDemonstratum · · Score: 2, Informative

      Some lists of useragent strings are here and here.

    2. Re:Use Konqueror by Anonymous Coward · · Score: 1, Funny

      Your nickname is wrong. It should be quod erat demonstrandum, not demonstratum. As you have written it, you have taken the gerundive and made it a perfect passive participle.

    3. Re:Use Konqueror by neophase · · Score: 1

      Mozilla (recent releases, I'm currently running RC1 of 1.0) can send arbitrary UA strings by using David Illsley's uabar, available at http://uabar.mozdev.org/ . Enjoy :)

      --
      ==================================
      neophase
  6. If cloaking becomes a problem... by tswinzig · · Score: 3, Interesting

    ...why don't the search engines just play the game? Cloak themselves to look like regular users.

    Download the robots.txt file through one set of IP addresses, with your normal user-agent header. Then request the actual pages using a Mozilla or MSIE user-agent ID, and using new IP addresses that cannot be traced back to google (or whoever) using DNS. Queue up URL's to be downloaded in a random order so that a really clever website can't detect your robot by examining traffic patterns. (I.e. maybe take a full day or week to download all the pages from a site.)

    If they did all this, could someone still detect it's a search engine robot and use cloaking?

    --

    "And like that ... he's gone."
    1. Re:If cloaking becomes a problem... by mclearn · · Score: 1

      Sure, base the decision on those IPs requesting /robots.txt.

    2. Re:If cloaking becomes a problem... by mclearn · · Score: 2, Interesting

      Well, I gues that's what happens when you don't hit preview, eh? :-)

      I was going to qualify that by saying that statistically-speaking, one could deliver the false page to the set of requestors following closely behind the IP that grabbed /robots.txt. Of course, you go on to say that why don't the search engine companies spread the requests out?

      Well, how does the search engines know who is a cloaker and who isn't? Search engines *should* be good netizens, and abide by rules of conduct. Hence /robots.txt, throttling, some form of search that doesn't kill a server (eg. breadth-first), etc.

    3. Re:If cloaking becomes a problem... by dattaway · · Score: 2

      If they did all this, could someone still detect it's a search engine robot and use cloaking?

      I am seeing "cable customers" with very interesting browsing patterns that suggests this is already happening. They appear to be normal IE98 browsers, but pick up one page per minute in no particular order. Something like that is more likely done from something like a search engine script list than a human.

      I have thought of setting up Junkbuster info string to make my browser appear as a robot when I view sites. ...just to be clever, checking out robots.txt first. I'd imagine the pr0n sites would give me the keys to the place...

    4. Re:If cloaking becomes a problem... by Mr+Z · · Score: 1

      It could be spammers harvesting addresses, as this page indicates.

      On 6.26am the morning of May 13th, 2001, the link is hit from IP 24.1.197.144 - a residential cable modem in Arizona, then on the @home network, now Cox. The browser is identified to the web server as a generic windows 95 version of Netscape. Of course it isn't, its an email harvesting robot that goes from web page to web page.

      Tada.

      --Joe
    5. Re:If cloaking becomes a problem... by SplatFileGoo · · Score: 1

      >why don't the search engines just ...Cloak
      >themselves to look like regular users.

      They do. Altaviast, Inktomi have been know to in the past, and some suspect Google does too.

      You don't think all those generic browsers coming from Exodus are real users do you? They all use Exodus and can sniff out cloaking at a whim.

      The problem?

      Having spidered millions of pages, it's pretty obvious that some form of cloaking is at work on a very high percentage of top sites.

      - Agent cloaking for browser support. (all the se's, and major sites do this).
      - IP based cloaking to feed custom languages. Sites such as Google auto redirect from cloaked setups to the local language (eg: google.com becomes google.fr in french for someone from france).

      Have an intelligent robot sort through that, and determine if a page is cloaked for se promotion purposes or just user purposes, is next to impossible without a brain behind the keyboard.

    6. Re:If cloaking becomes a problem... by Quadrature · · Score: 1

      Sure, just throw something into robots.txt that isn't linked to anywhere on the site. When some supposed "browser" loads it you know where it came from... You could even have some script change the bait URL each time robots.txt is requested and log the IP with that bait URL so you could track multiple abuses.

  7. Problem by epsalon · · Score: 3, Informative

    Some sites may apply cloaking based on the IP addess of the spider.

    I suggest using Google's cache as a method to detect cloaking. The advantage is that the page cached is exactly the same page used for indexing, and google is the most popular search engine, and thus you win.

  8. Re:Just follow the ion emissions by penguinboy · · Score: 3, Informative

    Read the documentation from the Perl UserAgent libs and figure out how to change the http headers to spoof various browsers. I've done this before. I think that I ended up going into the UserAgent code and doing this manually. I don't remember exactly how I accomplished this, I just remember that it was easy.

    It's quite straightforward:

    my $ua = LWP::UserAgent->new;
    $ua->agent("Whatever 3.11/sun4u");

  9. How to detect cloaking by gnovos · · Score: 4, Funny

    Use your long range sensors to detect search-space anomolies.

    --
    "Your superior intellect is no match for our puny weapons!"
    1. Re:How to detect cloaking by Anonymous Coward · · Score: 0

      No. Drop some mines and use the flash effect of the explosion to get a lock-on.

      I miss playing SFB :-)

  10. google's cache; search engine cloak=bad by Craig+Ringer · · Score: 5, Insightful

    Hi
    First: sometimes google cached copies of pages might be informative.

    Changing your browser's User-agent str won't always detect the cloaking, as it is quite likely to be configured to work by ip addr block too (googlebot!). Similarly, babelfish may not show cloaked pages because it comes from a different IP than altavista'a index bots and this can be checked for in the cloaking server's config.

    Second: it is *imperitave* that search engines keep unique user-agent strings that identify them. P'haps none of you who suggested the engine change user-agent str runs a website? It would remove a great tool from log analasys, and in the end make no difference to cloakers as they'd just do engine detection by IP anyway.

  11. I thought by 1Oman · · Score: 1

    I thought google ranked websites by the number of pages that linked to a site. How do you fool the spider into thinking that more sites link to your site than really do?

    1. Re:I thought by majorero · · Score: 1

      You register a bunch of unrelated domain names, create dummy sites and interconnect them all. There's an actual name for this, I just can't remember it.

    2. Re:I thought by praktike · · Score: 1

      google-bombing. usually done through blogs as well.

      --
      -------- -praktike
  12. I do this for one of my sites by Karora · · Score: 2, Informative

    I make fairly extensive changes to one of my sites for search engines.

    Things I do are:

    • Make the content more easily indexible.
    • Reduce the numbers of links to the same content.
    • Present the variable content first

    I have had a number of problems with badly behaved search engines basically DoSing the site as well.

    Many search engines are easily identifiable by looking at the HTTP_REFERER, but for some of the stealthier ones you have to identify them by source IP, and of course the technique is only ever going to be 95%.

    I really limit the options down and make the site look much like one of those old hierarchical sites of old. After all, the search engine is going to see the whole lot of it and I'm sure it is easier for them to navigate a tree without redundant processing since most of the site navigation is about providing multiple content categorisations of what is basically the same content.

    --

    ...heellpppp! I've been captured by little green penguins!
  13. To the poster of the question. by perlyking · · Score: 3, Informative

    I recommend you look at Webmasterworld there is a massive amount of knowledge there.
    One of the guys from google even posts there on occasion.

    --
    no sig.
  14. Re:How to detect cloaking - Star Trek style... by AtariDatacenter · · Score: 2, Funny

    I'm trying to remember the details of the episode where they had the Klingon civil war, those wonderful Duras daughters (and coward son), and the daughter of Tasha Yar. They made some sort of tachyon network between a large number of starships to try to find a cloaked Romulan convoy crossing into Klingon space. Of course, in the end, Lt. Commander Data used a modified photon torpedo to illuminate a cloaked Romulan ship.

    Therefore, I would suggest that a photon torpedo would be the method best used against cloaked sites. Just one should do the trick.

  15. MSIECrawler is part of IE 4 by yerricde · · Score: 2

    I am seeing "cable customers" with very interesting browsing patterns that suggests this is already happening. They appear to be normal IE98 browsers, but pick up one page per minute in no particular order. Something like that is more likely done from something like a search engine script list than a human.

    If the user agent says MSIECrawler, then it's a browser feature. Microsoft Internet Explorer 4 (packaged with Windows 98) and later have a feature to mirror web sites locally for offline browsing.

    --
    Will I retire or break 10K?
  16. Re:Marv Albert, sportscaster, dead at 54 by RedWolves2 · · Score: 0, Offtopic

    Marv Albert is not dead you asshole (That wasn't even funny). But I was looking for that story anyways and found that he was in a serious car accident yesterday. Read here.

    Oh and by the way Marv Albert is 60 years old.

    Sorry I know off-topic but I had to clear things up.

  17. Google API by mini+me · · Score: 1

    You can retrieve cached pages from Google using their new SOAP API.
    This would allow you to automate the process significantly.

    This limits you to just Google, but it is a start.

  18. Re:I'd make or modify an existing program to do th by Martin+Spamer · · Score: 2

    Then do a simple compare.

    It's not nessecarry to compare the pages, calc a CRC or HASH for each version and test/store those.

  19. Good reasons to vary response by Martin+Spamer · · Score: 3, Informative

    (cloaking is the practice of delivering a specially optimized page to search engine spiders while delivering a completely different page to the user).

    There are good reasons for a site to respond differently to different clients. Indeed responding to the capabilities of the client should be considered 'best practice'.

    There are a host of client types out there other than just PC Browsers and Robots, IDTV STB's, 3G & WAP Phones, Convergent devices. The range is set to explode.

    This is the whole reason for the Http 'Accept' header, which is provided to allow a server to handler clients with different capabilities.

    http://www.w3.org/Protocols/rfc2616/rfc2616-sec1 4. html

  20. Re:I'd make or modify an existing program to do th by stienman · · Score: 2

    Many of the site he'll likely be testing have some dynamic content in them, such as a date and time, counter, etc. A simple compare will show those lines that are different - if a lot is different then you know the page has changed significantly. If the compare only spits out a few lines you can log them and look at them later, or simply assume it's giving a different page to a different user and modifying some date/time/ads/cookie/etc info.

    A CRC or HASH will be a bit faster, but I suspect they'll turn up more false positives and create more post-processing than necessary.

    -Adam

  21. I've seen this work by xrayspx · · Score: 2, Funny

    If you vent your nacelles the resultant plasma trail should make any cloaked vessels which may be following you visible to the naked eye long enough to shoot at them.

  22. Re:user agent. Who want's to vew optimized pages by A55M0NKEY · · Score: 1

    The optimized pages are probably just tons of keywords that you would not be interested in viewing anyway. Every concievable synonym for 'Nude' for instance.

    --

    Eat at Joe's.

  23. Re:I'd make or modify an existing program to do th by Mad+Marlin · · Score: 1
    I imagine wget or another HTTP client can be coaxed to spit out the spider and browser type strings associated with search engine spiders. It would be a simple, straightforward hack to make a script that would request a page twice, once reporting itself as a search engine (and requesting the robots.txt file for good measure) and secondly as a regular browser. Then do a simple compare.

    For wget, --user-agent= AgentString will determine what user agent it reports. A list of user agent strings may be found here. The file robots.txt is retrieved by default in wget.

  24. Re:I'd make or modify an existing program to do th by majorero · · Score: 1

    So use a CRC/Hash to filter out the obvious and then a simple compare to try to narrow down the false positives.

  25. Cloaking by SplatFileGoo · · Score: 2, Informative

    > sometimes google cached copies of pages might be informative.

    Look at all the trouble Google is finding itself in with the "cache" (term used loosely since Google doesn't "cache" pages - they "page jack" them and put their own self advertisments on them). It's a ticking time bomb.

    Tick, Scientologists,
    Tick, German railroads,
    Tick, Ok who's next?

    > cloaked pages because it comes from
    > a different IP than altavista'a index bots

    Alta spiders from the Babelfish ip too. They switched the ip last year just to rat out cloakers.

    > You can retrieve cached pages from
    > Google using their new SOAP API.

    Not if the webmaster has used the NOARCHIVE tag (which itself is probably cloaked if done properly).

    > Indeed responding to the capabilities of the
    > client should be considered 'best practice'.

    Absolutly. Language differences, display differences, and various levels of css/dom/scripting support are all quality reasons to cloak. I have a site that deliver 8 different versions of a page based on ip and agent.

    There are also cloaking programs sponsored by the search engines themselves. Inktomi's index connect, and Altavista's "trusted feed" programs encourage the cloaking of pages to protect them.

    Did you know every major search engine cloaks their own site? Here's one that is agent cloaked by Google themselves: http://wap.google.com . If you don't have the right secret decoder ring, all you will see is stock Google.

    --

    >LibWWW

    lol. No cloaker worth his salt would agent cloak for se purposes today. It's all 100% IP based detection. Unless you are parked on a searchengine ip address, you won't know what you are looking at.

    With se's moving to off-the-page criteria (links and contextual themes such as google, teoma, and wisenut) this whole discussion is moot.
    Cloaking for search engine purposes is rather rare anymore.

    The hay day of cloaking was 99 when their was so much page jacking on Altavista. If you had a top ranking page, it was sure to be ripped off by afternoon and your rankings destroyed in the next update. In that environment, cloaking skyrocketed.

    Now that Alta is a dead search engine walking, Inktomi requires fees, and all that is left is Google - it just doesn't make economic sense to cloak. Even if you can cloak, it does very little good and you really, really have to know what you are doing.

  26. How I've seen it done by The+Bean · · Score: 2, Informative

    I know of a company that used to make a living doing exactly this type of thing. The biggest thing for them was checking for requests for robots.txt. Once it detected a request for this the IP was placed in a database for future reference. They owned a large number of domains, and made up many pages containing the keywords that the client wanted their site to "show up under," with links between them all. These pages were served to any client that had previously requested the robots.txt file. But when a request for one of the pages was received from an IP that hadn't requested robots.txt, they were bounced to the clients site.

  27. detecting cloaking... by dousette · · Score: 3, Funny

    Didn't that require some sort of inverse tackyon pulse from the main deflector?