Monday 8 March 2010

How to improve Safe Browsing

Remember my first post on this blog? It was about malware on the site. According to Google nowadays almost every website could be infected with malware, and I believe that that is true.

As webmaster I want 2 things:
  1. That the site does not contain malware;
  2. That I do not link to a site containing malware.
The second option seems to be the hardest, because I don't have control over the sites to which I link. So I thought, may be should I use Google's Safebrowsing website.

With some help of Snoopy I created some PHP code to test if a specific website is suspicious. The idea is good, however the bottleneck is the response time. It takes more than 6 seconds to check 36 external links.

See for example this Dutch testpage and be patient ;-) All external links where created with this PHP function:

function showLink($naam, $titel, $url) {
  $snoopy = new Snoopy;
  $file = "http://google.com/safebrowsing/diagnostic?site=".$url;
  $snoopy->fetchtext($file);
  $suspicious = stripos($snoopy->results,"Site is listed as suspicious");
  if ($suspicious == FALSE) {
    echo "normal external link";
  }
  else {
    echo "warning";
  }
}

May be should I leave it to the browsers. When I try to visit the site mashaei.ir with:
  1. Google Chrome - I get a safety alert
  2. Mozilla Firefox - I do not get a safety alert
  3. Mozilla Firefox with the Web Of Trust addon - I get a safety alert
  4. Safari (on a Mac) - I do not get a safety alert
  5. Internet Explorer 8 - I do not get a safety alert
  6. Opera - I do not get a safety alert
So, I advice to start Safe Browsing now by using
  1. Google Chrome, or 
  2. Mozilla Firefox with the Web Of Trust addon 
as your default browser. This despite the IE8 Smartscreen Filter ...

Update 14 march 2010: There are also Web Of Trust addons for Internet Explorer and Google Chrome. So I advice to browse only with one of the following browsers with the WOT addon.
  1. Google Chrome
  2. Mozilla Firefox
  3. Internet Explorer
Update 28 march 2010: Discovered that the site www.debontestegge.nl is not safe according to Google Chrome and to Mozilla Firefox. Browse safe. Use:
  1. Google Chrome with the WOT addon or
  2. Mozilla Firefox with the WOT addon.









Google gives a warning, while WOT trust this site.

1 comment:

  1. You could also implement the API fully, which would mean keeping a local copy of the list, which would reduce your response time, but make your code more complicated.

    http://code.google.com/apis/safebrowsing/

    ReplyDelete