Skip to content
KitploitKITPLOIT
उपकरणएक्सप्लॉइटब्लॉग
Log in
जमा करें
उपकरणएक्सप्लॉइटब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

फ़ीडसंपर्कगोपनीयता© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
CVE-2024-3094 — Ansible role and Python script that detect backdoored liblzma (xz 5.6.0/5.6.1, CVE-2024-3094), back up affected libraries, upgrade packages, and re-scan hosts. | Kitploit
उपकरण/GitHubGitHub/axisops/cve-2024-3094
Defensive ToolsVulnerability ScannersScripting & AutomationConfiguration AuditingDevSecOpsSupply Chain SecurityIncident Response
GitHubaxisops/cve-2024-3094

CVE-2024-3094

Ansible role and Python script that detect backdoored liblzma (xz 5.6.0/5.6.1, CVE-2024-3094), back up affected libraries, upgrade packages, and re-scan hosts.

रिपॉजिटरी देखें
30 अक्टू॰ 2026अभी तक समीक्षित नहीं
साझा करें
वेबसाइट
अनुरोधित भाषा में सामग्री उपलब्ध नहीं है। अंग्रेज़ी संस्करण दिखाया जा रहा है।

xz Backdoor CVE-2024-3094 Detection and Mitigation Ansible Role

This Ansible role deploys a Python-based script that finds backdoored liblzma (xz 5.6.0 and 5.6.1, CVE-2024-3094) on a host and replaces it with the distribution's fixed package.

It is designed to be run via Ansible, but you can also execute the script manually if you wish.

Read more about the xz backdoor here:

  • NVD CVE-2024-3094
  • Andres Freund's report on oss-security
  • Debian DSA-5649-1
  • Red Hat: urgent security alert for Fedora Linux 40 and Fedora Rawhide users
  • Ubuntu CVE-2024-3094
  • CISA alert

What it does

The upstream release tarballs for xz 5.6.0 and 5.6.1 contain build-time code that modifies liblzma. sshd does not use liblzma directly, but Debian and several other distributions patch openssh for systemd notification, and libsystemd depends on liblzma. That is the path to ssh server compromise described in the oss-security report of 2024-03-29.

Exposure by distribution, as stated in the advisories above:

DistributionAffectedFixed package
Debiantesting, unstable and experimental, 5.5.1alpha-0.1 up to and including 5.6.1-1. No stable release known to be affected5.6.1+really5.4.5-1
FedoraRawhide (5.6.0, 5.6.1) and Fedora 40 (xz-libs-5.6.0-1.fc40, 5.6.0-2.fc40)xz-5.4.6-3.fc40 (FEDORA-2024-d02c7bb266), epoch bumped
Red Hat Enterprise LinuxNo version affected—
UbuntuNo released version affected; the package reached only noble-proposed and was removed—

Features

  • Reads the installed xz package versions from dpkg-query (liblzma5, xz-utils) and rpm (xz, xz-libs), whichever is present
  • Scans library directories for liblzma.so.5*, resolves symlinks so each real file is counted once, and reads the version from the file name, or from the version string inside the library when the name carries none
  • Reports any 5.6.0 or 5.6.1 (and Debian's 5.5.1alpha)
  • Reads Debian's +really versions correctly: 5.6.1+really5.4.5-1 is the fix, not 5.6.1
  • Reports whether sshd links liblzma, using ldd
  • Dry run by default. Nothing changes without --apply
  • With --apply: backs up every affected library file, mirroring its full path under the backup directory, upgrades the xz packages with apt-get, dnf or yum, and scans again
  • Refuses when no supported package manager is present, and says so
  • Names any affected file the package manager does not own (built from source into /usr/local, or shipped inside an application) after the upgrade, rather than reporting the host clean
  • Writes all actions to a log file and prints a summary to stdout
  • Configurable via a YAML file, resolved relative to the script
  • Packaged as an Ansible role for automated deployment across multiple systems

Requirements

  • Python 3.9+
  • PyYAML, only for a run that reads a YAML config file (the installed apply). The role installs it from the distribution (python3-yaml, py3-yaml or python3-pyyaml), never from PyPI. The detection entry needs only the standard library: its config goes in as JSON on stdin
  • Root, for --apply and --backup-only. Detection runs as any user
  • ldd for the sshd check (part of glibc; the check is skipped without it)

Everything else is the standard library. The package managers are the distribution's own.

Configuration

The script is configured via a YAML file, templated automatically by the role.

Example config.yaml:

scan_paths:
  - /lib
  - /lib64
  - /usr/lib
  - /usr/lib64
  - /usr/local/lib
backup_directory: /opt/backups/xz
log_file: /var/log/xz_backdoor_mitigation.log
check_packages: true
check_sshd: true
sshd_path: /usr/sbin/sshd
  • scan_paths: directories to search for liblzma.so.5*
  • backup_directory: where to keep copies of affected libraries
  • log_file: path to a log file for operation tracking
  • check_packages: query dpkg-query/rpm for package versions
  • check_sshd: report whether sshd links liblzma
  • sshd_path: the sshd binary to check

Role variables (defaults/main.yml) carry the same names with an xz_backdoor_ prefix, plus:

  • xz_backdoor_apply (default true): back up and upgrade when something is found. Set false to report only
  • xz_backdoor_restart_sshd (default false): restart sshd after the upgrade when it links liblzma. Off by default: the restart is the operator's to schedule, and until it happens the running sshd keeps the old library
  • xz_backdoor_script_dest: defaults to /usr/local/lib/xz_backdoor_mitigation/, a directory of its own, so its config.yaml does not overwrite another role's in /usr/local/bin

Usage as an Ansible Role

Add this role to your playbook:

- name: Mitigate xz backdoor CVE-2024-3094
  hosts: all
  become: true
  roles:
    - xz_backdoor_mitigation

The role runs the script to detect, and only when something is found: backs up the affected files, upgrades liblzma5/xz-utils (apt) or xz/xz-libs (dnf, yum) to the latest version in the distribution's repositories, restarts sshd if it links liblzma and xz_backdoor_restart_sshd is true, and runs the script again. The host fails if anything is still affected. Debian's and Fedora's fixed packages both sort above the bad versions, so an ordinary upgrade installs them.

To report only:

ansible-playbook site.yml -e xz_backdoor_apply=false

Usage Directly

If you wish to run the script manually, you can do so:

  1. Copy the script and the shared library beside it to your target machine:

    files/xz_backdoor_mitigator.py
    files/samp_common.py
    
  2. Create your own config.yaml in the same directory.

  3. Run it:

    python3 xz_backdoor_mitigator.py                           # dry run, config.yaml beside the script
    python3 xz_backdoor_mitigator.py --config /path/to/config.yaml
    python3 xz_backdoor_mitigator.py --scan-path /srv/chroot/lib   # repeatable; replaces scan_paths
    sudo python3 xz_backdoor_mitigator.py --apply              # back up, upgrade, re-scan
    sudo python3 xz_backdoor_mitigator.py --backup-only        # back up, change nothing else
    

Validation

  • The script prints scanned=N vulnerable=N backed_up=N upgraded=N failed=N sshd_links_liblzma=N undetermined=N to stdout. Warnings naming each affected package or file go to stderr.
  • Exit codes: 0 nothing affected, 2 something affected remains or a library's version could not be read (undetermined=N), 1 a backup, upgrade or refusal failed, 130 interrupted.
  • Check the configured log file (default: /var/log/xz_backdoor_mitigation.log) for every package and library examined and its version
  • Confirm by hand: dpkg-query -W liblzma5 or rpm -q xz-libs
  • If sshd_links_liblzma=1 on a host that had 5.6.0 or 5.6.1, confirm sshd has restarted since the upgrade
  • Ideally, test in a staging environment before production rollout

Notes

टूल डाउनलोड करें

संबंधित टूल

  • wazuh

    ओपन-सोर्स XDR और SIEM प्लेटफ़ॉर्म जो एंडपॉइंट और क्लाउड वर्कलोड पर खतरे का पता लगाने, लॉग विश्लेषण, फ़ाइल अखंडता निगरानी, कमजोरियों का आकलन और अनुपालन प्रबंधन के लिए है।

  • suricata

    रीयल-टाइम ट्रैफ़िक निरीक्षण, घुसपैठ का पता लगाने और रोकथाम, प्रोटोकॉल विश्लेषण, और नियम-आधारित खतरे की खोज के लिए ओपन-सोर्स नेटवर्क IDS/IPS/NSM इंजन।

  • zeek

    Zeek एक शक्तिशाली नेटवर्क विश्लेषण ढांचा है जो आपके परिचित सामान्य IDS से काफी अलग है।

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    # घोस्टलॉक वन-टैप निष्पादन ऐप (CVE-2026-43499)

    750
  • 2

    IMSIcatcher

    28zaaky/imsicatcher

    IMSI Catcher प्लेटफ़ॉर्म जो SMS को इंटरसेप्ट करने, संदेश इंजेक्ट करने और मोबाइल उपकरणों को ट्रैक करने के लिए एक रोगी GSM सेल तैनात करता है

    739
  • 3

    Callisto

    jetp1ane/callisto

    स्वचालित बाइनरी भेद्यता विश्लेषण उपकरण जो Ghidra के माध्यम से निष्पादन योग्य फ़ाइलों को डीकंपाइल करता है, Semgrep के साथ स्यूडो-सी कोड को स्कैन करता है, और गलत सकारात्मकता को कम करने के लिए GPT-3.5-Turbo का उपयोग करके निष्कर्षों को मान्य करता है।

    585
  • 4

    opencti

    opencti-platform/opencti

    खुला साइबर खतरा बुद्धिमत्ता प्लेटफॉर्म

    550
  • 5

    DFRoot

    a2333c/dfroot

    Samsung Galaxy S25 Ultra (SM-S938B) के लिए Android रूट टूल जो बूट पर KernelSU के माध्यम से स्वचालित रूप से रूट प्राप्त करने के लिए DirtyFrag CVE-2026-43284 और CVE-2026-43499 को चेन करता है।

    414
  • 6

    ARTEX

    baarai/artex

    प्लानर/वर्कर एजेंट, एसेट और एक्सप्लोरेशन ग्राफ़, MITM ट्रैफ़िक रिकॉर्डिंग, और भेद्यता पुनःपरीक्षण के साथ LLM मल्टी-एजेंट स्वायत्त पेनेट्रेशन टेस्टिंग प्लेटफ़ॉर्म।

    409

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →