Profile

머리정리하는곳

c2w2m2

docker 설정

docker build -t 이름/태그? .

docker run -d -p 외부포트:내부포트 이름/태그 

-------------------------------------------------pwnable 바이너리-------------------------------------------------------------


FROM ubuntu:16.04

MAINTAINER c2w2m2 <juchang0308@gmail.com>


RUN apt-get update

RUN apt-get install -y xinetd 

ENV TERM=linux


RUN useradd attack

RUN mkdir /home/attack

WORKDIR /home/attack


ADD main /home/attack

ADD flag /home/attack

ADD flag /

ADD exp.py /home/attack

ADD attack /etc/xinetd.d


RUN chmod 460 /home/attack/*


RUN chown attack:root /home/attack/*

RUN chmod +x /home/attack/main


RUN echo "attack 2222/tcp" >> /etc/services


EXPOSE 2222


CMD ["/usr/sbin/xinetd","-dontfork"]


-------------------------------------------------------

attack


service attack

{

        disable         = no

        flags           = REUSE

        socket_type     = stream

        protocol        = tcp

        user            = attack

        wait            = no

        server          = /home/attack/main

}


-------------------------------------------------python 바이너리-------------------------------------------------------------

FROM ubuntu:16.04

MAINTAINER c2w2m2 <juchang0308@gmail.com>

RUN apt-get update
RUN apt-get install -y xinetd 
RUN apt-get install -y python2.7

ENV TERM=linux

RUN useradd attack
RUN mkdir /home/attack
WORKDIR /home/attack

ADD main /home/attack
ADD flag /home/attack
ADD flag /

ADD attack /etc/xinetd.d

RUN chmod 460 /home/attack/*
RUN chown attack:root /home/attack/*
RUN chmod +x /home/attack/main
RUN echo "attack 2222/tcp" >> /etc/services

EXPOSE 2222

CMD ["/usr/sbin/xinetd","-dontfork"]

-------------------------------------------------------

attack


service attack

{

        disable         = no

        flags           = REUSE

        socket_type     = stream

        protocol        = tcp

        user            = attack

        wait            = no

        server          = /home/attack/main

}



-------------------------------------------------python flask-------------------------------------------------------------

FROM ubuntu:16.04


MAINTAINER c2w2m2 <juchang0308@gmail.com>


RUN apt-get clean

RUN apt-get update

RUN apt-get install -y python2.7 

RUN apt-get install -y curl

RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7

RUN pip install flask


ENV TERM=linux


RUN useradd attack

RUN mkdir /home/attack

WORKDIR /home/attack


ADD main /home/attack

RUN chmod 460 /home/attack/*

RUN chown attack:root /home/attack/*

RUN chmod +x /home/attack/main


EXPOSE 2222


CMD ["/home/attack/main"]



-------------------------------------------------php & curl-------------------------------------------------------------



'Today' 카테고리의 다른 글

ㅁㄴㅇㄹ  (0) 2018.05.15
Defcon2018  (1) 2018.05.14
OOB  (0) 2018.05.07
Breakout 진행정도  (0) 2018.04.27
Kidding 후기  (1) 2018.04.19