Hackvent_2023/Day 22/Dockerfile

14 lines
305 B
Docker
Raw Normal View History

2023-12-22 12:39:49 +01:00
FROM ubuntu:22.04
2023-12-22 15:16:07 +01:00
RUN apt-get update -y && apt-get install -y socat
2023-12-22 12:39:49 +01:00
RUN useradd -d /home/santa/ -m -p santa -s /bin/bash santa
RUN echo "santa:santa" | chpasswd
WORKDIR /home/santa
COPY ./pwn .
COPY ./secret.txt .
USER santa
CMD socat TCP-LISTEN:1337,fork,reuseaddr EXEC:'./pwn',raw,pty,echo=0,stderr