You should sign binaries and verify and consider the network/distribution method compromised by default.
If a malicious root certificate is installed, then the user’s system is already compromised and signature validation won’t help.
But also in the other case, not all is lost: Not every malware can (or even tries to) defend itself against any antivirus software in existence. The machine might be compromised, but being able to retrieve the correct upadate for the hypothetically unaffected malware scanner can still give you the signal that your machine is infected and you should reinstall it.
EDIT: I see what you mean. radicaldreamer stated that a malicious root certificate is installed, but signature validation wont help there. But, it will help when downloading from mirrors or HTTP.
The currently running (trusted) executable downloads and verifies the signature of the binary. Then after verification you execute it. If your trusted binary is validating invalid data then you've already messed up somewhere.
The starting point was: an attacker has control over the system so that “the end user could be MITM'd already with a root certificate maliciously installed on their device”.
In that case, there's nothing “trusted” on your machine anymore and all bets are off. Doing signature verification in app instead of relying on HTTPS is security theater[1].
[1] or it could be “defense in depth” but that's an argument I'd only accept from someone who really understands what they're talking about, and only in a context where everything else being being done properly. Most of the time “defense in depth” is just an argument for the security theater.
HTTPS is providing confidentiality, and authentication.
The confidentiality doesn’t really matter here. You’re distributing a software installer. There’s a good chance you’ll give a copy to anyone that visits your website and wants to use your software. And you’re not hiding what you’re downloading in any meaningful way.
The authentication is important. That prevents someone from, say, sending the user a completely different binary and having your software run it.
The authentication could just as easily be solved by signing the files you distribute and validating the signature of the downloaded update before running it.
(Hell, if you’re signing your installers (likely) it could be as simple as deferring to Windows’ WinVerifyTrust method and a check that the certificate used is actually your own.)
Debian still distributes packages primarily over HTTP (https://www.debian.org/mirror/list) without issue.
I maintain a (somewhat) popular mirror server at a university, and we actually ran into this issue with one of our mirrors. The Tier 1 we were using as an upstream for a distro closed up shop suddenly, leaving our mirror with stale packages for some time before users told us they never got any updates.
However, you shouldn't blindly trust in this in "linux" either. The implementation varies between package managers. Eg. DNF in Fedora has signature checks not enabled for local package installations, by default. There is no warning, nothing. If you want to infect new Fedora users, you MITM RPMFusion repo (codecs etc) installation, because that's a package almost everyone installs locally and the official install instructions don't show how to import the relevant keys beforehand. Arch was also very late to the validation party.
Those signatures are also checked for local installs unless you explicitly disable them.
The main reason to want to use HTTPS for fetching OCSP Responses has to do with privacy rather than security relative to active attacks.
It's probably time to revisit this.
I mean, I understand HTTPS is industry best practice but the criminals in this story are the actual criminals.
At this point a lot of antivirus software is just useless or actively harmful.
https://www.ftc.gov/news-events/news/press-releases/2024/02/...
Right. Unlike your McDonalds example, there is already an industry standard solution to this problem. The software ""engineers"" who neglected to implement it should be found criminally negligent for the harm they caused to their users. I know this is an unpopular suggestion on HN because code monkeys want all the glory of the "engineer" job title without any of the responsibility.
Software goes across borders. Perhaps you also think negligent software "engineers" should be extradited or rendered across jurisdictions?
Apart from the fact that Engineer does not have to imply either certified or licenced (the words you should be using if you know anything).