GossiTheDog,
@GossiTheDog@cyberplace.social avatar

HT to @wdormann here - somebody has backdoored the open source project XZ which has downstream impacts.

For example, although OpenSSH doesn’t use XZ, Debian patch OpenSSH and introduced a dependency which translates as the XZ changes introducing a sshd authentication bypass backdoor it appears.

One dude bothered to investigate in his free time about why ssh was running slow, so it was caught fairly early - i.e. hopefully before distros started bundling it.

https://www.openwall.com/lists/oss-security/2024/03/29/4

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Worryingly it looks like the backdoor comes via one of the two main devs and dates back over a month from their GitHub account, with legit commits too - XZ is used in systemd so this one might play out for a while.

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

I suspect distros probably want to roll XZ back to around January 2024, stop bundling updates until the developer is removed in GitHub or a logical explanation can be given, and somebody needs to fund a code review of it.

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Here we go: https://www.bleepingcomputer.com/news/security/red-hat-warns-of-backdoor-in-xz-tools-used-by-most-linux-distros/

As I said, the impact here will be very limited due to how quick it was caught. Everybody owes the finder a beer.

khleedril,
@khleedril@cyberplace.social avatar

@GossiTheDog I'm sure the finder is basking in kudos right now! Good on them.

futuresprog,
@futuresprog@mastodon.nzoss.nz avatar
GossiTheDog, (edited )
@GossiTheDog@cyberplace.social avatar

Postgres developer @AndresFreundTec saving Linux security from backdoors as a side of desk activity

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

CISA advisory: Reported Supply Chain Compromise Affecting XZ Utils Data Compression Library, CVE-2024-3094 https://www.cisa.gov/news-events/alerts/2024/03/29/reported-supply-chain-compromise-affecting-xz-utils-data-compression-library-cve-2024-3094

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

The person/account on XZ repo also altered the security disclosure policy on that and other repos they author in months prior.

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Interesting find by @fuomag9 - the XZ repo person tried getting Ubuntu to update yesterday by filing a bug report https://bugs.launchpad.net/bugs/2059417

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

The Twilight zone time - a bug from 2015 comes back around in XZ incident, it appears https://github.com/google/sanitizers/issues/342

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Multiple different XZ repos and website have been suspended by GitHub.

image/png
image/png
image/png

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Back in 2022 a host of characters appeared and basically bullied the creator of the XZ project to hand it over to somebody else - at the time the guy cited mental health issues around not updating the project quickly.

At the time he was already talking about maybe handing over to the account who years later introduced the backdoor.

In mid 2023 said account introduced a change to Google’s OSS Fuzzer to weaken detection for XZ.

Somebody played a years long game of Jenga and lost.

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

Before everybody high fives each other, this is how the backdoor was found: somebody happened to look at why CPU usage had increased in sshd, and did all the research and notification work themselves. By this point the backdoor had been there for a month unnoticed.

I’ve made the joke before that if GCHQ aren’t introducing backdoors and vulns in open source that I want a tax refund. It wasn’t a joke. And it won’t be just be GCHQ.

https://mastodon.social/@AndresFreundTec/112180406142695845

maswan,
@maswan@mastodon.acc.sunet.se avatar

@GossiTheDog
One could argue that your tax money should also be spent by GCHQ to happen to look into increased CPU usage after some weird lib update in all the places where they didn't plant anything.

GossiTheDog,
@GossiTheDog@cyberplace.social avatar

deleted_by_author

  • Loading...
  • maswan,
    @maswan@mastodon.acc.sunet.se avatar

    @GossiTheDog
    Denying foreign actors access to UK companies secrets isn't in under economic advantage?

    Ours actually has that in there (especially for govt entities and suppliers), as does (theoretically) NSA.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar
    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Another two thoughts on XZ -

    • sshd itself has no dependency on the XZ utils library. The streams got crossed in a way I don’t think anybody understood (except the threat actor).

    • had that backdoor been performant with sshd, I don’t think anybody would have spotted it.

    The way this played out opens a window of opportunity to go back and look at both issues.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Really good timeline of what is known to have happened so far. It looks like the rogue developer deliberately introduced a vulnerability in other package, too - I haven’t seen anybody else mention this.

    Reading the dev’s GitHub history, they’ve been making changes to other open source projects too around compression. It also appears they/somebody involved has other accounts, too.

    https://boehs.org/node/everything-i-know-about-the-xz-backdoor

    GossiTheDog, (edited )
    @GossiTheDog@cyberplace.social avatar

    How far the rabbit hole goes - back in 2021 they deliberately introduced a risky change in the compression library libarchive. Nobody noticed. This is shipped in a ton of systems:
    https://github.com/libarchive/libarchive/pull/1609

    Whoever the threat actor is knows what they are doing as they’ve gone after chained dependencies around compression.

    djh,
    @djh@chaos.social avatar

    @GossiTheDog The very recent zstd fork branch updates agree with the assessment that the compression ecosystem as a whole was the domain this threat actor was playing in:

    https://github.com/JiaT75/zstd/branches/all

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    If anybody thinks this kind of thing is unique, it isn’t.

    Example - CVE-2021-44529 in Ivanti Endpoint Manager. The cause?

    Backdoor in open source code, was there for 7 years.

    https://borncity.com/win/2024/02/22/ivanti-endpoint-manager-vulnerability-cve-2021-44529-code-injection-or-backdoor/

    simon,
    @simon@fosstodon.org avatar

    @GossiTheDog this link has a better detail on the actual obfuscated code https://www.labs.greynoise.io/grimoire/2024-02-what-is-this-old-ivanti-exploit/

    GossiTheDog, (edited )
    @GossiTheDog@cyberplace.social avatar

    XZ Embedded Linux kernel module for IoT devices, 10 days ago had a change submitted to add Jia Tan (backdoor author) as a maintainer.

    https://lore.kernel.org/lkml/20240320183846.19475-2-lasse.collin@tukaani.org/

    Linux kernel documentation: https://docs.kernel.org/staging/xz.html

    The GitHub repository for XZ Embedded kernel module has also been disabled: https://github.com/tukaani-project/xz-embedded/

    luis_in_brief,
    @luis_in_brief@social.coop avatar

    @GossiTheDog can’t help but think that with just a liiiiiitle more patience and a liiiiitle more skill this would have been a very real problem.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Original maintainer of XZ repos has posted a short update:

    https://tukaani.org/xz-backdoor/

    HT @SamantazFox

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar
    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Also since there’s a lot going on here, up thread I mentioned a 2015 minor bug in Google’s OSS Fuzzer (security testing tool) - the threat actor deliberately introduced the bugged function into XZ, then used that to get an exception in OSS Fuzzer’s code to stop scanning of XZ.

    I’ve just been looking at the actual backdoor for a few hours with greater minds than me, it’s incredibly complex - it basically piggy backs RSA key RCE inside sshd as a Trojan horse. Somebody/bodies spent $$ on this.

    ohmu,
    @ohmu@social.seattle.wa.us avatar

    @GossiTheDog
    Somebody as in a nation state actor?

    analogist,
    @analogist@social.ridetrans.it avatar

    @ohmu @GossiTheDog doubt any other entity has 2+ years of timeframe to slowly psyops a poor maintainer into handing over control and insert the most subtle of vulnerabilities into the test/build chain that require world-class vuln researchers to understand

    stevel,
    @stevel@hachyderm.io avatar

    @analogist @ohmu @GossiTheDog + all the work to identify this library and it’s maintainer as vulnerable to “attack”. They had to work out that systemd loaded extra libraries into sshd, then examine all of them to identify
    -small projects trusted as stable
    -single mostly inactive maintainer.
    They could code & test the exploit in parallel with the takeover -after doing some PoC to show that any exploit was possible

    stevel,
    @stevel@hachyderm.io avatar

    @analogist @ohmu @GossiTheDog if I was in a team trying to do this, we’d have a spreadsheet on libraries+ maintainers w/ parallel takeover attempts -at least until we had control of Even then we’d keep out other fake GitHub accounts mildly active as contingencies.
    Projects with binary files in the test sources are a clear win, hence a focus on compression. But any lib with regression testing of file formats needs those

    GossiTheDog, (edited )
    @GossiTheDog@cyberplace.social avatar

    Also, to be super clear nobody should panic about as the Postgres developer who found this basically caught it quick enough that almost no businesses or devices will be running the code.

    So everybody should be chill about this specific issue as that guy saved everybody’s bacon.

    To give an idea of the scale of OpenSSH usage, it’s absolutely huge, it dwarfs RDP by a huge margin (think ten times), and had this survived for a long period of time it would have been unbelievably bad.

    renchap,
    @renchap@oisaur.com avatar

    @GossiTheDog but we shoud maybe panic at the number of other projects that may have been infiltrated by this actor under other names and have never beeen noticed?

    geekiga,

    @renchap @GossiTheDog that was also my question. If it happened with XZ, where else has it happened before?

    dalias,
    @dalias@hachyderm.io avatar

    @renchap @GossiTheDog GitHub had better be analyzing correlations with other user account activity and flagging any matches for review...

    dtelder,

    @GossiTheDog Is it too early, or have someone made a poc on how to use it?

    falken,
    @falken@qoto.org avatar

    @dtelder @GossiTheDog too early. Still reversing injected binary

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    The sshd backdoor in is just way beyond my technical ability. There’s so much there, I imagine more than a few conference talks are going to be submitted for it.

    My amateur hour view is it’s really well put together (eg you can only execute commands if you have a private key that only the attacker has) and appears to allow remote removal of the backdoor, too. There’s a whole bunch of features which I’m too dumb to get.

    Also for me, performance isn’t that bad - I wouldn’t have noticed it.

    GossiTheDog, (edited )
    @GossiTheDog@cyberplace.social avatar

    Kinda interesting - a change made by the threat actor has ended up in Windows OS. Redmond bundled libarchive into the OS, which the TA had been tinkering with.

    This is the code change which has been imported: https://github.com/libarchive/libarchive/pull/1609

    Edit: reworded this as the scope looks bigger than Win 11.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    I gotta say, the open source community response to the XZ issue and auditing code changes for the specific threat actor has been incredibly good overall.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    4 days since XZ backdoor became public knowledge and most major Linux AV and EDR security vendors still have zero detections.. they haven’t even set the static file hashes as malicious.

    Can’t wait for all the vendor blogs in a week saying they fully protect against the threat. 👍

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    The libarchive change has been rolled back as it introduced a low severity security issue, will go through usual process for updates.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Linux distribution versions impacted by backdoor (or not), best list I’ve seen: https://www.rapid7.com/blog/post/2024/04/01/etr-backdoored-xz-utils-cve-2024-3094/

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    .@amlw wrote a great proof of concept for to allow code execution via ssh.

    Very important note: it doesn’t work in the wild as you need the private key, which only the threat actor(s) have. But you can create your own for exploiting your own servers.

    https://github.com/amlweems/xzbot

    DrHyde,
    @DrHyde@fosstodon.org avatar

    @GossiTheDog @amlw I do like that they had the good manners to secure their backdoor so that the riff-raff couldn't use it.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    If you use Microsoft Vulnerability Management, it is false positiving on CVE-2024-3094 aka backdoor - it is picking up the Cygwin version of XZ as vuln on Windows systems.

    The Cygwin packages predate the backdoor and it doesn’t impact Windows, also the file it flags isn’t the backdoor but lzmadec.exe

    https://cygwin.com/packages/summary/xz.html

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    Really good timeline of backdoor, laying out everything known about what the threat actor was up to: https://research.swtch.com/xz-timeline

    mattblaze,
    @mattblaze@federate.social avatar

    @GossiTheDog Oh, that's really interesting.

    GossiTheDog, (edited )
    @GossiTheDog@cyberplace.social avatar

    Re attacker - the known threat actor account made various changes across multiple open source projects and documentation.

    Library maintainers should not look at those changes in isolation of just that line change, or assume the threat actor only became malicious later. Assume they are very well resourced and acting with broad objectives.

    In at least one case they made an existing unknown vulnerability exploitable, and we know they were socially engineering the XZ maintainer years ago.

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    ‘They’ are very likely a multi million dollar operation - see also just the shell script analysis, before you even get to the backdoor (which is much more nuts) https://research.swtch.com/xz-script

    The actual SSH backdoor is cryptographically signed so only the threat actor can use it. If you work in threat intelligence and write “foreign” intelligence agency, you might want to look at your bias training.

    erlenmayr,

    @GossiTheDog I am amazed how they took all that time to prepare and effort to hide all this, and then impatiently started pushing the distros in such a suspicious way.

    snidsneak,

    @GossiTheDog Have you seen the Tukanni project installations on windows devices?

    taiki,

    @GossiTheDog That'd blow up systems that haven't downgraded though, no? Detection would be nice, but would risk flooding analysts with alerts they can't do anything about 🤔 (not working on the EDR space, extrapolating)

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    deleted_by_author

  • Loading...
  • taiki,

    @GossiTheDog thinking of the “one death is a tragedy, a thousand is a statistic” quote here, but I don’t necessarily disagree. Just thinking that if you have 1000s of vulnerable hosts, getting flooded by alerts wouldn’t be very useful. With that said, I never was on the receiving end so I’m mostly guessing

    kravietz,
    @kravietz@agora.echelon.pl avatar

    @GossiTheDog

    On the very first day I’ve submitted the static “test” files to ClamAV and VT. ClamAV response was:

    Our initial assessment shows that this file is possibly clean. If you provided a description that suggests otherwise, we will further examine the sample & proceed from there.

    On VT the detection rate was zero but you can at least add a comment and community ranking there, which I did. Now I see it’s detected by 7/60 and more community ratings were added.

    anthropy,
    @anthropy@mastodon.derg.nz avatar

    @GossiTheDog somewhere if this is true it would be somewhat funny and hopefully would put a stop to the whole 'opensource vs closed source security' debate

    carey,

    @GossiTheDog I think this was for the BSD tar executable, so you have to run the code deliberately:

    C:>tar.exe --version
    bsdtar 3.6.2 - libarchive 3.6.2 zlib/1.2.5.f-ipp liblzma/5.2.5 bz2lib/1.0.8 libzstd/1.5.4

    GossiTheDog,
    @GossiTheDog@cyberplace.social avatar

    deleted_by_author

  • Loading...
  • DHowett,

    @GossiTheDog @carey FWIW, libarchive (as well as bsdtar) has been bundled with Windows since 2018. :)

    JorgeStolfi,
    @JorgeStolfi@mas.to avatar

    @GossiTheDog @SamantazFox

    I don't know which is the biggest crime: naming a product or service with a word of the English language, like "upstream", or mentioning that product or service in an article without capitalizing, changing the font, or qualifiying it -- as "software from upstream" rather than "software from Upstream" or "software from the /upstream/ site".

    MorpheusB,
    @MorpheusB@aus.social avatar

    @GossiTheDog Attention to detail!

    JoeUchill,
    @JoeUchill@mastodon.social avatar

    @GossiTheDog But many eyes!

    Toasterson,
    @Toasterson@chaos.social avatar

    @GossiTheDog That specific dev contributed to wasmtime etc too. So more projects need audits.

    firefly,
    @firefly@neon.nightbulb.net avatar

    > As I said, the impact here will be very limited due to how quick it was caught. Everybody owes the finder a beer.

    This is wishful thinking, but thanks.

    The very nature of this means the actual impact is unknown and unknowable.

    How many other packages are bent like this and have not yet been discovered?

    Dependency hell is not just about package managers but package maintainers!

    piepants,
    @piepants@famichiki.jp avatar

    @GossiTheDog that's an amazing piece of research there.

    bloc,
    @bloc@hachyderm.io avatar

    @GossiTheDog @wdormann Several linux distros have already investigated how they're impacted by this (thanks @mgorny and @VoidLinux). Any takes on this from @almalinux and @alpinelinux?

    almalinux,
    @almalinux@fosstodon.org avatar

    @bloc @GossiTheDog @wdormann @mgorny @VoidLinux @alpinelinux
    AlmaLinux is not, and never was, vulnerable to this.

    joeyh,
    @joeyh@hachyderm.io avatar

    @GossiTheDog @wdormann it was included in debian testing and unstable, they've released a fix now

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines