uBlock, I exfiltrate: exploiting ad blockers with CSS
portswigger.net
portswigger.net
>2021-11-03 11:51 - I reported my bypass to uBlock Origin
>2021-11-03 12:52 - uBlock Origin patched my bypass on master
>2021-11-08 13:25 - Reported bug in cosmetic filter
>2021-11-08 14:19 - uBlock Origin patched my cosmetic bypass
>2021-11-08 15:35 - I bypassed the patch without using comments
>2021-11-08 16:18 - uBlock Origin patched the cosmetic filter bypass
61 minutes, 54 minutes, 43 minutes. Pretty quick!
Thank you!
Of course it does. Is there a single web API that doesn't intentionally enable exploit smuggling by allowing malformed input?
Make it so that if the caller/client works at all then it must work correctly. Force them to handle errors and retry on things that might fail, values that might change, and if the result is something that must be parsed send it back in varying formats so they have to parse it.
IMO the "robustness principle" is a good thing because it realizes that people make mistakes and their goal isn't to make something correct but something that produces the results they want to see. Even if browsers started with XHTML-like strictness with no alternative, that strictness would quickly have eroded during the first browser wars.
I would argue HTML has been way more successful than React and thus XHTML hasn't been proven right.
Maybe the solution was to not publish sites that are a bracket off.
I think half the problems with JavaScript are because of its weak typing. 1 + {} should be a type error.
It's okay if JS has warts, but denying they exist doesn't help anyone.
Delete a byte from a zip file, and it won’t unzip.
I don’t see why HTML should be different…
Why _shouldn’t_ people have to make actually-valid-html? We don’t tolerate “only sort of correct JSON” tightening the acceptable requirements for valid HTML and CSS would likely make using those formats in more places _easier_.
HTML is different because it is parsed by the browser the end user is using when it is using it. If a site completely broke like, f.e. how Mozilla treated bad XHTML sites (instead of showing the site itself you'd get some yellow page with the error) when you got a tiny syntax error then anything with user generated content (forums, blogs, etc) or even just generated could be a potential minefield. Especially as websites started adding code from external sources (be it for ads or for things like youtube embeds or whatever).
> Do anything, even the wrong thing, just work.
It's even worse than PHP and JS were built around it.
Errors should never pass silently unless explicitly silenced.
Which is what "On Error Resume Next" was doing by overwriting the current error handler. Seems to me that it was simply overused. Implicitly ignoring errors is more a C thing.
[1] - https://www.mike-gualtieri.com/css-exfil-vulnerability-teste...
[2] - https://addons.mozilla.org/en-US/firefox/addon/css-exfil-pro...
This might work for very basic info/passwords but seems mostly useless unless someone has a way of then brute-forcing that information.
I feel like there has to be something I'm missing here...
Keep reading until the part where they use first-line to filter which part of the text to apply the font to and CSS animations to vary how long that first line is.
Even the smartest of us make mistakes. The right thing to do is fix, learn, and move on.
The author of the addon triaged and fixed it in just five days, which is super impressive.
It's still a security issue but it doesn't seem like one that would be very practical.
It just seems like it would only be useful for the most insecure username/password combos. Again, I'm not saying that it's not a security breach, but the usefulness seems limited unless someone is willing to try and brute force things for an unknown gain.
Looking back, I have no idea why we stored the passwords in plaintext and I assume it stayed that way until the code was phased out in 2009. This app was used by some of the largest corps in the world, including Microsoft, and was live on the web.
Compromising one of these would be as "simple" as getting a PR merged that wasn't reviewed carefully.
I think it's less scary than this. A hypothetical PR would have to contain all the keylogger rules. The person who approves the PR would have to be in cahoots. I hope the filter-list repository owners have 2FA turned on...
Not really unfortunately:
https://www.theverge.com/2021/4/30/22410164/linux-kernel-uni...
Ultimately I suspect that getting fuzzing integrated, lots of testing, etc, would be wise. It would also make sense to limit the lists you subscribe to - there's not really a ton of reason, in my opinion, to subscribe to more than a basic list.
But somehow I've completely boogered up imgur, I just use a different browser for that site because I can't figure out which of my various blockers broke it.
https://github.com/gorhill/uBlock/wiki/uBlock-Origin-works-b...
is it vulnerable to this as it won't likely get an update?
Who thinks this is a good idea for online banking?
Crypto seems too absolutist for this use case. (Although I should mention that they seem to discuss rolling back the blockchain whenever a big heist takes place. But if you can rollback then chain, then doesn't that circumvent the core tenant of no trust needed as now you have to trust that the group doesn't decide to rollback the chain?)
Who decides what is a "whoopsy" a legitimate user made, and what is a pretend-"whoopsy" conjured by a malicious actor? Giving people & automated systems ability to flag something as "whoopsy" and revert it or lock down entire account enables malicious abuse and honest mistakes; either can end up very costly or even effectively irreversible in some cases.
Trivial example: every day we see a new post on HN about somebody's Apple/Google/YT/payment processor/etc operation/content/account being marked as "whoopsy" by the support or anti-fraud team, and they losing access to data/finances.
The best way to think of cryptocurrencies being "too absolutist" (irreversible) is as of a complementary counterpart to the (fiat) money which is too open to interpretation and always subject to unexpected third party decisions.
Even just rendering engines can have bugs that can be exploited by specially crafted content. While it reduces the attack surface, it would be a massive hit to usability of web pages.
On that, PDFs run scripts and use graphic libraries, they are not text documents.
I'll take open and a slight risk vs closed and a slight risk.
I don't need anyone's approval to run native apps either, both my PCs run C apps I built from source and shell scripts I wrote myself without it, languages of my choice with implementations simple enough to write myself, not runtimes that literally no one that's not Google can afford to independently maintain. That's real openness.
Maybe we should have a dozen protocols for different kinds of applications. (I mean user-facing applications!) Maybe online banking shouldn't involve CSS and JavaScript. Spending some time with Gemini is a real eye opener in this respect.
In 20 years on the Internet, most without an ad blocker, I haven't suffered from any lapses in browser security (that I know of, sure, but I don't much care about those I don't know about)
The tale of frequent compromises of browsers via ads is told merely to legitimize the practice of blocking even entirely plain and benign ads.
Nowadays, the first thing I do when "cleaning up" a non-tech friend/relative's computer is to install uBlock Origin. Since I started doing that, the number of repeat calls dropped precipitously. (To be honest, it's probably good for their fake news intake, too...)
The web is a lot scarier for most people than you might realize if you've been successfully navigating away from sketchy sites for 30 years.
You were never clickjacked?
Never had pop-up or pop-under ads/windows created without your consent? Recursively? Crashing your browser?
Never visited a page that was hijacked with an iframe?
I've experienced a lot of malicious ads in my time on the internet, it baffles me that someone has not.
I think the actual malware infections themselves legitimize the practice of blocking even entirely plain and benign ads.
Ads do still infect people with malware. https://blog.confiant.com/tag-barnakle-the-malvertiser-that-... Hell, yahoo was hit not that long ago and users were at risk of infection just by loading yahoo.com.
JS exploits and malware written in JS are common, but so far I haven't seen CSS used to infect systems, just steal data/log keystrokes and add a lot of privacy concerns which is bad enough. I'm already keeping an eye out for a CSS blocker that will only allow a sane subset of CSS and block or limit externally hosted resources.