Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to populate a fake browser history?

I am working on a website related to physically/psychologically abused person.

There is an emergency exit button available all time so the user can click on it before the "aggressive" person enter the room where the computer is located.

When the user click on the emergency button, the user is automatically redirected to Google with a query like "cooking apple pie" (this is an example).

Also, we would like to hide our website from the browser history in case the aggressive person check the history of the abused person. I think this cannot be done technically.

At least, can we generate fake browsing history to justify to the aggressive person the time that the user was on our website?

I tried multiple things to simulate a "browsing" like using an iframe or an ajax query to another website but none populate the browser history.

Is this can be done?

Thank you for your input!

like image 704
Sebastien DErrico Avatar asked Jul 01 '13 14:07

Sebastien DErrico


2 Answers

I think you may be focusing too much on the browser and computer that you do not control and not enough on the content and the server that you do control. How about taking a different approach? Why not generate the pages for the user on the fly? The links are only good once. If you click on the home button (your escape key) and the aggressive person looks in the history the attempt to access them a second time could be made to display the weather or lottery results or something innocuous, Focus on what you have control over.

like image 178
ojblass Avatar answered Oct 15 '22 05:10

ojblass


Useful Technical Details

Removing/Preventing Back Button Click History

You can allow the user to browse throughout a webpage without building up a history trail on the back button by having them click exclusively on javascript: links. This would still not remove any of the visited websites from their full browser history, so it's not a full solution.

Here's an example HTML JavaScript link:

<a href="javascript:document.location.replace('http://www.google.com/#q=something+innocuous');">CLICK HERE TO ESCAPE!</a>

If this is acceptable, you could build an inoffensive homepage from which the user could access the site that would use JavaScript to send them to the real website. Every link on that new website would have to be a javascript link. Disadvantages of this would be that they would no longer be able to use the back button to navigate and that JavaScript is 100% required for the site to function.

Sanitized History

Make sure you have inoffensive titles and icons for any pages in the site so if the user does not delete their browser history they will not grab the attention of the third party.

Preventing Access to Protected Content

One option you have is to disguise your website as something else by having the user log in before they are allowed to access any of the content. You could save their session/login data in such a way that it is cleared if they hit an escape button it is erased or reset. As part of the login page, you could give users an alternate password to type in that would redirect them to fake content if their abuser becomes suspicious enough to demand they log in.

The session/login information should never save between browser sessions and always have a short expiration period, to further reduce the chances of the abuser gaining access to the website.

Disguising the Site

Considerations

If you choose to disguise the site either on the homepage or behind a "fake" login, be very careful to choose something that makes sense and would not arouse suspicion or interest. You don't want the fake page to be some sort of game or anything that might pique the third party's interest.

You also don't want it to look so boring or mundane that the original user would be hard-pressed to explain their possibly frequent visits. It shouldn't be anything so specific that the third party would think twice about the original user visiting it though. For example, it might be suspicious if someone who does not enjoy the great outdoors were to be visiting a page on mountain biking.

It also can't do something like just redirect them to Google without explaining the fact that they had to log in to access it.

General Advice

Private Browsing

Multiple sources have suggested either educating your target audience in how to use IE's InPrivate Browsing mode, Firefox's Private Browsing mode, or Chrome's Incognito mode.

There unfortunately does not appear to be a way to prevent the browser from keeping the current page in its browsing history through JavaScript. It's possible there might be some sort of plug-in or third-party control which would enable this, but it's probably just easier to get your users to use a private browsing mode.

Clearing History

Clearing a user's web history would not be possible since browsers restrict websites from accessing or altering data on the user's computer directly. Since the user's browser history is part of this data it would be a security issue if any website could clear the history.

You should provide instructions to your users for pruning or clearing their browser history, whether on the website itself before they enter, or through whatever resource you showed them how to access your website.

Generating a Fake History

If you need to generate a fake list of visited websites, you can always create new tabs/windows for the users (or possibly iframes) at timed intervals with JavaScript, but the user would have to disable their popup blocker for this to take effect.

Further Reading

Here is a helpful article on creating a useful Quick Disguised Exit From A Website. This forum thread that I found it on also had some useful information, but it's likely you've already seen it.

like image 35
Corion Avatar answered Oct 15 '22 06:10

Corion