Posted: . At: 11:35 AM. This was 1 month ago. Post ID: 19421
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


How to check if you are affected by the xz backdoor.


How to check if you are affected by the xz backdoor that affects all Linux distributions. Do not run xz by itself. Use these one-liners instead.

Check the xz version on your system. This system is not vulnerable but could do with an apt upgrade.

╭──(john㉿DESKTOP-PF01IEE)───╮
╰───────────────────────────╾╯(~)-(172.30.204.184)strings /usr/bin/xz | grep "(XZ Utils)"
xz (XZ Utils) 5.4.5

This is another way this will return the version of the xz utility.

╭──(john㉿DESKTOP-PF01IEE)───╮
╰───────────────────────────╾╯(~)-(172.30.204.184)strings `which xz` | grep "(XZ Utils"
xz (XZ Utils) 5.4.5

The vulnerable packages are XZ Utils versions 5.6.0 and 5.6.1 for Linux.

If you have these versions, then you must upgrade all packages.

This way you may easily check the version of xz you have and ensure your system is safe.

Use this command on Alma Linux to get the version.

(jcartwright@2403-4800-25af-b00--2) 192.168.1.5 ~  $ dnf info xz
Last metadata expiration check: 0:00:07 ago on Sun Mar 31 11:32:21 2024.
Installed Packages
Name         : xz
Version      : 5.2.5
Release      : 8.el9_0
Architecture : x86_64
Size         : 670 k
Source       : xz-5.2.5-8.el9_0.src.rpm
Repository   : @System
From repo    : anaconda
Summary      : LZMA compression utilities
URL          : https://tukaani.org/xz/
License      : GPLv2+ and Public Domain
Description  : XZ Utils are an attempt to make LZMA compression easy to use on free (as in
             : freedom) operating systems. This is achieved by providing tools and libraries
             : which are similar to use than the equivalents of the most popular existing
             : compression algorithms.
             : 
             : LZMA is a general purpose compression algorithm designed by Igor Pavlov as
             : part of 7-Zip. It provides high compression ratio while keeping the
             : decompression speed fast.

This should be very helpful to a user of Linux to find the version of xz-utils you have installed.

More information and a detection script.

To replace the affected package in Kali Linux and fix this issue, run this command as root.

sudo apt update && sudo apt install -y --only-upgrade liblzma5

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.