Deep Dive into XZ Utils Backdoor [video]
youtube.com
youtube.com
We now know the answer to the question of "who would win?"
1) A years-long nation-state-backed hacking effort to infiltrate a software project and compromise most servers in the Western world
or
2) A German's obsession with efficiency and precision in engineering
Is that actually known?
It’s all based on the sophistication, the level of psychological manipulation, years of effort, multiple actors, and a working theory based on commit timings.
I suppose it could be a few amateurs who took on a passion project, but... it's unlikely.
It seems crazy to me that they spend so much time keeping this hidden and then never check for performance degradation.
They were rushing to get it out into the wild and thus made many mistakes, including the performance degradation.
From what I recall, some distros were reporting build errors in bleeding edge versions. Actors were essentially debugging issues in production, and recommending to distro maintainers ways to “fix” (really hide) the build issue with xz
Normally it would be much quicker but potentially could have been picked up downstream by other developers when the code became more mainstream.
He did an interview for Risky Business #743.
Whoever was trying to get this into the wild was really sloppy in execution of an otherwise “beautiful” attack.
Stuxnet effectively put a stopgap in Iranian’s nuclear program. This backdoor could barely make it out of the alpha phase of development.
> A patch was ready to be introduced into Linux to prevent this type of attack (dynamically loading unneeded libraries).
Since the part that takes longest is getting commit rights and there's a lot of waiting to do, what are the chances the attackers put all their eggs on infiltrating one specific project? I'd be trying to infiltrate at least 10 or 20 even if I were alone, to increase my chances. If you dedicate one or two years to build reputation with the current maintainers by doing a PR here and there, you can do that for a few projects in parallel.
* It is extremely critical. Used at multiple places in the boot process, with root or kernel mode
* Nevertheless an unnoticeable dependency. Nobody thougt about its security implications
* Stable and trustworthy for years (decades?)
* Managed mostly by 1 person
* That person was more than average vulnerable for pressure, but not in a very visible way.
For there to be another repository affected by the same attack you don't even need to think this specific attacker did it twice. You can just consider that multiple attackers had the same idea. I think it's way more likely that there's more repositories affected by the same type of attack than not.
I'd go as far as saying this is an issue of national / global security and there's space for an agency like the IMF but for software security that would be funded by all the countries of the world to bring more resources and assuredness to this type of dependencies.
Because even if this attacker didn't do more than N=1 and other attackers didn't have the idea before, they surely have it now.
See Tim Bray's proposal about "OSQI": https://www.tbray.org/ongoing/When/202x/2024/04/01/OSQI
* Has random binary test files in its repo, ideal for hiding exploit payloads.
"The OpenJS Foundation Cross Project Council received a suspicious series of emails with similar messages, bearing different names and overlapping GitHub-associated emails. These emails implored OpenJS to take action to update one of its popular JavaScript projects to “address any critical vulnerabilities,” yet cited no specifics" [0,1].
[0] https://openjsf.org/blog/openssf-openjs-alert-social-enginee... [1] https://www.schneier.com/blog/archives/2024/04/other-attempt...
It is kind of strange since their apps are supposed to be open source, maybe he meant the backend? Nonetheless, it seems this has been their modus operandi for a long time.
The thing is, as computers proliferate and we start to use them in more places, the effects of possible holes moves closer to our homes. From distant infra to near infra; from borderlines to our homes and transportation we use everyday. Even to our pockets via smartphones and other smart devices we host in our homes.
Thanks
Stephen Smalley in question works at NSA [3].
[0]: https://news.ycombinator.com/item?id=9863896
[1]: https://www.phoronix.com/news/NSA-KDBUS-Credentials
[2]: https://lkml.iu.edu/hypermail/linux/kernel/1507.1/01758.html
All you need a Raspberry Pi and some public Wi-Fi network to create a jump point and hide among the 100s of devices going on and off that one public IP. With projects like TailScale you could set it up and plant it somewhere in a matter of hours
I thought most VPNs sold usage data to ad companies?
I also recently wrote a single ephemeral socks5 proxy over a hidden service in Rust. Since they’ve probably compromised other machines in the past, they could’ve easily used something similar to proxy their connection through tor and to some random computer (access some vulnerable router through tor, proxy through it, etc). Hiding your tracks aren’t hard
All we know is they were active during business hours of the UTC+1/3 timezones. They used a chinese sounding name as one of their front figures, the one who made most of the commits of malicious code. They wrote english messages that some people claim appear to be a Russian trying to write in English. But that last argument is pretty weak as they could have just masked their origin using Google translate, or even ChatGPT.
One of the biggest clues is actually one little commit that they let slip with a middle name to the chinese persona. And some people claim the names don't match up with different chinese cultures.
After that you can use all your psych 101 experience to try and analyze them but you'll just be guessing.
Personally I think using a chinese front name is a very interesting detail. They could have used any name in the world, there are open source contributors from all over the world.
Using a name in a country where most people have a very little insight is a good way of not being uncovered as fake of course. But why not use a Ugandan name? Also using a Chinese name can be perceived as pointing the blame at China, which might be sensitive geopolitically.
So these names seem somewhat similar to "Jia Tan" in their almost-but-not-quite real quality.
And why an Asian name? It's certainly exploiting a psychological bias. Apart from what you noted, the names are much more generic than Ugandan names and IMO it's virtually impossible to track a legend down. And the number of OSS contributors from East Asia is much larger than from Africa. Hence a more normalized/frequent occurrence. And lastly if things start going south, some play on the r-card is always up the sleeve of PsyOps personnel.
Here is my speculation.
I would look at the test framework - the attacker needs the complexity of it to hide away the attack and it is first thing he publishes - probably has been planned from the very beginning.
This is a homemade thing based on something called "Seatest".
How common is Seatest? Not that common as far as I can tell - maybe someone can correct me?
https://www.wired.com/story/jia-tan-xz-backdoor
The Mystery of ‘Jia Tan,’ the XZ Backdoor Mastermind
The thwarted XZ Utils supply chain attack was years in the making. Now, clues suggest nation-state hackers were behind the persona that inserted the malicious code.
...
At a glance, Jia Tan certainly looks East Asian—or is meant to. The time zone of Jia Tan’s commits are UTC+8: That’s China’s time zone, and only an hour off from North Korea’s.
Indeed. If it's nation state and years in the making then the idea of all the commit times being faked isn't a stretch.
Hell, even five-eyes (UK+AU+US+etc) could seek a linux backdoor and use Perth, Australia (GMT+8) timezones or have a submission bot in the UK that just commits at preset time from preset IP proxy.
The time zone is consistent with Western Australia and the work starts by "branching out" a not widely used Australian test framework.
The actual attack is probably done by someone else.
Which Jia Tan turns into "s-test".
So there are also PR reasons to create a fake trail.
The best lie confirms your confirmation bias. Everybody heard about the Chinese hackers attacking US, Ugandan hackers however would raise a few eyebrows.
Usually Microsoft etc. don't hold back identifying "threat actors".
Is there a US police investigation ongoing that could ask Microsoft? The target of this attack has been US firms / persons so if they report it, I assume a US police investigation would be required.
Based on a HN comment from a couple of weeks ago, by analyzing the attackers IP addresses from IRC chat logins, it seems they used a VPN service. If you think about it, it makes sense to always use VPN when doing an operation like this. So I think the ip addresses won't be of much use.
I have recently read that book https://www.ifitssmartitsvulnerable.com/ The author mentions a malware which at the first glance looked to originate from China (e.g. saved with Mandarin-localized MS Office) but was actually developed in Russia.
I learned about Bitcoin either days prior or days later. As a newbie I did not care who created Bitcoin, but now I regret not knowing and speaking with him directly.
ldd has an unfortunate side effect of actually executing code within some libraries (the exact details, I don’t know. Maybe it’s library specific)
The fact that the lecturer is aware of it makes `sudo ldd` look even more odd.
I have just closed issues where the reporter or “user”, as you put it, is just unhelpful, rude, or non responsive.
No response needed most of the time.