2

I'm using the latest version of Firefox with Ghostery and Adblock plus installed. This website somehow prevents navigation away from it. How does it do this and how can it be protected against?

I can't even close the browser now.

http://www.imagesnake.com/ad.html I didn't realize it at first as I was using Adblock Plus but the site causes popups containing pornography.

muru
  • 364
  • 1
  • 3
  • 14
Celeritas
  • 10,039
  • 22
  • 77
  • 144

1 Answers1

5

I did visit the page (from a safe place!) and it's triggering the beforeunload event to change the URL, like this:

var exit=true;
var temp_url = document.location.href;
var url_pieces = new Array();
url_pieces = temp_url.split("/");
var goto_url = 'http://www.imagesnake.com/ad.html' ;
window.onbeforeunload = function () {   
if(exit==true){ 
    location.replace(goto_url);   
    return "   Special Offer: Free Porn Videos ";
}
}

I did this with Chrome, and got the "Page is asking if you want to leave..." dialog, and was able to close the page. I can guess that, depending on the browser, one might not be able to get out.

There may be other tricks in the plethora of JavaScript the page loads. This is the one that stood out for me, based on the browser dialog.

Bob Brown
  • 5,283
  • 1
  • 19
  • 28