News for hackers. Stuff that matters.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by wepple on Saturday March 30, 2024 @05:35PM (#39878911)
I expect a lot of people will be doing a whole lot of thinking along these lines over the next months.

Code review? Some kind of behavioral analysis?

IMO the call to system() was kind of sloppy, and a binary capabilities scanner could have potentially identified a path to that.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by tux3 on Saturday March 30, 2024 @05:56PM (#39879060)
I think behavioral analysis could be promising. There's a lot of weird stuff this code does on startup that any reasonable Debian package on the average install should not be doing in a million years.

Games and proprietary software will sometimes ship with DRM protection layers that do insane things in the name of obfuscation, making it hard to distinguish from malware.

But (with only a couple exceptions) there's no reason for a binary or library in a Debian package to ever try to write the PLT outside of the normal mechanism, to try to overwrite symbols in other modules, to add LD audit hooks on startup, to try to resolve things manually by walking ELF structures, to do anti-debug tricks, or just to have any kind of obfuscation or packing that free software packaged for a distro is not supposed to have.

Some of these may be (much) more difficult to detect than others, some might not be realistic. But there are several plausible different ways a scanner could have detected something weird going on in memory during ssh startup.

No one wants a Linux antivirus. But I think everyone would benefit from throwing all the behavioral analysis we can come up with at new Debian package uploads. We're very lucky someone noticed this one, we may not have the same luck next time.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by raggi on Saturday March 30, 2024 @06:20PM (#39879234)
Except had we been doing that they would have put guards in place to detect it - as they already had guards to avoid the code path when a debugger is attached, to avoid building the payload in when it's not one of the target systems, and so on. Their evasion was fairly extensive, so we'd need many novel dynamic systems to stand a chance, and we'd have to guard those systems extremely tightly - the author got patches into oss-fuzz as well to "squash false positives". All in all, adding more arms to the arms race does raise the bar, but the bar they surpassed already demonstrated tenacity, long term thinking, and significant defense and detection evasion efforts.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by tux3 on Saturday March 30, 2024 @06:42PM (#39879399)
I broadly agree, but I think we can draw a parallel with the arms race of new exploit techniques versus exploit protection.

People still manage to write exploits today, but now you must find an ASLR leak, you must chain enough primitives to work around multiple layers of protection, it's generally a huge pain to write exploits compared to the 90s.

Today the dynamic detection that we have for Linux packages seems thin to non-existent, like the arms race has not even started yet. I think there is a bit of low-hanging fruit to make attacker lives harder (and some much higher-hanging fruit that would be a real headache).

Luckily there is an asymmetry in favor of the defenders (for once). If we create a scanner, we do not _have_ to publish every type of scan it knows how to do. Much like companies fighting spammers and fraud don't detail exactly how they catch bad actors. (Or, for another example, I know the Tor project has a similar asymmetry to detect bad relays. They collaborate on their relay scanner internally, but no one externally knows all the details.)

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by raggi on Saturday March 30, 2024 @06:49PM (#39879449)
Yeah, perhaps something akin to an OSS variant of virustotal's multi-vendor analysis. I'm still not sure it would catch this, but as you say, raising the bar isn't something we tend to regret.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by saagarjha on Sunday March 31, 2024 @12:55AM (#39881559)
This is an arms race that is largely won by attackers, actually. Sophisticated attacks are caught by them sometimes but usually the author has far more knowledge or cleverer tricks than the person implementing the checks, who is limited by their imagination of what they think an attacker might do.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by wepple on Sunday March 31, 2024 @08:33PM (#39889626)
I’m not sure that attackers “win” this arms race; the cost has gone through the roof and their chance of detection constantly increases.

Indeed, defenders are often outgunned, but at a minimum we’ve pushed the level of effort way into nation-state territory, which is a good start.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by saagarjha on Monday April 01, 2024 @08:29PM (#39901067)
Indeed. But a lot of the effort has come from measures in areas that are much more stacked towards defenders (as it should).
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by robocat on Saturday March 30, 2024 @07:32PM (#39879691)
> we may not have the same luck next time

If the prior is 1 was out there (this one), the chances that there is 1+ still undetected seems fairly high to me.

To behaviourally detect this requires many independent actors to be looking in independent ways(e.g. security researchers, internal teams). Edit: I mean with private code & tests (not open source, nor purchasable antivirus). It's not easy to donate to Google Zero. Some of the best funded and most skilled teams seem to be antivirus vendors (and high value person protection). I hate the antivirus industry yet I've been helped by it (the anti-tragedy of the commons).

Commonly public detection code (e.g. open source) is likely to be defeated by attackers with a lot of resources.

Hard to protect ourselves against countries where the individuals are safe from prosecution. Even nefarious means like assasination likely only work against individuals and not teams.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by bandrami on Sunday March 31, 2024 @01:39AM (#39881738)
> If the prior is 1

That would surprise me greatly

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by lazyasciiart on Sunday March 31, 2024 @04:59AM (#39882605)
I think you’re saying “I would be surprised if there is only 1 exploit like this that already exists” which is what the previous comment was also saying. “If the prior is one” is often used to mean “we know for sure that there is one”.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by snnn on Saturday March 30, 2024 @06:26PM (#39879279)
> to try to overwrite symbols in other modules, to add LD audit hooks on startup, to try to resolve things manually by walking ELF structures

I want to name one thing: when Windows failed to load a DLL because a dependency was missing, it doesn't tell you what was missed. To get the information, you have to interact with the DLL loader with low level Windows APIs. In some circumstances Linux apps may also have the need. Like for printing a user friendly error message or recovery from a non-fatal error. For example, the patchelf tool that is used for building portable python packages.

> No one wants a Linux antivirus

It is not true. Actually these software are very popular in enterprise settings.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by ffsm8 on Saturday March 30, 2024 @06:33PM (#39879341)
> No one wants a Linux antivirus

ClamAV has been around for a very long time at this point.

It's just not installed on servers, usually

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by snnn on Saturday March 30, 2024 @08:30PM (#39880126)
Does not have to be installed. See this: https://learn.microsoft.com/en-us/azure/defender-for-cloud/c...

A cloud provider can take snapshots of running VMs then run antivirus scan offline to minimize the impact to the customers.

Similarly, many applications are containerized and the containers are stateless, we can scan the docker images instead. This approach has been quite mature.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by kemotep on Saturday March 30, 2024 @06:58PM (#39879497)
To say nothing of enterprise EDR/XDR solutions that have linux versions. These things aren’t bulletproof but can be 1 layer in your multilayer security posture.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by EasyMark on Saturday March 30, 2024 @07:50PM (#39879818)
don't most people who use that just use it for scanning incoming email attachments usually?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by snnn on Saturday March 30, 2024 @08:39PM (#39880191)
ClamAV also has a lot of findings when scanning some open source project's source code. For example, LLVM project's test data. Because some of the test data are meant to check if a known security bug is fixed, from a antivirus software perspective these data files can be seen as exploits. ClamAV is commonly used. Or, I would suggest adding it to every CI build pipeline. Most time it wouldn't have any finding, but it is better than nothing. I would like to offer free help if an open source project has the need to harden their build pipelines and their release process.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by nwallin on Saturday March 30, 2024 @08:44PM (#39880226)
In general, my gut feeling is that I expect the majority ClamAV installations to be configured to scan for Windows viruses in user submitted content. Email, hosting sites, etc.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by cryptonector on Saturday March 30, 2024 @08:08PM (#39879942)
> But I think everyone would benefit from throwing all the behavioral analysis we can come up with at new Debian package uploads.

Why "new uploads" and not also "all existing"?

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by cipherzero on Sunday March 31, 2024 @01:01AM (#39881579)
Sorry, I'm unfamiliar with PLT what does stand for?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by intelVISA on Sunday March 31, 2024 @01:14AM (#39881646)
procedure linkage table
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by londons_explore on Saturday March 30, 2024 @07:38PM (#39879738)
I'm really surprised they did a call to system() rather than just implement a tiny bytecode interpreter.

A bytecode interpreter that can call syscalls can be just a few hundred bytes of code, and means you can avoid calling system() (whose calls might be logged), and avoid calling mprotect to make code executable (also something likely to raise security red flags).

The only downside of a bytecode interpreter is the whole of the rest of your malware needs to be compiled to your custom bytecode to get the benefits, and you will take a pretty big performance hit. Unless you're streaming the users webcam, that probably isn't an issue tho.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by brokenmachine on Monday April 01, 2024 @11:16PM (#39902038)
XZ backdoor v2.0 is sure to have that now.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by jnwatson on Saturday March 30, 2024 @06:21PM (#39879245)
The real problem was doing expensive math for every connection. If it had relied on a cookie or some simpler-to-compute pre-filter, no one would have been the wiser.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by anarazel on Saturday March 30, 2024 @07:12PM (#39879569)
The slowdown is actually in the startup of the backdoor, not when it's actually performing authentication. Note how in the original report even sshd -h (called in the right environment to circumvent countermeasures) is slow.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by klabb3 on Sunday March 31, 2024 @12:47AM (#39881529)
Wow. Given the otherwise extreme sophistication this is such a blunder. I imagine the adversary is tearing their hair out over this. 2-3 years of full time infiltration work down the drain, for probably more than a single person.

As for the rest of us, we got lucky. In fact, it’s quite hilarious that some grump who’s thanklessly perf testing other people’s code is like “no like, exploit makes my system slower”.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by mitjam on Sunday March 31, 2024 @03:58AM (#39882344)
If it was not fulltime work I wonder what else they have been working on with different accounts.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by mslot on Sunday March 31, 2024 @06:40AM (#39883061)
You're responding to said grump ;)

Andres is one of the most prolific PostgreSQL committers and his depth of understanding of systems performance is second to none. I wouldn't have guessed he would one day save the world with it, but there you go.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by raggi on Saturday March 30, 2024 @06:23PM (#39879260)
the call to system is obfuscated, static analysis wouldn't see it
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by XorNot on Saturday March 30, 2024 @07:53PM (#39879842)
If you think about it this is a data-providence problem though. The exploit was hidden in "test" code which gets included in release code by compiler flags.

Now, if there was a proper chain of accountability for data, then this wouldn't have been possible to hide the way it is - any amount of pre-processing resulting in the release tarball including derived products of "test" files would be suspicious.

The problem is we don't actually track data providence like this - no build system does. The most we do is <git hash in> -> <some deterministic bits out>. But we don't include the human readable data which explains how that transform happens at enough levels.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by paulmd on Sunday March 31, 2024 @06:09AM (#39882919)
You don’t need to go to that extent even - simply properly segregating test resources from dist resources would have prevented this, and that’s something Java has been doing for 20 years.

It’s not sufficient against a determined attacker, but it does demonstrate just how unserious the C world is about their build engineering.

I literally can’t think of a single time in 15 years of work that I’ve ever seen a reason for a dist build to need test resources. That’s at best a bug - if it’s a dist resource it goes in the dist resources, not test. And if the tooling doesn’t do a good job of making that mistake difficult… it’s bad tooling.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by x0x0 on Saturday March 30, 2024 @06:20PM (#39879239)
It feels like systemd is irresponsible. They changed the supply chain surface area from the limited set of libs openssh uses to any lib that systemd itself uses.

I'm sure there were reasons for this, but for the process most people use on naked internet, that seems like a poor idea.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by raggi on Saturday March 30, 2024 @06:26PM (#39879282)
Think whatever you shall about systemd of course, but please stop with the blind belief mud slinging:

  - systemd didn't create the patch to include libsystemd, distros did
  - current systemd versions already remove liblzma from their dependencies, the affected distros are behind on systemd updates though
  - you can implement notify in standalone code in about the same effort as it takes to use the dependency, there wasn't really a good reason for distro's to be adding this dependency to such a critical binary. systemd documents the protocol independently to make this easy. distros having sketchy patches to sshd has a long history, remember the debian weak key fiasco?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by Denvercoder9 on Saturday March 30, 2024 @06:43PM (#39879405)
> - current systemd versions already remove liblzma from their dependencies, the affected distros are behind on systemd updates though

The affected distros aren't behind on systemd updates, the change to systemd you describe has been merged but not yet released.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by raggi on Saturday March 30, 2024 @06:48PM (#39879439)
Ah, thank you for the correction!
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by x0x0 on Tuesday April 02, 2024 @12:13AM (#39902316)
Maybe you should reconsider your "blind belief mud slinging" eh?

Be better.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by everybackdoor on Saturday March 30, 2024 @07:59PM (#39879888)
This message and others like it feel like a concerted effort at damage control around systemd.

Essentially, the optics here are that an intelligence agency created systemd to be used as a secret garden, and then manufactured community support for it using social engineering (”you’re too stupid/old/bitter to understand the complex marvel we’ve created”) and now we’re all living in la-la land when it comes to computer security.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by rcxdude on Saturday March 30, 2024 @08:36PM (#39880166)
This is full conspiracy mode thinking.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by webmaven on Sunday March 31, 2024 @02:11AM (#39881858)
Yes, well, there actually was a conspiracy here, wasn't there? The only question is how extensive it was in time and space.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by kimixa on Sunday March 31, 2024 @04:32AM (#39882486)
I wonder if the fact they "had" to use a dependency and jump through a number of hoops suggest they're not involved in the conspiracy? As if they had this sort of access and effort surely systemd itself would be an easier target?

But that's not saying this is the only conspiracy, maybe there's hundreds of other similar things in published code right now, and one was noticed soon after introduction merely due to luck.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by pas on Saturday March 30, 2024 @07:00PM (#39879512)
libselinux also links to liblzma (and gets into sshd via PAM)

https://news.ycombinator.com/item?id=39867126

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by cqqxo4zV46cp on Saturday March 30, 2024 @07:28PM (#39879662)
No. You are still bitter about systemd and are trying to assert blame which does not reasonably exist.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by inferiorhuman on Saturday March 30, 2024 @07:38PM (#39879742)
I'm not bitter, I'm wary of systemd in a security context. Their vulns seem to be a result of poor choices made deliberately rather than mistakes or sloppy coding (e.g. defaulting to running units as root when the UID/username couldn't be parsed). Lennart was staunchly anti-CVE, which to me seems again like making a deliberate choice that will only hinder a secure implementation.

I haven't followed systemd too closely, has their stance on CVEs at least evolved?

https://soylentnews.org/article.pl?sid=17/07/30/0251232

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Saturday March 30, 2024 @09:39PM (#39880539)
Dynamic linking was a mistake and should be eliminated
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by intelVISA on Sunday March 31, 2024 @01:15AM (#39881650)
yep, but how to reverse such a blunder?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:52AM (#39883819)
Well step one is to just stop doing it? I guess someone will need to start publishing a static-only linux distro
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by LtWorf on Sunday March 31, 2024 @04:41PM (#39887898)
I think you don't fully understand how the attack works.

Had sshd been written in go or rust, the attack would have still been possible.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:40PM (#39889671)
of course, I never wrote otherwise?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by kbenson on Sunday March 31, 2024 @02:19AM (#39881896)
That this was dynamically linked is the least interesting thing about it IMO. It was a long term I filtration where they got legitimate commit access to a well used library.

If xz was statically linked in some way, or just used as an executa Le to compress something (like the kernel), the same problems exist and no dynamic linking would need to be involved.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by Cloudef on Sunday March 31, 2024 @03:08AM (#39882107)
Not true, it would be much harder to hook into openssl functions if the final executable was static [1], the only way is that if the openssl function this attack targeted, actually called a function from libxz.

[1] https://sourceware.org/glibc/wiki/GNU_IFUNC

Dynamic loading is relic of the past and cause of many headaches in linux ecosystem, in this case it also just obfuscates the execution path of the code more so you can't really rely on the code you are reading. Unfortunately I don't think it's possible to completely get rid of dynamic loading as some components such as GPU drivers require it, but it should be reduced to minimum.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by FeepingCreature on Sunday March 31, 2024 @03:52AM (#39882316)
Looking at IFUNC, there never seems to be a reason to allow function loading from a different library than the one the call is in, right? Maybe a restriction like that could be built in. Or just explicitly enumerate the possible substitutions per site.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:50AM (#39883802)
Sure, but your solution supposes some kind of linking cop program overseeing the linking process, and who is going to keep the linking cop honest?
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by Cloudef on Sunday March 31, 2024 @08:54AM (#39883827)
I mean dynamic loader is part of the base system and you generally trust the compiler and linker you build the program with. If any of those are malicious, you've already lost the game.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @12:53PM (#39885848)
Asking a programmer to trust his own compiler and libraries which he can personally analyze and vouch for (static linking) is much different than asking the programmer to vouch for the dynamic libraries present on some given user’s machine.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by FeepingCreature on Monday April 01, 2024 @09:23AM (#39893919)
Yes, the dynamic linker (/lib/ld-linux.so.2), which is one relatively short program as opposed to thousands of big ones. :)

The point is, there's simply no usecase to require or even allow the program to do IFUNC substitution freely on its own. A programming framework should not opt the developer in to capabilities they don't want or need. Much of C-likes' complexity arises from unnecessary, mandated capabilities.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by account42 on Friday April 05, 2024 @11:47AM (#39943859)
IFUNC isn't used directly to patch the functions of another library here, it's just the entry point for the exploit code. IFUNC is used as opposed to other ways to execute code on library load because it runs very early (before linking tables are remapped read-only).
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by ynik on Sunday March 31, 2024 @08:03AM (#39883496)
This particular approach of hooking would be much harder; but a malicious xz has other options as well. It's already in the code path used by dpkg when unpacking packages for security updates, so it could just modify the sshd binary, or maybe add a rootkit to the next kernel security update.

It seems foolish to change our systems to stop one of the steps the attacker used after their code was already running as root; the attacker can just pick something else; as root they have essentially unlimited options.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by Cloudef on Sunday March 31, 2024 @08:20AM (#39883599)
True, but such code changes in xz would be much easier to audit than all the dynamic loading shenanigans, even if obfuscated in the build system. The GNU's dynamic loader specially has grown to be very complicated (having all these OOP-like polymorphism features on linker / loader level ...) and I think we should tone down the usage of dynamic linking as I see it as low hanging fruit for attacks in general.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:49AM (#39883791)
“It seems foolish to change”

Rejecting evidence in favor of retaining preconceptions is certainly popular.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by int_19h on Sunday March 31, 2024 @06:10PM (#39888534)
There are other reasons to change, though. The main thing to consider here is that static linking is the "OG" way of doing things, and also the simplest and the most easily understandable one. There are also obvious perf benefits to it when it comes to optimizing compilers.

On the other hand, dynamic linking was originally more or less just a hack to deal with memory-restricted environments in the face of growing amounts of code. It was necessary at the time because we simply wouldn't have things like X or Windows without it way back when.

But RAM is nowhere near as sparse these days, and it could be even less so if there was a concerted push on hardware vendors to stop skimping on it. So why don't we remove the hack and get back to a simple model that is much easier to understand, implement, and audit?

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:42PM (#39889686)
agree, it’s difficult to believe that people believe in dynamic linking so strongly that they are unwilling to consider abandoning it even in the face of obvious problems like this xz situation
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by radiospiel on Sunday March 31, 2024 @05:35AM (#39882758)
> If xz was statically linked in some way, or just used as an executa Le to compress something (like the kernel), the same problems exist and no dynamic linking would need to be involved.

even more so: all binaries dynamically linking xz can be updated by installing a fixed library version. For statically linked binaries: not so much, each individual binary would have to be relinked, good luck with that.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by Cloudef on Sunday March 31, 2024 @06:12AM (#39882929)
> For statically linked binaries: not so much, each individual binary would have to be relinked, good luck with that.

Is essentially what all distros with sane build systems does.

Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by someguydave on Sunday March 31, 2024 @08:46AM (#39883772)
In exchange, each binary can be audited as a final product on its own merits, rather than leaving the final symbols-in-memory open to all kinds of dubious manipulation.
Re:XZ backdoor: "It's RCE, not auth bypass, and gated/unrepl... by ashishbijlani on Saturday March 30, 2024 @10:10PM (#39880705)
I’ve been building Packj [1] to detect malicious PyPI/NPM/Ruby/PHP/etc. dependencies using behavioral analysis. It uses static+dynamic code analysis to scan for indicators of compromise (e.g., spawning of shell, use of SSH keys, network communication, use of decode+eval, etc). It also checks for several metadata attributes to detect bad actors (e.g., typo squatting).

1. https://github.com/ossillate-inc/packj