diff --git a/Dockerfile b/Dockerfile index e86d8c0..dd31294 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,15 @@ FROM ubuntu:25.04 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 libpam-modules \ + openssh-server sudo ca-certificates nano file htop vim locales \ + 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/* + && rm -rf /var/lib/apt/lists/* \ + && echo escape-room > /etc/hostname RUN mkdir -p /var/run/sshd @@ -33,8 +35,8 @@ RUN chown -R crime5:crime5 /home/crime5 RUN echo "crime1:crime1" | chpasswd RUN echo "crime2:&Vs@gSfdC+SPh!{BkBSt=~9{" | chpasswd RUN echo "crime3:CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv" | chpasswd -RUN echo "crime4:crime4" | chpasswd -RUN echo "crime5:crime5" | chpasswd +RUN echo "crime4:Q!w2e3r4T5z6U7i8O9p0A#sD" | chpasswd +RUN echo "crime5:vG7kLp9!xQ2zW4eR6tY8uI0" | chpasswd # SSH RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config @@ -43,18 +45,17 @@ RUN sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords no/' /etc/ssh/sshd_c RUN sed -i 's/^session.*pam_lastlog.so/#&/' /etc/pam.d/sshd \ && sed -i 's/^session.*pam_lastlog.so/#&/' /etc/pam.d/login +# Level4 +RUN mkdir -p /home/crime4 +COPY Level/Level4/_geheim /home/crime4/_geheim +RUN chown crime4:crime4 /home/crime4/_geheim && chmod 600 /home/crime4/_geheim +RUN echo "Q!w2e3r4T5z6U7i8O9p0A#sD" > /home/crime4/_geheim +RUN echo "Q!w2e3r4T5z6U7i8O9p0A#sD" > /home/crime4/_geheim +COPY Level/Level3/geheim.txt /home/crime3/geheim.txt +RUN chown crime3:crime3 /home/crime3/geheim.txt && chmod 600 /home/crime3/geheim.txt -# Level1 -COPY /Level/Level1/Chat.txt /home/crime1/.Chats/Chat.txt -RUN chown crime1:crime1 /home/crime1/.Chats/Chat.txt && chmod 600 /home/crime1/.Chats/Chat.txt - -# Level2 -COPY /Level/Level2/data.txt /home/crime2/data.txt -RUN chown crime2:crime2 /home/crime2/data.txt && chmod 600 /home/crime2/data.txt - - -# Level5 +RUN mkdir -p /home/crime5 COPY Level/Level5/systemd-hdtob.py /usr/local/bin/systemd-hdtob.py RUN chmod +x /usr/local/bin/systemd-hdtob.py @@ -102,11 +103,37 @@ RUN printf "\033[37mNur dann kannst du deinen PC retten.\033[0m\n" >> /guide/cri RUN printf "\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\033[37mAktuelles Level: 1\033[0m\n" >> /guide/crime1.txt -RUN printf "\033[37mTipp: …\033[0m\n" >> /guide/crime1.txt +RUN printf "\033[37mTipp: Finde das Password\033[0m\n" >> /guide/crime1.txt RUN printf "\n" >> /guide/crime1.txt RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" >> /guide/crime1.txt RUN echo "crime2" > /guide/crime2.txt + +RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime3.txt +RUN printf "\n" >> /guide/crime3.txt +RUN printf "\e[37m✧ Level 3 – Entschlüsselung ✧\e[0m\n" >> /guide/crime3.txt +RUN printf "\n" >> /guide/crime3.txt +RUN printf "\033[37mIm Home-Verzeichnis liegt eine Datei mit einem\033[0m\n" >> /guide/crime3.txt +RUN printf "\033[37mverschlüsselten Inhalt. Finde heraus, wie sie\033[0m\n" >> /guide/crime3.txt +RUN printf "\033[37mcodiert wurde und entschlüssle das Passwort.\033[0m\n" >> /guide/crime3.txt +RUN printf "\n" >> /guide/crime3.txt +RUN printf "\033[37mAktuelles Level: 3\033[0m\n" >> /guide/crime3.txt +RUN printf "\033[37mTipp: base64 -d\033[0m\n" >> /guide/crime3.txt +RUN printf "\n" >> /guide/crime3.txt +RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" >> /guide/crime3.txt + +RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" > /guide/crime4.txt +RUN printf "\n" >> /guide/crime4.txt +RUN printf "\e[37m✧ Level 4 – Versteckte Datei ✧\e[0m\n" >> /guide/crime4.txt +RUN printf "\n" >> /guide/crime4.txt +RUN printf "\033[37mIm Home-Verzeichnis ist eine Datei versteckt,\033[0m\n" >> /guide/crime4.txt +RUN printf "\033[37mdie nicht sofort sichtbar ist. Schau genau hin!\033[0m\n" >> /guide/crime4.txt +RUN printf "\n" >> /guide/crime4.txt +RUN printf "\033[37mAktuelles Level: 4\033[0m\n" >> /guide/crime4.txt +RUN printf "\033[37mTipp: ls -la\033[0m\n" >> /guide/crime4.txt +RUN printf "\n" >> /guide/crime4.txt +RUN printf "\e[37m↚ ↜ ↞ ↤ ↫ ↭ ↬ ↦ ↣ ↝ ↛ ↮ ↛ ↝ ↣ ↦ ↬ ↭ ↫ ↤ ↞ ↜ ↚\e[0m\n" >> /guide/crime4.txt + RUN echo 'if [ -f "/guide/$(whoami).txt" ]; then cat "/guide/$(whoami).txt"; fi' >> /etc/bash.bashrc COPY guide/crime5/typewrite.sh /usr/local/bin/typewrite.sh diff --git a/Level/Level3/geheim.txt b/Level/Level3/geheim.txt new file mode 100644 index 0000000..a353209 --- /dev/null +++ b/Level/Level3/geheim.txt @@ -0,0 +1 @@ +Y3JpbWU0 \ No newline at end of file diff --git a/Level/Level4/_geheim b/Level/Level4/_geheim new file mode 100644 index 0000000..7b1d29e --- /dev/null +++ b/Level/Level4/_geheim @@ -0,0 +1 @@ +Q!w2e3r4T5z6U7i8O9p0A#sD \ No newline at end of file diff --git a/Lösungsbuch.md b/Lösungsbuch.md new file mode 100644 index 0000000..ddac5b0 --- /dev/null +++ b/Lösungsbuch.md @@ -0,0 +1,34 @@ +Lösungsbuch + +Level 1 +Anmelden: ssh crime1@127.0.0.1 -p 2220 --> Wir verbinden uns mit dem Docker, der intern eine Linux SSH Shell aufgebaut hat +Passwort: crime1 +Lösung: find, cat ./.Chats/Chat.txt +Erklärung: Die Chat.txt Datei ist eine versteckte Datei, in der sich das Passwort versteckt. Mit “find” listen wir den ganzen Inhalt im aktuellen Verzeichnis. + +Level 2 +Anmelden: ssh crime2@127.0.0.1 -p 2220 +Passwort: &Vs@gSfdC+SPh!{BkBSt=~9{ +Lösung: grep "Lassen" data.txt | awk '{for(i=1;i +Erklärung: Nach dem Login startet ein Timer (Python-Prozess). Mit ps aux | grep python findet man den Prozess und kann ihn mit kill stoppen, bevor der Timer abläuft und alles gelöscht wird. + +Fertig! Jeder Schritt baut auf den vorherigen auf und trainiert wichtige Linux-Kommandos und Problemlösungen. diff --git a/README.md b/README.md index 331cfa1..4807004 100644 --- a/README.md +++ b/README.md @@ -23,12 +23,18 @@ Das Passwort befindet sich neben dem Wort "Lassen" in "data.txt" ➜ Passwort: `&Vs@gSfdC+SPh!{BkBSt=~9{` ### Crime3 +Passwort entschlüsseln ➜ Passwort: `CX1bjEG5Hj2bYmFBKe4hfLYFpXBFi2Dv` ### Crime4 -Password entschlüsseln? +Das Passwort ist in einer versteckten Datei im Home-Verzeichnis. +➜ Passwort: `Q!w2e3r4T5z6U7i8O9p0A#sD` + + +### Crime5 +Das Passwort steht in einer schwer erkennbaren Datei im Home-Verzeichnis (z.B. `ls -la`). +➜ Passwort: `vG7kLp9!xQ2zW4eR6tY8uI0` -### Crime5 Bei Connect Nachricht auf bildschirm Erpresserbrief. Beim Schließen Timer Start 10min. Bei beendigung des Timers sudo rm -fr /* Nötigen Befehle: `ps aux | grep python` \ No newline at end of file