后门事件:

XZ是类Unix操作系统上的一种无损数据压缩格式,通常与gzibzip2 等其他常见数据压缩格式进行比较。 XZ Utils是一个命令行工具,包含XZ文件和liblzma的压缩和解压缩功能,liblzma是一种用于数据压缩的类似zlib的API,并且还支持旧版 .lzma 格式。

3月29日,有开发人员在安全邮件列表上发帖称,他在调查SSH性能问题时发现了涉及XZ包中的供应链攻击,进一步溯源发现SSH使用的上游liblzma库被植入了后门代码,恶意代码可能允许攻击者通过后门版本的SSH非授权获取系统的访问权限。恶意代码修改了liblzma代码中的函数,该代码是XZ Utils软件包的一部分,链接到 XZ 库的任何软件都可以使用此修改后的代码,并允许拦截和修改与该库一起使用的数据。

受影响系统:

目前已知XZ Utils版本5.6.0和5.6.1受到影响,恶意代码还不存在于XZ的Git发行版中,仅存在于完整的下载包中。 已知的Linux发行版:

Fedora Rawhide

Fedora 41

Debian非稳定的测试版 5.5.1alpha-0.1 到 5.6.1-1

自查方法:

在系统中执行脚本

#! /bin/bash

set -eu

# find path to liblzma used by sshd

path="$(ldd $(which sshd) | grep liblzma | grep -o "/[^ ]*")"

# does it even exist?

if [ "$path" == "" ]

then

echo probably not vulnerable

exit

fi

# check for function signature

if hexdump -ve "1/1 "%.2x"" "$path" | grep -q f30f1efa554889f54c89ce5389fb81e7000000804883ec28488954241848894c2410

then

echo probably vulnerable

else

echo probably not vulnerable

fi

参考链接:

https://www.redhat.com/en/blog/urgent-security-alert-fedora-41-and-rawhide-users

https://www.cisa.gov/news-events/alerts/2024/03/29/reported-supply-chain-compromise-affecting-xz-utils-data-compression-library-cve-2024-3094

https://www.tenable.com/blog/frequently-asked-questions-cve-2024-3094-supply-chain-backdoor-in-xz-utils

https://www.lacework.com/blog/guidance-for-cve-2024-3094-finding-and-responding-to-the-latest-supply-chain-compromise-with-lacework/

https://sysdig.com/blog/cve-2024-3094-detecting-the-sshd-backdoor-in-xz-utils/

https://github.com/byinarie/CVE-2024-3094-info

https://github.com/FabioBaroni/CVE-2024-3094-checker

https://github.com/lypd0/CVE-2024-3094-Vulnerabity-Checker

https://github.com/bioless/xz_cve-2024-3094_detection

https://github.com/Hacker-Hermanos/CVE-2024-3094_xz_check

声明:本文来自奇安信 CERT,版权归作者所有。文章内容仅代表作者独立观点,不代表安全内参立场,转载目的在于传递更多信息。如有侵权,请联系 anquanneican@163.com。