Here's the same exploit disguised as a game, to make it less obvious that it's tricking the user into interacting with it: http://lcamtuf.coredump.cx/yahh/
Basically, the website doesn't know which of the squares are red, that depends on your browser state. By clicking the red squares, you're feeding it data.
The interesting observation I made out of this is that navigating there in an incognito window prevents any links from being considered as visited. That's good to know.
Heh. I clicked a few before I realized what was going on (looking at the status bar shows the link, which somewhat gives it away). You could prevent this by adding mouseover/out and onclick logic that removed the :href on hover and just colored itself red.
And the only reason you have to click the red squares is to let it know which ones are red. If you try to look up the color of a square using GetComputedStyle, it always comes back gray. That was the resolution of privacy Bug 147777† (":visited support allows queries into global history").
I know that the `:visited` exploit is handled by the browsers so that you can't figure out by javascript what is going on...
but what if you used just CSS to figure it out? For instance, what if you generated the CSS which had a unique image it requested via the `background-image` property, stored the data on the server, then just requested the data from the server after the fact?
Do the browsers prohibit the usage of url-based css properties on CSS selectors with `:visited` or something? Does anyone have a link/reference to how the exploits were patched up?
This just solved a huge problem I've been struggling with. This is beautiful - I don't actually want to know the information I've been trying to access, but it will make the experience better for the user. I now realize I don't HAVE to know - the browser knows, and that's all that matters. I just have to teach the browser what to do.
This is OT, trivial and a bit silly: How did you intend the json file? I tried with sublime but couldn't find anything to solve it. Didn't start an IDE for this.
Obvious question - how was the list of URLs compiled? Some are really specific like YouTube channels. On the other hand there are only 15 categories and there are probably a lot of people that would not get a single match or only something very generic like Wikipedia.
The coolest way would be cold, hard natural selection from Alexa top sites, possibly with weighting placed to relevant sites at the introduction of the dataset. Perhaps I will fork.
Couldn't one simply make a display:none on normal links and display:block on :visited, then stack them all on top each other with position:absolute and catch mouse events from each element via JS?
Can't you just :visited { margin/pos/whatever }, then probe the dom on that or related elems to extract the juice? Or have browser vendors thought of this?
[+] [-] mbrubeck|11 years ago|reply
Documentation of the game proof-of-concept: http://lcamtuf.blogspot.com/2013/05/some-harmless-old-fashio...
[+] [-] Fuxy|11 years ago|reply
Thx. for the links.
[+] [-] dzhiurgis|11 years ago|reply
[+] [-] maaarghk|11 years ago|reply
[+] [-] shurcooL|11 years ago|reply
Basically, the website doesn't know which of the squares are red, that depends on your browser state. By clicking the red squares, you're feeding it data.
The interesting observation I made out of this is that navigating there in an incognito window prevents any links from being considered as visited. That's good to know.
[+] [-] keerthiko|11 years ago|reply
Your interests are: (some subset of) Programming Science Technology Games <random other thing: Sports, TV, childcare, etc>
With literally no scripting, and everyone would find it "reasonably accurate" :D
[+] [-] espadrine|11 years ago|reply
Me being me, I clicked on random grey squares. I got exactly that.
There is a selection bias from the choice of URLs it provides.
[+] [-] mdup|11 years ago|reply
[+] [-] kej|11 years ago|reply
[+] [-] staccatomeasure|11 years ago|reply
[+] [-] joev_|11 years ago|reply
[+] [-] asadlionpk|11 years ago|reply
[+] [-] lewisflude|11 years ago|reply
[+] [-] cynwoody|11 years ago|reply
And the only reason you have to click the red squares is to let it know which ones are red. If you try to look up the color of a square using GetComputedStyle, it always comes back gray. That was the resolution of privacy Bug 147777† (":visited support allows queries into global history").
†https://bugzilla.mozilla.org/show_bug.cgi?id=147777
[+] [-] biot|11 years ago|reply
[+] [-] lrichardson|11 years ago|reply
I know that the `:visited` exploit is handled by the browsers so that you can't figure out by javascript what is going on...
but what if you used just CSS to figure it out? For instance, what if you generated the CSS which had a unique image it requested via the `background-image` property, stored the data on the server, then just requested the data from the server after the fact?
Do the browsers prohibit the usage of url-based css properties on CSS selectors with `:visited` or something? Does anyone have a link/reference to how the exploits were patched up?
[+] [-] RussianCow|11 years ago|reply
[0]: https://hacks.mozilla.org/2010/03/privacy-related-changes-co...
[+] [-] megablast|11 years ago|reply
[+] [-] tomasien|11 years ago|reply
[+] [-] Conlectus|11 years ago|reply
I can answer any questions people have.
[+] [-] analog31|11 years ago|reply
[+] [-] lurkinggrue|11 years ago|reply
Kinda weird.
[+] [-] krat0sprakhar|11 years ago|reply
[+] [-] schme|11 years ago|reply
[+] [-] ianamartin|11 years ago|reply
[+] [-] danbruc|11 years ago|reply
[+] [-] Conlectus|11 years ago|reply
[+] [-] yzzxy|11 years ago|reply
[+] [-] tomblomfield|11 years ago|reply
[+] [-] collinjackson|11 years ago|reply
[+] [-] 3rd3|11 years ago|reply
[+] [-] heycam|11 years ago|reply
[+] [-] mataug|11 years ago|reply
[+] [-] amjd|11 years ago|reply
[+] [-] rdrey|11 years ago|reply
[+] [-] krrishd|11 years ago|reply
[+] [-] PurplePanda|11 years ago|reply
[+] [-] SahAssar|11 years ago|reply
It's quite interesting to see how such a seemingly simple feature (a:visited) can completely override user privacy if not accounted for.
[+] [-] irises_come|11 years ago|reply
Can't you just :visited { margin/pos/whatever }, then probe the dom on that or related elems to extract the juice? Or have browser vendors thought of this?
[+] [-] gburt|11 years ago|reply
[+] [-] unknown|11 years ago|reply
[deleted]
[+] [-] siddboots|11 years ago|reply
It's a good example of just how difficult browser security is.
[+] [-] borkabrak|11 years ago|reply
[+] [-] Xeroday|11 years ago|reply
[+] [-] mataug|11 years ago|reply
[+] [-] MrJagil|11 years ago|reply
At first I thought it would deduct information about me by analysing which squares I'd choose in what order and through other metrics like pacing.
[+] [-] cornholio|11 years ago|reply
Indeed I am unhackable.