github twitter facebook email
Pwn Docker
Sep 25, 2019
One minute read
FROM ubuntu:19.04
MAINTAINER c2w2m2 <juchang0308@gmail.com>

ENV LC_CTYPE C.UTF-8
RUN dpkg --add-architecture i386

RUN apt update -y -qq
RUN apt install python python-dev python-pip python-setuptools python-capstone libssl-dev libffi-dev build-essential git curl gdb libc6:i386 libc6-dbg vim zsh -y -qq

RUN python -m pip install pwntools

RUN useradd -ms /bin/zsh ctf

WORKDIR /home/ctf

RUN git clone --recursive https://github.com/changs/slimzsh.git
RUN git clone https://github.com/hugsy/gef.git
RUN git clone https://github.com/scwuaptx/Pwngdb.git

RUN echo "source /home/ctf/gef/gef.py\nsource /home/ctf/Pwngdb/pwngdb.py\nsource /home/ctf/Pwngdb/angelheap/gdbinit.py\n\ndefine hook-run\npython\nimport angelheap\nangelheap.init_angelheap()\nend\nend" > /root/.gdbinit
RUN echo "source /home/ctf/slimzsh/slim.zsh" >> ./.zshrc

CTF문제 풀때 vm 키는거보다 Docker가 성능상이나 속도상 이득을 볼거 같아서, 다음같은 Dockerfile를 구성해서 image를 만들어놨다.

FROM c2w2m2/pwn:16.04
MAINTAINER c2w2m2 <juchang0308@gmail.com>
COPY . /home/ctf

이런식으로 끌어다가 쓰면 된다. 적당히 커스텀마이징도 문제따라 하면 될거고 맘에 든다.


Back to posts


comments powered by Disqus