{"id":13579473,"url":"https://github.com/RoderickChan/docker_pwn_env","last_synced_at":"2025-04-05T21:31:49.111Z","repository":{"id":209482956,"uuid":"724118230","full_name":"RoderickChan/docker_pwn_env","owner":"RoderickChan","description":"Debug pwn using docker image","archived":false,"fork":false,"pushed_at":"2025-03-09T13:27:09.000Z","size":9538,"stargazers_count":124,"open_issues_count":0,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T14:25:02.301Z","etag":null,"topics":["ctf","docker-image","pwn","pwn-env"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/RoderickChan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-11-27T12:40:49.000Z","updated_at":"2025-03-09T13:27:13.000Z","dependencies_parsed_at":"2023-11-27T16:29:36.471Z","dependency_job_id":"fd86b890-790a-4e2f-a555-c97e6737a32e","html_url":"https://github.com/RoderickChan/docker_pwn_env","commit_stats":null,"previous_names":["roderickchan/docker_pwn_env"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickChan%2Fdocker_pwn_env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickChan%2Fdocker_pwn_env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickChan%2Fdocker_pwn_env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoderickChan%2Fdocker_pwn_env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoderickChan","download_url":"https://codeload.github.com/RoderickChan/docker_pwn_env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247405973,"owners_count":20933799,"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":["ctf","docker-image","pwn","pwn-env"],"created_at":"2024-08-01T15:01:39.748Z","updated_at":"2025-04-05T21:31:49.093Z","avatar_url":"https://github.com/RoderickChan.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\n- [Docker Image Based On Ubuntu For Pwn Debug](#docker-image-based-on-ubuntu-for-pwn-debug)\n  - [Pull Image](#pull-image)\n  - [Example](#example)\n  - [Run Container](#run-container)\n  - [Attach Container](#attach-container)\n  - [Check Container](#check-container)\n  - [Build Image](#build-image)\n  - [Use Zsh](#use-zsh)\n  - [Feature](#feature)\n \n\u003e [!IMPORTANT]\n\u003e 2025-03-09更新：因学业繁忙，已无精力维护此仓库，后续不再更新\n\n\n# Docker Image Based On Ubuntu For Pwn Debug\n\n基于`Ubuntu`构建并用于快速调试`pwn`题的镜像，开箱即用，告别搭建环境的苦恼！\n\n如果你想基于`docker`搭建`pwn`赛题环境，请点击[GitHub - RoderickChan/deploy\\_pwn\\_template: Templates for deploying pwn challenge using docker](https://github.com/RoderickChan/deploy_pwn_template)下载和使用模板。\n\nIf you want to deploy a ctf pwn challenge using docker, you can click this repo [GitHub - RoderickChan/deploy\\_pwn\\_template: Templates for deploying pwn challenge using docker](https://github.com/RoderickChan/deploy_pwn_template) to use these templates I offer there.\n\n## Pull Image\n\nPull images from \u003chttps://hub.docker.com/r/roderickchan/debug_pwn_env/tags\u003e, such as `docker pull roderickchan/debug_pwn_env:23.04-2.37-0ubuntu2.1-20231127`. The tag of the image means `Ubuntu 23.04`, glibc version `2.37-0ubuntu2.1` and image built in `2023-11-27`. \n\nI introduce how to use `docker` in a Chinese [blog](https://www.roderickchan.cn/zh-cn/2023-02-13-%E4%BD%BF%E7%94%A8docker%E8%B0%83%E8%AF%95pwn%E9%A2%98/). \n\n点击[博客](https://www.roderickchan.cn/zh-cn/2023-02-13-%E4%BD%BF%E7%94%A8docker%E8%B0%83%E8%AF%95pwn%E9%A2%98/)查看如何使用`docker`调试`pwn`题。\n\nCurrent tags in the [dockerhub](https://hub.docker.com/r/roderickchan/debug_pwn_env/tags):  \n现有的镜像[列表](https://hub.docker.com/r/roderickchan/debug_pwn_env/tags)：\n\n| Ubuntu Version | Glibc Version    | Pull command                                                 | User/Password| Status |\n| :------------: | :--------------: | :----------------------------------------------------------: | :---: | :---: |\n| Ubuntu 24.10   | 2.40-1ubuntu3  | docker pull roderickchan/debug_pwn_env:24.10-2.40-1ubuntu3-20240922     | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 24.04   | 2.39-0ubuntu8.3  | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu8.3-20240922 | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 24.10   | 2.39-0ubuntu9  | docker pull roderickchan/debug_pwn_env:24.10-2.39-0ubuntu9-20240804     | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu8.2  | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu8.2-20240818 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu8.2  | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu8.2-20240601 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu8.1  | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu8.1-20240430 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu8    | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu8-20240412   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu6    | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu6-20240324   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.39-0ubuntu2    | docker pull roderickchan/debug_pwn_env:24.04-2.39-0ubuntu2-20240225   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.38-3ubuntu1    | docker pull roderickchan/debug_pwn_env:24.04-2.38-3ubuntu1-20240207   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 24.04   | 2.38-3ubuntu1    | docker pull roderickchan/debug_pwn_env:24.04-2.38-3ubuntu1-20231211   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 23.10   | 2.38-1ubuntu6.3  | docker pull roderickchan/debug_pwn_env:23.10-2.38-1ubuntu6.3-20240601 | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 23.10   | 2.38-1ubuntu6.2  | docker pull roderickchan/debug_pwn_env:23.10-2.38-1ubuntu6.2-20240421 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 23.10   | 2.38-1ubuntu6.1  | docker pull roderickchan/debug_pwn_env:23.10-2.38-1ubuntu6.1-20240202 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 23.10   | 2.38-1ubuntu6    | docker pull roderickchan/debug_pwn_env:23.10-2.38-1ubuntu6-20231127   | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 23.04   | 2.37-0ubuntu2.2  | docker pull roderickchan/debug_pwn_env:23.04-2.37-0ubuntu2.2-20231211 | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 23.04   | 2.37-0ubuntu2.1  | docker pull roderickchan/debug_pwn_env:23.04-2.37-0ubuntu2.1-20231127 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 22.04   | 2.35-0ubuntu3.8  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.8-20240601 | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 22.04   | 2.35-0ubuntu3.7  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.7-20240421 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 22.04   | 2.35-0ubuntu3.6  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.6-20240113 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 22.04   | 2.35-0ubuntu3.5  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.5-20231211 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 22.04   | 2.35-0ubuntu3.4  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.4-20231127 | 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 22.04   | 2.35-0ubuntu3.1  | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3.1-20230213 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 22.04   | 2.35-0ubuntu3    | docker pull roderickchan/debug_pwn_env:22.04-2.35-0ubuntu3-20220707   | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 20.04   | 2.31-0ubuntu9.16 | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.16-20240601| 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating|\n| Ubuntu 20.04   | 2.31-0ubuntu9.15 | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.15-20240421| 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 20.04   | 2.31-0ubuntu9.14 | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.14-20231211| 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived|\n| Ubuntu 20.04   | 2.31-0ubuntu9.12 | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.12-20231127| 1. root/root\u003cbr /\u003e2. ctf/ctf | Archived |\n| Ubuntu 20.04   | 2.31-0ubuntu9.9  | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.9-20230213 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 20.04   | 2.31-0ubuntu9.7  | docker pull roderickchan/debug_pwn_env:20.04-2.31-0ubuntu9.7-20220525 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 21.10   | 2.34-0ubuntu3.2  | docker pull roderickchan/debug_pwn_env:21.10-2.34-0ubuntu3.2-20220707 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 21.04   | 2.33-0ubuntu5    | docker pull roderickchan/debug_pwn_env:21.04-2.33-0ubuntu5-20220908   | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 18.04   | 2.27-3ubuntu1.6  | docker pull roderickchan/debug_pwn_env:18.04-2.27-3ubuntu1.6-20240422 | 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating |\n| Ubuntu 18.04   | 2.27-3ubuntu1.6  | docker pull roderickchan/debug_pwn_env:18.04-2.27-3ubuntu1.6-20230213 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 18.04   | 2.27-3ubuntu1.5  | docker pull roderickchan/debug_pwn_env:18.04-2.27-3ubuntu1.5-20220525 | 1. root/root\u003cbr /\u003e2. roderick | Archived |\n| Ubuntu 16.04   | 2.23-0ubuntu11.3 | docker pull roderickchan/debug_pwn_env:16.04-2.23-0ubuntu11.3-20240412| 1. root/root\u003cbr /\u003e2. ctf/ctf | 🚩Updating |\n\n\nTwo users in the image:  \n- `root` user and password: `root/root`  \n- `ctf` user and password: `ctf/ctf`\n\n## Example  \n\nThis example uses the old image. The normal username in old image was `roderick`, the current username is now `ctf`.\n\n以下示例采用原来的镜像。原来的普通用户名为`roderick`，现在的普通用户名为`ctf`。\n\n![](https://github.com/RoderickChan/docker_pwn_env/blob/main/gif/623588.gif?raw=true)\n\n可在`asciinema`上观看：\n\n[![asciicast](https://asciinema.org/a/623588.svg)](https://asciinema.org/a/623588)\n\n\n当前的镜像的示例如下。 \n\nThis example uses the updating image:  \n\n![](https://github.com/RoderickChan/docker_pwn_env/blob/main/gif/623673.gif?raw=true)\n\n可在`asciinema`上观看：\n\n[![asciicast](https://asciinema.org/a/623673.svg)](https://asciinema.org/a/623673)\n\n## Run Container\n\n启动容器：\n\n```shell\ndocker run -it -d -v host_path:container_path -p host_port:container_port --cap-add=SYS_PTRACE IMAGE_ID # auto update 自动执行update.sh脚本\n\ndocker run -it -d -v host_path:container_path -p host_port:container_port --cap-add=SYS_PTRACE IMAGE_ID /bin/sh # do not update 不会自动更新\n\ndocker run -it -d -v host_path:container_path -p host_port:container_port --privileged IMAGE_ID # privileged enabled and auto update 给特权标志和自动更新\n\ndocker run -it -d -v host_path:container_path -p host_port:container_port --privileged IMAGE_ID /bin/sh # privileged enabled and auto update 给特权标志和自动更新\n```\n\n## Attach Container\n\n进入容器(enter a container)：\n\n```shell\ndocker exec -it CONTAINER_ID /bin/sh\ndocker exec -it -u root CONTAINER_ID /bin/sh\n```\n\n## Check Container \n\n检查容器是否正常：\n```\n/bin/test-this-container.sh\n```\n\ninput `q` in gdb to exit.  \n进入`gdb`后输入`q`退出。\n\n\n## Build Image\n\n构建镜像(single build)：\n\n```shell\ndocker build --build-arg BUILD_VERSION=20.04 -t debug_pwn_env:20.04 .\n```\n\n自动构建(auto build):\n\n```shell\n\nchmod +x ./auto_compile.sh\n./auto_compile.sh\n```\n\n构建`Ubuntu 16.04`的镜像，请使用`Dockerfile.ubuntu-16.04`文件(use Dockerfile.ubuntu-16.04 to build Ubuntu-16.04 image)\n\n## Use Zsh\n\n注意：镜像中安装了`oh-my-zsh`，提供`zsh-autosuggestions`和`zsh-syntax-highlighting`插件，推荐使用`zsh`作为`shell`登入。\n\nI have installed `oh-my-zsh` and `zsh-autosuggestions` plugin, `zsh-syntax-highlighting` plugin in the image, if you like it, please launch a container with `/bin/zsh`.\n\nexample:\n\n```shell\ndocker run -it -d -v $PWD:/home/ctf/hacker -p 10001:10001 --privileged IMAGE_ID /bin/zsh # privileged enabled and auto update 给特权标志和自动更新\n```\n\n## Feature \n\nSoftware and packages in the image:   \n镜像中含有的软件和包：\n\n- pwncli\n- pwntools  \n- pwndbg  \n- Pwngdb\n- gef  \n- one_gadget  \n- ropper \n- ropgadget\n- seccomp-tools  \n- patchelf  \n- capstone  \n- z3-solver  \n- qiling  \n- lief  \n- socat  \n- tmux \n- zsh \n- gdb-multiarch\n- vim \n- curl \n- gdbserver\n\nRead `Dockerfile` to get more infomation.\n\n阅读`Dockerfile`获得更多信息。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRoderickChan%2Fdocker_pwn_env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRoderickChan%2Fdocker_pwn_env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRoderickChan%2Fdocker_pwn_env/lists"}