├── mydockerfiles ├── glib23 │ ├── build.sh │ ├── run.sh │ └── Dockerfile ├── glib27 │ ├── build.sh │ ├── run.sh │ └── Dockerfile ├── glib29 │ ├── build.sh │ ├── run.sh │ └── Dockerfile ├── glib30 │ ├── build.sh │ ├── run.sh │ └── Dockerfile └── glib31 │ ├── build.sh │ ├── run.sh │ └── Dockerfile └── README.md /mydockerfiles/glib23/build.sh: -------------------------------------------------------------------------------- 1 | docker build . -t lib23 2 | -------------------------------------------------------------------------------- /mydockerfiles/glib27/build.sh: -------------------------------------------------------------------------------- 1 | docker build . -t lib27 2 | -------------------------------------------------------------------------------- /mydockerfiles/glib29/build.sh: -------------------------------------------------------------------------------- 1 | docker build . -t lib29 2 | -------------------------------------------------------------------------------- /mydockerfiles/glib30/build.sh: -------------------------------------------------------------------------------- 1 | docker build . -t lib30 2 | -------------------------------------------------------------------------------- /mydockerfiles/glib31/build.sh: -------------------------------------------------------------------------------- 1 | docker build . -t lib31 2 | -------------------------------------------------------------------------------- /mydockerfiles/glib23/run.sh: -------------------------------------------------------------------------------- 1 | dir=${0%/*} 2 | docker run -it --cap-add sys_ptrace --security-opt seccomp=unconfined -v $(pwd)${dir#?}/../../:/host lib23 3 | -------------------------------------------------------------------------------- /mydockerfiles/glib27/run.sh: -------------------------------------------------------------------------------- 1 | dir=${0%/*} 2 | docker run -it --cap-add sys_ptrace --security-opt seccomp=unconfined -v $(pwd)${dir#?}/../../:/host lib27 3 | -------------------------------------------------------------------------------- /mydockerfiles/glib29/run.sh: -------------------------------------------------------------------------------- 1 | dir=${0%/*} 2 | docker run -it --cap-add sys_ptrace --security-opt seccomp=unconfined -v $(pwd)${dir#?}/../../:/host lib29 3 | -------------------------------------------------------------------------------- /mydockerfiles/glib30/run.sh: -------------------------------------------------------------------------------- 1 | dir=${0%/*} 2 | docker run -it --cap-add sys_ptrace --security-opt seccomp=unconfined -v $(pwd)${dir#?}/../../:/host lib30 3 | -------------------------------------------------------------------------------- /mydockerfiles/glib31/run.sh: -------------------------------------------------------------------------------- 1 | dir=${0%/*} 2 | docker run -it --cap-add sys_ptrace --security-opt seccomp=unconfined -v $(pwd)${dir#?}/../../:/host lib31 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dockerfiles 2 | 3 | A collection of Dockerfiles for pwn, organized by libc version. The dockerfiles were forked from Redpwn and made some changes as per my preference 4 | 5 | 6 | ## USE 7 | 8 | Run the `build.sh` command in a folder to build the image. 9 | 10 | Then run `run.sh` from anywhere to mount the current directory under `/host` of the docker image. You can also just copy the command (it's only one line) from `run.sh` to customize as you see fit. 11 | 12 | # Tools installed. 13 | 14 | 15 | 16 | ## nasm 17 | ## gdb-pwndbg, 18 | ## pwngdb 19 | ## fish 20 | ## ltrace, strace, 21 | ## socat, 22 | ## netcat, 23 | ## ruby, 24 | ## vim, 25 | ## pwntools 26 | ## curl 27 | ## gcc 28 | 29 | # DEBUG WITH GDB 30 | 31 | To debug, Use two terminals. 32 | One to run the process and other two debug the process using gdb. 33 | No need to run editor from the docker itself. edit the scripts from host machine :P 34 | 35 | ##### If there are any issues feel free to contact me. 36 | -------------------------------------------------------------------------------- /mydockerfiles/glib23/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | RUN dpkg --add-architecture i386 && apt-get update && \ 4 | DEBIAN_FRONTEND=noninteractive apt-get install -qy \ 5 | git nasm python \ 6 | build-essential \ 7 | python-dev python-pip python-setuptools \ 8 | libc6-dbg \ 9 | libc6-dbg:i386 \ 10 | gcc-multilib \ 11 | gdb \ 12 | gcc \ 13 | wget \ 14 | curl \ 15 | fish \ 16 | ltrace \ 17 | strace \ 18 | cmake \ 19 | python-capstone \ 20 | socat \ 21 | netcat \ 22 | ruby \ 23 | vim \ 24 | libc6:i386 libncurses5:i386 libstdc++6:i386 \ 25 | lxterminal && \ 26 | apt-get clean 27 | 28 | RUN pip install --no-cache-dir pwntools && \ 29 | gem install one_gadget 30 | 31 | RUN cd ~/ && \ 32 | git clone https://github.com/pwndbg/pwndbg.git && \ 33 | cd ~/pwndbg/ && ./setup.sh 34 | 35 | RUN cd ~/ && \ 36 | git clone https://github.com/scwuaptx/Pwngdb.git 37 | 38 | RUN cd ~/ && \ 39 | git clone https://github.com/hkraw/.files.git && \ 40 | cp ~/.files/.vimrc . && cp ~/.files/.gdbinit . 41 | ENV LANG C.UTF-8 42 | 43 | VOLUME ["/host"] 44 | WORKDIR /host 45 | CMD ["/usr/bin/fish"] 46 | -------------------------------------------------------------------------------- /mydockerfiles/glib27/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | RUN dpkg --add-architecture i386 && apt-get update && \ 4 | DEBIAN_FRONTEND=noninteractive apt-get install -qy \ 5 | git nasm python \ 6 | build-essential \ 7 | python-dev python-pip python-setuptools \ 8 | libc6-dbg \ 9 | libc6-dbg:i386 \ 10 | gcc-multilib \ 11 | gdb \ 12 | gcc \ 13 | wget \ 14 | curl \ 15 | fish \ 16 | ltrace \ 17 | strace \ 18 | cmake \ 19 | python-capstone \ 20 | socat \ 21 | netcat \ 22 | ruby \ 23 | vim \ 24 | libc6:i386 libncurses5:i386 libstdc++6:i386 \ 25 | lxterminal && \ 26 | apt-get clean 27 | 28 | RUN pip install --no-cache-dir pwntools && \ 29 | gem install one_gadget 30 | 31 | RUN cd ~/ && \ 32 | git clone https://github.com/pwndbg/pwndbg.git && \ 33 | cd ~/pwndbg/ && ./setup.sh 34 | 35 | RUN cd ~/ && \ 36 | git clone https://github.com/scwuaptx/Pwngdb.git 37 | 38 | RUN cd ~/ && \ 39 | git clone https://github.com/hkraw/.files.git && \ 40 | cp ~/.files/.vimrc . && cp ~/.files/.gdbinit . 41 | ENV LANG C.UTF-8 42 | 43 | VOLUME ["/host"] 44 | WORKDIR /host 45 | CMD ["/usr/bin/fish"] 46 | -------------------------------------------------------------------------------- /mydockerfiles/glib30/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:19.10 2 | 3 | RUN dpkg --add-architecture i386 && apt-get update && \ 4 | DEBIAN_FRONTEND=noninteractive apt-get install -qy \ 5 | git nasm python \ 6 | build-essential \ 7 | python-dev python-pip python-setuptools \ 8 | libc6-dbg \ 9 | libc6-dbg:i386 \ 10 | gcc-multilib \ 11 | gdb \ 12 | gcc \ 13 | wget \ 14 | curl \ 15 | fish \ 16 | ltrace \ 17 | strace \ 18 | cmake \ 19 | python-capstone \ 20 | socat \ 21 | netcat \ 22 | ruby \ 23 | vim \ 24 | libc6:i386 libncurses5:i386 libstdc++6:i386 \ 25 | lxterminal && \ 26 | apt-get clean 27 | 28 | RUN pip install --no-cache-dir pwntools && \ 29 | gem install one_gadget 30 | 31 | RUN cd ~/ && \ 32 | git clone https://github.com/pwndbg/pwndbg.git && \ 33 | cd ~/pwndbg/ && ./setup.sh 34 | 35 | RUN cd ~/ && \ 36 | git clone https://github.com/scwuaptx/Pwngdb.git 37 | 38 | RUN cd ~/ && \ 39 | git clone https://github.com/hkraw/.files.git && \ 40 | cp ~/.files/.vimrc . && cp ~/.files/.gdbinit . 41 | ENV LANG C.UTF-8 42 | 43 | VOLUME ["/host"] 44 | WORKDIR /host 45 | CMD ["/usr/bin/fish"] 46 | -------------------------------------------------------------------------------- /mydockerfiles/glib31/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:20.04 2 | 3 | RUN dpkg --add-architecture i386 && apt-get update && \ 4 | DEBIAN_FRONTEND=noninteractive apt-get install -qy \ 5 | git nasm python \ 6 | build-essential \ 7 | python-dev python-setuptools python3-pip \ 8 | libc6-dbg \ 9 | libc6-dbg:i386 \ 10 | gcc-multilib \ 11 | gdb \ 12 | gcc \ 13 | wget \ 14 | curl \ 15 | fish \ 16 | ltrace \ 17 | strace \ 18 | cmake \ 19 | python-capstone \ 20 | socat \ 21 | netcat \ 22 | ruby \ 23 | vim \ 24 | libc6:i386 libncurses5:i386 libstdc++6:i386 \ 25 | lxterminal && \ 26 | apt-get clean 27 | 28 | RUN pip3 install --no-cache-dir pwntools && \ 29 | gem install one_gadget 30 | 31 | RUN cd ~/ && \ 32 | git clone https://github.com/pwndbg/pwndbg.git && \ 33 | cd ~/pwndbg/ && ./setup.sh 34 | 35 | RUN cd ~/ && \ 36 | git clone https://github.com/scwuaptx/Pwngdb.git 37 | 38 | RUN cd ~/ && \ 39 | git clone https://github.com/hkraw/.files.git && \ 40 | cp ~/.files/.vimrc . && cp ~/.files/.gdbinit . 41 | ENV LANG C.UTF-8 42 | 43 | VOLUME ["/host"] 44 | WORKDIR /host 45 | CMD ["/usr/bin/fish"] 46 | -------------------------------------------------------------------------------- /mydockerfiles/glib29/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:19.04 2 | 3 | RUN sed -i -e 's|disco|eoan|g' /etc/apt/sources.list 4 | 5 | RUN dpkg --add-architecture i386 && apt-get update && \ 6 | DEBIAN_FRONTEND=noninteractive apt-get install -qy \ 7 | git nasm python \ 8 | build-essential \ 9 | python-dev python-pip python-setuptools \ 10 | libc6-dbg \ 11 | libc6-dbg:i386 \ 12 | gcc-multilib \ 13 | gdb \ 14 | gcc \ 15 | wget \ 16 | curl \ 17 | fish \ 18 | ltrace \ 19 | strace \ 20 | cmake \ 21 | python-capstone \ 22 | socat \ 23 | netcat \ 24 | ruby \ 25 | vim \ 26 | libc6:i386 libncurses5:i386 libstdc++6:i386 \ 27 | lxterminal && \ 28 | apt-get clean 29 | 30 | RUN pip install --no-cache-dir pwntools && \ 31 | gem install one_gadget 32 | 33 | RUN cd ~/ && \ 34 | git clone https://github.com/pwndbg/pwndbg.git && \ 35 | cd ~/pwndbg/ && ./setup.sh 36 | 37 | RUN cd ~/ && \ 38 | git clone https://github.com/scwuaptx/Pwngdb.git 39 | 40 | RUN cd ~/ && \ 41 | git clone https://github.com/hkraw/.files.git && \ 42 | cp ~/.files/.vimrc . && cp ~/.files/.gdbinit . 43 | ENV LANG C.UTF-8 44 | 45 | VOLUME ["/host"] 46 | WORKDIR /host 47 | CMD ["/usr/bin/fish"] 48 | --------------------------------------------------------------------------------