Hacker News
points by sublinear 1 day ago | 0 comments
Quote from TFA:

> Supply chain - a third-party script file that a site loads is infected with malware, and is then loaded on to the site, exposing all visitors.

I already know many will disagree, but this is far too vague for your answer to make much sense. The list of 15k websites isn't given.

Most websites have at least one analytics script. Some of the biggest vendor names in that space have known XSS issues via nonce reuse that they aren't going to fix because it threatens their entire business model.

You usually get the whole clown car as soon as you allow one 3rd-party script for relatively innocent use cases like wanting a heatmap of user interaction.

You should fully expect that such a blacklist would take out most, if not all, of the websites you use every day. The security model for 3rd party scripts tends to be "trust me bro, we're $bigname"

[–] phyzome 1 day ago
If a site is using a third-party analytics site that brings in malware, they can stop bringing in that analytics script.
[–] sublinear 1 day ago
Yes, exactly! I'm saying the surface area to audit is much bigger than any particular or group of websites. All websites have problems like this that are out of their hands. What if all 3rd-party script vendors are like this (spoiler: they are)?

The blame game isn't going to solve this. Blaming it entirely on the website owners/maintainers is only treating the symptoms instead of the disease.

[–] phyzome 1 day ago
It's not about blame. The idea here is to protect the visitors of the site. Do you think they shouldn't be warned?
[–] sublinear 1 day ago
Warning people sucks. We need to actually fix it.
[–] jeremyjh 5 hours ago
You have not offered an actionable plan to "fix it". I think its quite reasonable that people hosting malware on their websites should be made aware of it, and then they should stop hosting it. Blocking websites that don't respond to emails sent to their abuse contact - or that can't responsibly host content on the internet is totally reasonable.
[–] sublinear 4 hours ago
I think you're trying to muddy waters here (along with several of the other replies I've responded to). These websites are not necessarily hosting the malware themselves. Even these script vendors don't necessarily know either. That's what makes it a supply chain attack. I've been very clear about implementation to mitigate against this.

Hardly anyone ever thinks about this despite it being a gaping hole. For all the whining I've ever heard about package managers like npm, this one is even uglier and likely being exploited right now. Its dynamic behavior is by design making it very hard to reliably demonstrate when it's being exploited, but it's a hole nonetheless.

It's perfectly actionable to stop using 3rd party scripts the way I outlined in a reply to a sibling comment. I'm not sure what else you need me to say.

It's very simple. Don't open up your web server's content security policy to domains that you "trust" just because a big name company tells you to. The only rub is that it directly contradicts all the instructions every analytics/ad provider gives for their scripts. Is that the real reason why you're saying it's "not actionable"?

[–] renehsz 1 day ago
Visitors getting a big red warning page is the most effective way to get it fixed though. There's no way for site admins to sweep the issue under the rug
[–] sublinear 1 day ago
If we're really being serious about getting it fixed and not just waving a magic wand and laying blame, the scripts should not be distributed via a platform that tells web maintainers to blindly paste a script tag and leave their web servers wide open for the whitelisted 3rd party domain(s) to send whatever they want to visitors. We need to end the security theater with nonces that is bypassing what most people expect from a content security policy that is almost never true in practice.

The scripts should be 100% static files hosted by the same origin and not be obfuscated. These scripts should not make additional requests to inject even more scripts that cannot be known until run time and are specific to that targeted visitor. These scripts should be released in the usual semver tradition with matching hashes that never change without the explicit action by the same domain that the user actually visited (making the nonce obsolete).

Like I said, this is a very old debate with a very simple solution whose only problem is that it breaks the business model of a multi-billion dollar idea. Not only would this tighten up security, but your favorite websites wouldn't lag so hard anymore either. The vast majority of complaints about the web being slow are from the dozens of HTTP requests constantly being made behind your back. This is exactly why so many users feel forced to use an adblocker even though that doesn't always work.

[–] phyzome 13 hours ago
All of that sounds great but also it's important to protect visitors.

Maybe if the site owners experience their sites going down due to this they'll look for some alternatives.

[–] telebub 1 day ago
Are you replying to something else? I don't see the connection to a problem affecting a small number of websites or the suggestion of reporting them all to a browser maker to indirectly inform them.
[–] sublinear 1 day ago
No. This is a very old debate I'm bringing up. The criteria for being listed as an "infected site" is not clear enough.
[–] 306bobby 1 day ago
Your example is how the site got infected. The types of infection is listed 2 or so paragraphs above that
[–] sublinear 1 day ago
What makes you so sure that kind of malware isn't being distributed by otherwise trusted 3rd-party scripts?

That's the standard definition of a supply chain attack. If the website maintainer was acting maliciously or incompetently, it wouldn't be a supply chain attack anymore.

[–] akerl_ 1 day ago
If I’m about to enter my credit card information on a site that’s compromised, I don’t care if it’s because of infected first party code or infected third party code. I want my browser to say “bro this site is fishy, maybe don’t”.
[–] Catloafdev 1 day ago
They aren't saying "analytics script = infection"

I'm not sure what point you're trying to make here.

[–] treadmill 1 day ago
How about "Using third party analytics scripts is a bad idea in general, because they can and frequently do have vulnerabilities and your trust in $BigCompany is misplaced"?

I would agree with that.

[–] jeremyjh 5 hours ago
Exactly. This is what website operators need to learn. People generally don't learn lessons like this without experiencing some pain first, so in my mind skipping straight to the blocklist is the most efficient.
[–] sublinear 3 hours ago
You need to look up what a supply chain attack actually is.

This is not necessarily malicious behavior nor incompetence, unless you consider putting ads on a website incompetence. This problem has been festering for well over a decade.