From 646c1d66522205bb730957e7e95ab790a1fa462b Mon Sep 17 00:00:00 2001 From: letmein Date: Mon, 22 Oct 2018 20:01:18 +0800 Subject: [PATCH] + docker file --- ku-ingin-lompat-sambil-jumping/Dockerfile | 38 ++++++++++++++++++ .../{ => chall}/ingin_melompat2 | Bin 10864 -> 10864 bytes .../ingin_melompat2.c | 4 +- ku-ingin-melompat/Dockerfile | 38 ++++++++++++++++++ ku-ingin-melompat/{ => chall}/ingin_melompat | Bin service-diary/diary32bit/Dockerfile | 38 ++++++++++++++++++ service-diary/{ => diary32bit/chall}/diary32 | Bin service-diary/{ => diary32bit}/diary32.c | 0 service-diary/diary64bit/Dockerfile | 38 ++++++++++++++++++ service-diary/{ => diary64bit/chall}/diary64 | Bin service-diary/{ => diary64bit}/diary64.c | 0 11 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 ku-ingin-lompat-sambil-jumping/Dockerfile rename ku-ingin-lompat-sambil-jumping/{ => chall}/ingin_melompat2 (84%) create mode 100644 ku-ingin-melompat/Dockerfile rename ku-ingin-melompat/{ => chall}/ingin_melompat (100%) create mode 100644 service-diary/diary32bit/Dockerfile rename service-diary/{ => diary32bit/chall}/diary32 (100%) rename service-diary/{ => diary32bit}/diary32.c (100%) create mode 100644 service-diary/diary64bit/Dockerfile rename service-diary/{ => diary64bit/chall}/diary64 (100%) rename service-diary/{ => diary64bit}/diary64.c (100%) diff --git a/ku-ingin-lompat-sambil-jumping/Dockerfile b/ku-ingin-lompat-sambil-jumping/Dockerfile new file mode 100644 index 0000000..8cce19c --- /dev/null +++ b/ku-ingin-lompat-sambil-jumping/Dockerfile @@ -0,0 +1,38 @@ +# Use ubuntu 16.04 +FROM ubuntu:16.04 + +#RUN apt-get update && apt-get -y dist-upgrade --fix-missing --fix-broken +#RUN apt-get update +#RUN apt-get update && apt-get install -y apt-transport-https +#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 +#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 +#RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list + +# install socat editor ssh +#RUN apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y +#RUN apt-get install socat lib32ncurses5 -y +RUN apt-get update && apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y + +RUN adduser --disabled-password --gecos "" ksl +RUN echo "ksl:sebuahrahasiamas" | chpasswd + +ADD chall/. /chall +WORKDIR /chall + +RUN echo 'KSL{Welc0me_t0_PWn_W0rLd!1!}' > /chall/flag.txt # ubah isi flagnya + +# Secure ENV + +RUN echo 'alias kill="echo no kill please!"' >> ~/.bashrc +RUN chmod 700 /tmp /var/tmp /usr/bin/* /bin/* /dev/shm +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 + + +RUN chown root:ksl /chall/ingin_melompat2 # ubah nama file +RUN chmod 775 /chall/ingin_melompat2 # ubah nama file + +# Run Service + +RUN echo '#!/bin/bash'"\n(socat TCP-LISTEN:7000,reuseaddr,fork EXEC:"/chall/ingin_melompat2,su=nobody")" > /var/tmp/.start.sh && chmod +x /var/tmp/.start.sh + +CMD ["/var/tmp/.start.sh"] diff --git a/ku-ingin-lompat-sambil-jumping/ingin_melompat2 b/ku-ingin-lompat-sambil-jumping/chall/ingin_melompat2 similarity index 84% rename from ku-ingin-lompat-sambil-jumping/ingin_melompat2 rename to ku-ingin-lompat-sambil-jumping/chall/ingin_melompat2 index 6124634f6e0c1fe6e7ba54fc77c1146481dcb333..790665cf30f2d1f6f744311cb92b94d1841a2237 100755 GIT binary patch delta 509 zcmewm@*!kG3u_M_14GZm&V0@#JPZs=dRRD?OlD-9E@BoCb*0iUai8H?ugpWgDxd9P zk6ONY4dWX&)9P*(ju-uZ{{L@2!jdrq#A$+Zc7r&jP|j%(Cj-j4Gx;osJmb^JZ#m=` zUrgrVRAlU#tj8(E_km1_p+lpa1`F0n&SbbPbT6^y~ls6F_0t!HE z0K``&TkD*C%fTlBXtL1d=(EKLW|)lLh&t z86Qm6<@09!0<@KBb0c3cuOKL@K!z|g2!bdEj?GV{>lqn4Ca22!GcMV@RrWe3qs-)9 Yb$M1uq;6DKX65K*;o#VOQ++xU03i^`J^%m! delta 518 zcmewm@*!kG3u^}-14GBe&V0@VJPZsAdRRCXOlD-9F7ny`ueryWl@&@&^Tk%aTj0FI zeQW*ZHH>fAOe?xsI9~Ms`TxK92usEk5T^;s*$(2ALOI7loD3-E#^kdc@{A8BzvYl) zd@`AbQ<1S_vL2@to}z~JwP&X zU>T0rdKqybu0KR!7Q>6JK-R(pkm{<bteaMOLAL+ zfkIJfQsv|dZu!kKxFr|^3x53nKY@XPq2TBL|673c0U%uiq^JG*|NjJ#UJ0aM0O{92 znuC#n;UAFJ0MZA5R(b$wYoPZsfONs%|NmQn^o7Zcyy~JhKvS52xJc`A^+J$WmTJU96&kSv(|l~-Q&G|&!xpjix#d>pMzPQ0u@ zrUwwK0L7k6HsteW{4u$fuYd9cK9L2(9@XJBR!1W^nuo1aS8GcvYJPL=g% jT(Eho>~&5?iOId{@~n{9-Keh2%F@fi!Ls?L`gA4$dcDYp diff --git a/ku-ingin-lompat-sambil-jumping/ingin_melompat2.c b/ku-ingin-lompat-sambil-jumping/ingin_melompat2.c index 9a8df08..18ef5f8 100644 --- a/ku-ingin-lompat-sambil-jumping/ingin_melompat2.c +++ b/ku-ingin-lompat-sambil-jumping/ingin_melompat2.c @@ -38,9 +38,9 @@ void jual_burung(){ } void menu(){ printf("+--------------------------------+\n"); - printf("------------PASAR BURUNG----------\n"); + printf("---------PASAR BURUNG 2.0---------\n"); printf("+--------------------------------+\n"); - printf("1. beli flag (999999 ruby)\n"); + printf("1. beli flag (sawit 1 hektar)\n"); printf("2. beli garuda (10 ruby)\n"); printf("3. lihat burung yang udah di beli\n"); printf("4. jual burung\n"); diff --git a/ku-ingin-melompat/Dockerfile b/ku-ingin-melompat/Dockerfile new file mode 100644 index 0000000..fcad5f4 --- /dev/null +++ b/ku-ingin-melompat/Dockerfile @@ -0,0 +1,38 @@ +# Use ubuntu 16.04 +FROM ubuntu:16.04 + +#RUN apt-get update && apt-get -y dist-upgrade --fix-missing --fix-broken +#RUN apt-get update +#RUN apt-get update && apt-get install -y apt-transport-https +#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 +#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 +#RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list + +# install socat editor ssh +#RUN apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y +#RUN apt-get install socat lib32ncurses5 -y +RUN apt-get update && apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y + +RUN adduser --disabled-password --gecos "" ksl +RUN echo "ksl:sebuahrahasiamas" | chpasswd + +ADD chall/. /chall +WORKDIR /chall + +RUN echo 'KSL{W1th_R3turn_Y0U_C4n_Ch4nges_w0RlD}' > /chall/flag.txt # ubah isi flagnya + +# Secure ENV + +RUN echo 'alias kill="echo no kill please!"' >> ~/.bashrc +RUN chmod 700 /tmp /var/tmp /usr/bin/* /bin/* /dev/shm +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 + + +RUN chown root:ksl /chall/ingin_melompat # ubah nama file +RUN chmod 775 /chall/ingin_melompat # ubah nama file + +# Run Service + +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 + +CMD ["/var/tmp/.start.sh"] diff --git a/ku-ingin-melompat/ingin_melompat b/ku-ingin-melompat/chall/ingin_melompat similarity index 100% rename from ku-ingin-melompat/ingin_melompat rename to ku-ingin-melompat/chall/ingin_melompat diff --git a/service-diary/diary32bit/Dockerfile b/service-diary/diary32bit/Dockerfile new file mode 100644 index 0000000..20a157e --- /dev/null +++ b/service-diary/diary32bit/Dockerfile @@ -0,0 +1,38 @@ +# Use ubuntu 16.04 +FROM ubuntu:16.04 + +#RUN apt-get update && apt-get -y dist-upgrade --fix-missing --fix-broken +#RUN apt-get update +#RUN apt-get update && apt-get install -y apt-transport-https +#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 +#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 +#RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list + +# install socat editor ssh +#RUN apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y +#RUN apt-get install socat lib32ncurses5 -y +RUN apt-get update && apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y + +RUN adduser --disabled-password --gecos "" ksl +RUN echo "ksl:sebuahrahasiamas" | chpasswd + +ADD chall/. /chall +WORKDIR /chall + +RUN echo 'KSL{Y0u_N0w_H0w_contr0l_St4cK!1!1}' > /chall/flag.txt # ubah isi flagnya + +# Secure ENV + +RUN echo 'alias kill="echo no kill please!"' >> ~/.bashrc +RUN chmod 700 /tmp /var/tmp /usr/bin/* /bin/* /dev/shm +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 + + +RUN chown root:ksl /chall/diary32 # ubah nama file +RUN chmod 775 /chall/diary32 # ubah nama file + +# Run Service + +RUN echo '#!/bin/bash'"\n(socat TCP-LISTEN:7000,reuseaddr,fork EXEC:"/chall/diary32,su=nobody")" > /var/tmp/.start.sh && chmod +x /var/tmp/.start.sh + +CMD ["/var/tmp/.start.sh"] diff --git a/service-diary/diary32 b/service-diary/diary32bit/chall/diary32 similarity index 100% rename from service-diary/diary32 rename to service-diary/diary32bit/chall/diary32 diff --git a/service-diary/diary32.c b/service-diary/diary32bit/diary32.c similarity index 100% rename from service-diary/diary32.c rename to service-diary/diary32bit/diary32.c diff --git a/service-diary/diary64bit/Dockerfile b/service-diary/diary64bit/Dockerfile new file mode 100644 index 0000000..1d4df85 --- /dev/null +++ b/service-diary/diary64bit/Dockerfile @@ -0,0 +1,38 @@ +# Use ubuntu 16.04 +FROM ubuntu:16.04 + +#RUN apt-get update && apt-get -y dist-upgrade --fix-missing --fix-broken +#RUN apt-get update +#RUN apt-get update && apt-get install -y apt-transport-https +#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 +#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 +#RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list + +# install socat editor ssh +#RUN apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y +#RUN apt-get install socat lib32ncurses5 -y +RUN apt-get update && apt-get install curl netcat-openbsd vim nano openssh-server socat lib32ncurses5 python python-pip python-dev -y + +RUN adduser --disabled-password --gecos "" ksl +RUN echo "ksl:sebuahrahasiamas" | chpasswd + +ADD chall/. /chall +WORKDIR /chall + +RUN echo 'KSL{Y0u_N0w_H0w_contr0l_St4cK!1!1}' > /chall/flag.txt # ubah isi flagnya + +# Secure ENV + +RUN echo 'alias kill="echo no kill please!"' >> ~/.bashrc +RUN chmod 700 /tmp /var/tmp /usr/bin/* /bin/* /dev/shm +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 + + +RUN chown root:ksl /chall/diary64 # ubah nama file +RUN chmod 775 /chall/diary64 # ubah nama file + +# Run Service + +RUN echo '#!/bin/bash'"\n(socat TCP-LISTEN:7000,reuseaddr,fork EXEC:"/chall/diary64,su=nobody")" > /var/tmp/.start.sh && chmod +x /var/tmp/.start.sh + +CMD ["/var/tmp/.start.sh"] diff --git a/service-diary/diary64 b/service-diary/diary64bit/chall/diary64 similarity index 100% rename from service-diary/diary64 rename to service-diary/diary64bit/chall/diary64 diff --git a/service-diary/diary64.c b/service-diary/diary64bit/diary64.c similarity index 100% rename from service-diary/diary64.c rename to service-diary/diary64bit/diary64.c