- cross-posted to:
- linux@lemmy.eco.br
- cross-posted to:
- linux@lemmy.eco.br
- Aatube ( @Aatube@kbin.melroy.org ) 147•7 months ago
Don’t forget all of this was discovered because ssh was running 0.5 seconds slower
- Jolteon ( @Jolteon@lemmy.zip ) 50•7 months ago
Half a second is a really, really long time.
- imsodin ( @imsodin@infosec.pub ) 34•7 months ago
Technically that wasn’t the initial entrypoint, paraphrasing from https://mastodon.social/@AndresFreundTec/112180406142695845 :
It started with ssh using unreasonably much cpu which interfered with benchmarks. Then profiling showed that cpu time being spent in lzma, without being attributable to anything. And he remembered earlier valgrind issues. These valgrind issues only came up because he set some build flag he doesn’t even remember anymore why it is set. On top he ran all of this on debian unstable to catch (unrelated) issues early. Any of these factors missing, he wouldn’t have caught it. All of this is so nuts.
Postgres sort of saved the day
- Hupf ( @Hupf@feddit.de ) 17•7 months ago
RIP Simon Riggs
- oce 🐆 ( @oce@jlai.lu ) 23•7 months ago
Is that from the Microsoft engineer or did he start from this observation?
- gregorum ( @gregorum@lemm.ee ) English79•7 months ago
Thank you open source for the transparency.
- d3Xt3r ( @d3Xt3r@lemmy.nz ) 64•7 months ago
This is informative, but unfortunately it doesn’t explain how the actual payload works - how does it compromise SSH exactly?
- Aatube ( @Aatube@kbin.melroy.org ) 36•7 months ago
It allows a patched SSH client to bypass SSH authentication and gain access to a compromised computer
- d3Xt3r ( @d3Xt3r@lemmy.nz ) 42•7 months ago
From what I’ve heard so far, it’s NOT an authentication bypass, but a gated remote code execution.
There’s some discussion on that here: https://bsky.app/profile/filippo.abyssdomain.expert/post/3kowjkx2njy2b
But it would be nice to have a similar digram like OP’s to understand how exactly it does the RCE and implements the SSH backdoor. If we understand how, maybe we can take measures to prevent similar exploits in the future.
- underisk ( @underisk@lemmy.ml ) 19•7 months ago
I think ideas about prevention should be more concerned with the social engineering aspect of this attack. The code itself is certainly cleverly hidden, but any bad actor who gains the kind of access as Jia did could likely pull off something similar without duplicating their specific method or technique.
- The Doctor ( @drwho@beehaw.org ) English8•7 months ago
Somebody wrote a PoC for it: https://github.com/amlweems/xzbot#backdoor-demo
Basically, if you have a patched SSH client with the right ED448 key you can have the gigged sshd on the other side run whatever commands you want. The demo just does
id > /tmp/.xz
but it could be whatever command you want. - Aatube ( @Aatube@kbin.melroy.org ) 1•7 months ago
Under the right circumstances this interference could potentially enable a malicious actor to break sshd authentication and gain unauthorized access to the entire system remotely. —Wikipedia, sourced to RedHat
Of course, the authentication bypass allows remote code execution.
- uis ( @uis@lemm.ee ) 2•7 months ago
There is RedHat’s patch for OpenSSH that adds something for systemd, which adds libsystemd as dependency, which has liblzma as its own dependency.
I do believe it does
- UnityDevice ( @UnityDevice@startrek.website ) 53•7 months ago
If this was done by multiple people, I’m sure the person that designed this delivery mechanism is really annoyed with the person that made the sloppy payload, since that made it all get detected right away.
- bobburger ( @bobburger@fedia.io ) 13•7 months ago
I like to imagine this was thought up by some ambitious product manager who enthusiastically pitched this idea during their first week on the job.
Then they carefully and meticulously implemented their plan over 3 years, always promising the executives it would be a huge pay off. Then the product manager saw the writing on the wall that this project was gonna fail. Then they bailed while they could and got a better position at a different company.
The new product manager overseeing this project didn’t care about it at all. New PM said fuck it and shipped the exploit before it was ready so the team could focus their work on a new project that would make new PM look good.
The new project will be ready in just 6-12 months, and it is totally going to disrupt the industry!
- nxdefiant ( @nxdefiant@startrek.website ) 16•7 months ago
I see a dark room of shady, hoody-wearing, code-projected-on-their-faces, typing-on-two-keyboards-at-once 90’s movie style hackers. The tables are littered with empty energy drink cans and empty pill bottles.
A man walks in. Smoking a thin cigarette, covered in tattoos and dressed in the flashiest interpretation of “Yakuza Gangster” imaginable, he grunts with disgust and mutters something in Japanese as he throws the cigarette to the floor, grinding it into the carpet with his thousand dollar shoes.
Flipping on the lights with an angry flourish, he yells at the room to gather for standup.
- MonkeMischief ( @MonkeMischief@lemmy.today ) 7•7 months ago
Cigarette is stomped.
Stickies fall from kanban board.
Backdoor dishonor.
- uis ( @uis@lemm.ee ) 47•7 months ago
- Fat Tony ( @FatTony@lemm.ee ) 40•7 months ago
In a nutshell you say…
- alphafalcon ( @alphafalcon@feddit.de ) 26•7 months ago
Coconut at least…
- noddy ( @noddy@beehaw.org ) 29•7 months ago
The scary thing about this is thinking about potential undetected backdoors similar to this existing in the wild. Hopefully the lessons learned from the xz backdoor will help us to prevent similar backdoors in the future.
I think we need focus on zero trust when it comes to upstream software
- jackpot ( @jackpot@lemmy.ml ) 2•7 months ago
exactly, stop depending on esoteric libraries
It is fine to use them just know how they work and check the commit log.
That of course requires you to pull from got instead of a tarball
- billgamesh ( @billgamesh@lemmy.ml ) 1•7 months ago
this was well hidden. not sure anyone would have spotted this by checking commit log
It was hidden in the Tarball
- billgamesh ( @billgamesh@lemmy.ml ) 1•7 months ago
i’m not an expert, but my reading was that it was hidden in a binary used for testing EDIT: oh yeah, i see what you mean
- girlfreddy ( @girlfreddy@lemmy.ca ) 29•7 months ago
A small blurb from The Guardian on why Andres Freund went looking in the first place.
So how was it spotted? A single Microsoft developer was annoyed that a system was running slowly. That’s it. The developer, Andres Freund, was trying to uncover why a system running a beta version of Debian, a Linux distribution, was lagging when making encrypted connections. That lag was all of half a second, for logins. That’s it: before, it took Freund 0.3s to login, and after, it took 0.8s. That annoyance was enough to cause him to break out the metaphorical spanner and pull his system apart to find the cause of the problem.
The post on the oss is more detailed and informative
- Pantherina ( @Pantherina@feddit.de ) 23•7 months ago
- KillingTimeItself ( @KillingTimeItself@lemmy.dbzer0.com ) English13•7 months ago
this was one hell of an april fools joke i tell you what.
Imagine
- KillingTimeItself ( @KillingTimeItself@lemmy.dbzer0.com ) English1•7 months ago
i mean, to some degree, it is.
- umbrella ( @umbrella@lemmy.ml ) 13•7 months ago
did we find out who was that guy and why was he doing that?
- intrepid ( @intrepid@lemmy.ca ) 21•7 months ago
We probably never will.
- The Doctor ( @drwho@beehaw.org ) English2•7 months ago
If we ever do, it’ll be 40 or 50 years from now.
Probably a state actor
- etchinghillside ( @etchinghillside@reddthat.com ) 10•7 months ago
Any additional information been found on the user?
Probably Chinese?
- dan ( @dan@upvote.au ) 4•7 months ago
They’re more likely to be based in Eastern Europe based on the times of their commits (during working hours in Eastern European Time) and the fact that while most commits used a UTC+8 time zone, some of them used UTC+2 and UTC+3: https://rheaeve.substack.com/p/xz-backdoor-times-damned-times-and
It is also hard to be certain as they could be a night owl or a early riser.
- dan ( @dan@upvote.au ) 1•7 months ago
Yeah - The post goes into a lot of detail, and they did take that into account. It’s worth reading.
- The Doctor ( @drwho@beehaw.org ) English2•7 months ago
Just because somebody picked a vaguely Chinese-sounding handle doesn’t mean much about who or where.
That’s why I put the question mark
- underisk ( @underisk@lemmy.ml ) 8•7 months ago
as long as you’re up to date on everything here: https://boehs.org/node/everything-i-know-about-the-xz-backdoor
the only additional thing i’ve seen noted is a possibilty that they were using Arch based on investigation of the tarball that they provided to distro maintainers
- EmperorHenry ( @EmperorHenry@discuss.tchncs.de ) 7•7 months ago
At least microsoft is honest enough to admit their software needs protection, unlike apple and unlike most of the people who have made distros of linux. (edit: microsoft is still dishonest about what kind of protection it needs though)
Even though apple lost a class action lawsuit for false advertising over the claim “mac can’t get viruses” they still heavily imply that it doesn’t need an antivirus.
any OS can get infected, it’s just a matter of writing the code and finding a way to deliver it to the system…Now you might be thinking “I’m very careful about what I click on” that’s a good practice to have, but most malware gets delivered through means that don’t require the user to click on anything.
You need an antivirus on every computer you have, linux, android, mac, windows, iOS, all of them. There’s loads of videos on youtube showing off how well or not so well different antivirus programs work for windows and android.
A “antivirus” tends to be a proprietary black box. Such “antivirus” programs could not of detected the XZ backdoor
- EmperorHenry ( @EmperorHenry@discuss.tchncs.de ) 1•7 months ago
But a good whitelisting antivirus could’ve stopped it.
What?
- EmperorHenry ( @EmperorHenry@discuss.tchncs.de ) 2•7 months ago
Prevention and detection
Most of the time, detection also means prevention, but with a whitelisting antivirus, prevention often means that the threat isn’t detected, it was just prevented from running.
A whitelisting application has a list of what it knows it bad AND what it knows in advance to be good.
Anything it can’t identify on the spot is treated as unknown and not allowed to run, not deleted, not quarantined, just blocked from running until the user can upload it to things like virustotal and other services like it to figure out if its safe.
upload it to virustotal, if it wasn’t already known, do a re-scan a few hours later to see if it’s malicious, if it was already known, do a re-scan to see if anything has figured out if its malicious.
which is why I think it’s borderline criminal that most antivirus programs don’t work that way.
That would do nothing for liblzma as it was trusted.
- EmperorHenry ( @EmperorHenry@discuss.tchncs.de ) 1•7 months ago
who was it trusted by? There’s whitelisting applications that indiscriminately block everything that isn’t already installed too.
The developer of XZ. What your describing is package verification which already happens
- expr ( @expr@programming.dev ) 2•7 months ago
This whole situation just emphasizes the fact that rebasing >>>>>>>>>> merge squashing.