List soal PWN untuk KSL Seleksi
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

38 lignes
1.7 KiB

il y a 6 ans
  1. # Use ubuntu 16.04
  2. FROM ubuntu:16.04
  3. #RUN apt-get update && apt-get -y dist-upgrade --fix-missing --fix-broken
  4. #RUN apt-get update
  5. #RUN apt-get update && apt-get install -y apt-transport-https
  6. #RUN echo 'deb http://private-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.4.2.0 HDP main' >> /etc/apt/sources.list.d/HDP.list
  7. #RUN echo 'deb http://private-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu14 HDP-UTILS main' >> /etc/apt/sources.list.d/HDP.list
  8. #RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list
  9. # install socat editor ssh
  10. #RUN apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y
  11. #RUN apt-get install socat lib32ncurses5 -y
  12. RUN apt-get update && apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y
  13. RUN adduser --disabled-password --gecos "" ksl
  14. RUN echo "ksl:sebuahrahasiamas" | chpasswd
  15. ADD chall/. /chall
  16. WORKDIR /chall
  17. RUN echo 'KSL{W1th_R3turn_Y0U_C4n_Ch4nges_w0RlD}' > /chall/flag.txt # ubah isi flagnya
  18. # Secure ENV
  19. RUN echo 'alias kill="echo no kill please!"' >> ~/.bashrc
  20. RUN chmod 700 /tmp /var/tmp /usr/bin/* /bin/* /dev/shm
  21. RUN chmod 755 /usr/bin/env /bin/dash /bin/bash /bin/sh /bin/nc /bin/cat /usr/bin/curl /usr/bin/groups /usr/bin/id /bin/ls /usr/bin/python
  22. RUN chown root:ksl /chall/ingin_melompat # ubah nama file
  23. RUN chmod 775 /chall/ingin_melompat # ubah nama file
  24. # Run Service
  25. RUN echo '#!/bin/bash'"\n(socat TCP-LISTEN:7000,reuseaddr,fork EXEC:"/chall/ingin_melompat,su=nobody")" > /var/tmp/.start.sh && chmod +x /var/tmp/.start.sh
  26. CMD ["/var/tmp/.start.sh"]