Dockerfile (980B)
1# docker build -t gearboy . && docker run --rm -it -p1024:1024 gearboy 2FROM ubuntu:20.04 3 4ENV DEBIAN_FRONTEND=noninteractive 5 6RUN apt-get update && \ 7 apt-get install --no-install-recommends -y xinetd libncurses5-dev libncurses5 python3 python3-pip gdbserver build-essential git libsdl2-dev libglew-dev && \ 8 apt-get clean 9 10RUN pip3 install --no-cache-dir cryptography==3.3 pwntools 11 12RUN useradd -d /home/ctf/ -m -p ctf -s /bin/bash ctf && echo "ctf:ctf" | chpasswd 13 14WORKDIR /home/ctf 15 16RUN git clone https://github.com/drhelius/Gearboy.git gearboy && cd gearboy && git checkout 2cb66cdcb05f77147b9a5941e8ab92bceea828ae 17 18WORKDIR /home/ctf/gearboy/ 19COPY headless.patch /home/ctf/gearboy/ 20 21RUN git apply --ignore-space-change --ignore-whitespace headless.patch 22 23WORKDIR /home/ctf/gearboy/platforms/linux 24RUN make 25 26COPY flag / 27COPY wrapper.py /home/ctf/wrapper.py 28 29COPY python_svc /etc/xinetd.d/ 30 31env TERM=linux TERMINFO=/etc/terminfo 32 33EXPOSE 1024 34 35CMD ["xinetd", "-dontfork"]