Created
March 30, 2024 16:40
-
-
Save nrnw/524a6cd7b00ff27f12740d699db7ebdf to your computer and use it in GitHub Desktop.
backdoor vulnerablity check for xz-utils
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Check xz-utils installed | |
if ! command -v xz &> /dev/null | |
then | |
echo "xz-utils is not installed on this system." | |
exit 1 | |
fi | |
# Get the version of xz-utils | |
xz_version=$(xz --version | head -n 1 | awk '{print $4}') | |
# Check if the version is vulnerable | |
if [[ "$xz_version" == "5.6.0" || "$xz_version" == "5.6.1" ]] | |
then | |
echo "System is vulnerable to the backdoor found in xz-utils (CVE-2024-3094)." | |
else | |
echo "System is not vulnerable to the backdoor found in xz-utils." | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment