From ccd0868efacb63600d1468c9ed8b85b57fc9e4e1 Mon Sep 17 00:00:00 2001 From: quasar098 <70716985+quasar098@users.noreply.github.com> Date: Sun, 29 Oct 2023 20:55:21 -0400 Subject: [PATCH] Add files via upload --- udctf-2023/python-jail-harder/Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 udctf-2023/python-jail-harder/Dockerfile diff --git a/udctf-2023/python-jail-harder/Dockerfile b/udctf-2023/python-jail-harder/Dockerfile new file mode 100644 index 0000000..bd82722 --- /dev/null +++ b/udctf-2023/python-jail-harder/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu@sha256:c9cf959fd83770dfdefd8fb42cfef0761432af36a764c077aed54bbc5bb25368 +# RUN /usr/sbin/useradd --no-create-home -u 1000 user + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get -y update && \ + apt-get -y install socat libgcc-12-dev python3 --fix-missing && \ + rm -rf /var/lib/apt/lists/* + +RUN mkdir /home/ctf +RUN groupadd ctf && useradd -d /home/ctf -g ctf ctf + +COPY chall.py /home/ctf/chall.py +COPY flag.txt /home/ctf/flag.txt +RUN chmod 444 /home/ctf/flag.txt + + +EXPOSE 1337/tcp + +WORKDIR /home/ctf + +ENTRYPOINT socat -dd -T180 TCP4-LISTEN:1337,fork,reuseaddr EXEC:"timeout -k 5 180 /bin/python3 ./chall.py",su=ctf,pty,stderr,setsid,sigint,sane,rawer,iexten=0