cscg24-haunted

CSCG 2024 Challenge 'Haunted'
git clone https://git.sinitax.com/sinitax/cscg24-haunted
Log | Files | Refs | sfeed.txt

Dockerfile (1095B)


      1# docker build -t haunted . && docker run -p 1024:1024 --rm -it haunted
      2FROM ubuntu@sha256:f9d633ff6640178c2d0525017174a688e2c1aef28f0a0130b26bd5554491f0da
      3
      4ADD --chmod=0755 --checksum=sha256:4e7e6536b206488b2414d1fa2272e8bbf17fbe7d11e5648eb51284c8fa96b0a9 \
      5    https://raw.githubusercontent.com/reproducible-containers/repro-sources-list.sh/v0.1.1/repro-sources-list.sh \
      6    /usr/local/bin/repro-sources-list.sh
      7
      8RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
      9    --mount=type=cache,target=/var/lib/apt,sharing=locked \
     10    /usr/local/bin/repro-sources-list.sh && \
     11    apt-get update && \
     12    DOCKER_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
     13        python3 qemu-system-x86 gdb
     14
     15RUN useradd --create-home --shell /bin/bash ctf
     16
     17COPY server.py OVMF_CODE.fd OVMF_VARS.fd /home/ctf/
     18
     19RUN chown -R root:ctf /home/ctf && \
     20    chmod -R 0000 /home/ctf/* && \
     21    chmod 770 /home/ctf && \
     22    chmod 040 /home/ctf/OVMF_CODE.fd /home/ctf/OVMF_VARS.fd /home/ctf/server.py
     23
     24WORKDIR /home/ctf/
     25USER ctf
     26EXPOSE 1024
     27ENTRYPOINT ["python3", "/home/ctf/server.py"]