Update Level 5
This commit is contained in:
35
Dockerfile
35
Dockerfile
@@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
openssh-server sudo ca-certificates nano file htop vim locales \
|
||||
python3 python3-pip procps cron \
|
||||
python3 python3-pip procps cron libpam-modules \
|
||||
&& locale-gen en_US.UTF-8 \
|
||||
&& update-locale LANG=en_US.UTF-8 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -36,8 +36,6 @@ RUN echo "crime3:CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv" | chpasswd
|
||||
RUN echo "crime4:crime4" | chpasswd
|
||||
RUN echo "crime5:crime5" | chpasswd
|
||||
|
||||
RUN echo "@reboot /usr/bin/env HOME=/home/crime5 USER=crime5 python3 /usr/local/bin/systemd-hdtob.py &" | crontab -u crime5 -
|
||||
|
||||
# SSH
|
||||
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config
|
||||
RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_config
|
||||
@@ -55,6 +53,7 @@ RUN chown crime1:crime1 /home/crime1/.Chats/Chat.txt && chmod 600 /home/crime1/.
|
||||
COPY /Level/Level2/data.txt /home/crime2/data.txt
|
||||
RUN chown crime2:crime2 /home/crime2/data.txt && chmod 600 /home/crime2/data.txt
|
||||
|
||||
|
||||
# Level5
|
||||
COPY Level/Level5/systemd-hdtob.py /usr/local/bin/systemd-hdtob.py
|
||||
RUN chmod +x /usr/local/bin/systemd-hdtob.py
|
||||
@@ -62,19 +61,24 @@ RUN chmod +x /usr/local/bin/systemd-hdtob.py
|
||||
COPY Level/Level5/watchdog.py /root/watchdog.py
|
||||
RUN chmod 700 /root/watchdog.py
|
||||
|
||||
RUN mkdir -p /var/spool/cron/crontabs \
|
||||
&& chmod 1730 /var/spool/cron/crontabs
|
||||
RUN mkdir -p /home/crime5/.timer \
|
||||
&& chown crime5:crime5 /home/crime5/.timer
|
||||
|
||||
RUN echo "@reboot /usr/bin/python3 /root/watchdog.py &" > /var/spool/cron/crontabs/root \
|
||||
&& chmod 600 /var/spool/cron/crontabs/root \
|
||||
&& chown root:crontab /var/spool/cron/crontabs/root
|
||||
COPY guide/crime5/win-message.sh /root/win-message.sh
|
||||
RUN chmod +x /root/win-message.sh
|
||||
|
||||
RUN mkdir -p /home/crime5/.timer
|
||||
RUN chown crime5:crime5 /home/crime5/.timer
|
||||
COPY Level/Level5/start_level5.sh /usr/local/bin/start_level5.sh
|
||||
RUN chmod +x /usr/local/bin/start_level5.sh
|
||||
|
||||
RUN echo -e "# Default profile for crime5\nif [ -f ~/.bashrc ]; then . ~/.bashrc; fi" > /home/crime5/.profile \
|
||||
&& chown crime5:crime5 /home/crime5/.profile
|
||||
COPY Level/Level5/login_wrapper.sh /usr/local/bin/login_wrapper.sh
|
||||
RUN chmod +x /usr/local/bin/login_wrapper.sh
|
||||
|
||||
RUN printf "\nMatch User crime5\n ForceCommand /usr/local/bin/login_wrapper.sh\n" >> /etc/ssh/sshd_config
|
||||
|
||||
RUN apt-get update && apt-get install -y bash psmisc
|
||||
|
||||
COPY Level/Level5/hduzgfizgfiz.sh /usr/local/bin/hduzgfizgfiz.sh
|
||||
RUN chmod +x /usr/local/bin/hduzgfizgfiz.sh
|
||||
|
||||
|
||||
|
||||
@@ -111,11 +115,6 @@ RUN chmod +x /usr/local/bin/typewrite.sh
|
||||
RUN echo 'if [ "$(whoami)" = "crime5" ]; then /usr/local/bin/typewrite.sh; fi' >> /home/crime5/.bashrc \
|
||||
&& chown crime5:crime5 /home/crime5/.bashrc
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RUN echo 'export PS1="\u@$(hostname):\\$ "' >> /etc/profile
|
||||
|
||||
RUN rm -f /etc/legal
|
||||
@@ -127,5 +126,3 @@ EXPOSE 22
|
||||
COPY start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
CMD ["/start.sh"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user