News for hackers. Stuff that matters.
Re:Can you get pwned with CSS? by brigandish on Monday February 28, 2022 @06:48PM (#30506896)
Check the colours of links, if they're blue, they're new, if they're purple, they've been visited. It works the same way for anyone looking at the page, not just the user's eyes.
Re:Can you get pwned with CSS? by easrng on Monday February 28, 2022 @07:11PM (#30507150)
That's not true, did you read the MDN page?

> The window.getComputedStyle method, and similar functions such as element.querySelector, will always return values indicating that a user has never visited any of the links on a page.

Re:Can you get pwned with CSS? by brigandish on Thursday March 03, 2022 @02:13AM (#30538062)
I did, before it was fixed[1]:

> For many years the CSS :visited selector has been a vector for querying a user’s history. It’s not particularly dangerous by itself, but when it’s combined with getComputedStyle() in JavaScript it means that someone can walk through your history and figure out where you’ve been. And quickly – some tests show the ability to test 210,000 URLs per minute. At that rate, it’s possible to brute force a lot of your history or at least establish your identity through fingerprinting. Given that browsers often keep history for a long time it can reveal quite a bit about where you’ve been on the web.

> At Mozilla we’re serious about protecting people’s privacy, so we’re going to fix this problem for our users.

[1] https://hacks.mozilla.org/2010/03/privacy-related-changes-co...

Regardless of it being fixed (thanks for the update) it's still possible to do this via timing attacks. I wouldn't be surprised if the sieve that is a browser still allowed it in some other way.

Re:Can you get pwned with CSS? by worg on Monday February 28, 2022 @09:15PM (#30508415)
if one's feeling determined and creative there's the possibility to render the link to a canvas and get pixel colors
Re:Can you get pwned with CSS? by easrng on Tuesday March 01, 2022 @02:20PM (#30518732)
Links in images are always rendered as unvisited. See https://output.jsbin.com/wowalokusa, the first is an HTML link, the second is a link in an SVG, the third is a link in an SVG in an image.
Re:Can you get pwned with CSS? by SahAssar on Tuesday March 01, 2022 @03:14AM (#30511121)
IIRC rendering the html to a canvas is done with a empty history, so all links will look unvisited.
Re:Can you get pwned with CSS? by EE84M3i on Monday February 28, 2022 @09:37PM (#30508628)
I believe if you can do this, it would be considered an exploit. You're not supposed to be able to.
Re:Can you get pwned with CSS? by worg on Wednesday March 02, 2022 @03:37PM (#30532753)
yep, it seems I was mistaken, rendering links to SVG/Canvas wouldn't work
Re:Can you get pwned with CSS? by codeafin on Monday February 28, 2022 @06:58PM (#30507013)
What's the last product you've seen that still uses this color system?
Re:Can you get pwned with CSS? by pkqxdd on Monday February 28, 2022 @07:09PM (#30507132)
Google search
Re:Can you get pwned with CSS? by jfk13 on Monday February 28, 2022 @07:42PM (#30507497)
Sure, it shows those colours to the user. But they're not exposed to the website; if it tries querying the colour of the links, the browser returns the same blue value for all of them, visited or not.
Re:Can you get pwned with CSS? by JacobThreeThree on Monday February 28, 2022 @08:08PM (#30507766)
It used to be that CSS leaked all visitor states with no user interaction. This was patched by browsers a few years back, but there are still ways to extract some data from :visited, it just requires user interaction now.

https://frantzmiccoli.github.io/visited-captcha-history/

Re:Can you get pwned with CSS? by SahAssar on Tuesday March 01, 2022 @03:21AM (#30511171)
That's pretty limited though. You can only check urls (not domains), and only as many urls as there are characters in the captcha.

It's a clever hack though!