Hackers Hijack Popular Compression Tool: Your SSH Could be Next!

InfoSec Hitchens
3 min readMar 29, 2024

--

In the digital amphitheater of cybersecurity, an insidious drama unfolds, one that strikes at the very sinews of our networked existence. The unsuspecting protagonist in this tale is xz/liblzma, a stalwart utility in the compression domain, now the vehicle for a cunningly crafted backdoor, the kind that would make even the most stoic of sysadmins shudder. The details are detailed in this mailing list posting from the oss-security mailing list, one which I recommend you subscribe to.

The Discovery:
It began with an anomaly, a quirk observed in the Debian realms — a spike in CPU usage here, a valgrind complaint there-mere whispers of the storm that was brewing in the underbelly of liblzma. This was no mere distribution hiccup; the roots of this malaise stretched deep, entwining with the very source from whence xz sprang.

The Treachery Unveiled:
The backdoor, a term too quaint for this machination, was not content with lurking in the shadows of the source code. No, it insinuated itself into the configure script of the distributed tarballs, a serpent in the digital Eden. This nefarious script, obfuscated to the point of near-indecipherability, was a Trojan horse, biding its time, waiting to unleash its payload under the perfect confluence of conditions. The maliciously injected code can be viewed here

The Modus Operandi:
The exploit was discriminating, choosing its battles with the precision of a seasoned strategist. It sought out 64-bit Linux bastions, fortified with GCC and the GNU linker, perhaps even cloaked in the guise of a Debian or RPM package build. Once the stars aligned, it set to work, meticulously weaving its corrupted thread into the Makefile of liblzma.

The Harbingers of Doom:
In the repository’s vaults lay the twin enigmas, bad-3-corrupt_lzma2.xz and good-large_compressed.lzma, their innocuous names belying the chaos ensconced within. These artifacts, slipped into the codebase through commits that now seem as ominous as a raven’s caw, were the heart of the exploit, pulsing with malicious intent.

The Shadow over OpenSSH:
The reverberations of this subterfuge were felt most acutely in the realm of OpenSSH, where logins became a Sisyphean ordeal, each attempt a trudge through molasses. The linkage was arcane, a roundabout dependency through libsystemd, which, in its own inscrutable wisdom, sought counsel from the compromised liblzma.

The Intricacies of Deception:
Our tale delves into the labyrinthine technicalities of the exploit’s machinations — how it cunningly usurped execution through a sleight of hand with function resolvers and audit hooks, a dance of shadows and mirrors that culminated in the audacious commandeering of the SSH authentication process.

The Call to Arms:
In this dire hour, the clarion call to action rings out — upgrade, secure, and fortify. Attached to this missive are the tools of vigilance, scripts to divine the presence of this digital malfeasance, a beacon of hope in these troubled times.

Thus, we stand witness to a saga of betrayal and subterfuge, a reminder of the perennial battle waged in the silent halls of cyberspace, where the guardians of our digital dominions remain ever-vigilant against the ceaseless tide of threats lurking just beyond the periphery of our firewalls.

--

--

InfoSec Hitchens
InfoSec Hitchens

Written by InfoSec Hitchens

0 Followers

Information Security from the perspective of the late, great, Christopher Hitchens

No responses yet