20 lines
445 B
Docker
20 lines
445 B
Docker
FROM ubuntu:20.04
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
neofetch \
|
|
sudo \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN useradd -m -s /bin/bash student
|
|
RUN echo "student:password123" | chpasswd
|
|
|
|
RUN echo "EPITHACK{sudo_misconfiguration_pwned!}" > /home/student/flag.txt
|
|
RUN chmod 600 /home/student/flag.txt
|
|
|
|
RUN echo "student ALL=(root) NOPASSWD: /usr/bin/neofetch" >> /etc/sudoers
|
|
|
|
USER student
|
|
WORKDIR /home/student
|
|
|
|
CMD ["/bin/bash"]
|