forked from wedaa/LongTail-Telnet-honeypot-v2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
57 lines (42 loc) · 1.25 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
FROM ubuntu:18.04
MAINTAINER Daniel Nicolas Gisolfi
ENV DEBIAN_FRONTEND=noninteractive
ENV VERSION=02
ENV HOST_IP=0.0.0.0
RUN apt-get update -y \
&& apt-get install -y \
build-essential \
python3-pip \
tzdata \
cron \
wget \
gcc \
&& pip3 install --upgrade pip
EXPOSE 23
# Set the TimeZone
RUN cp /usr/share/zoneinfo/America/New_York /etc/localtime \
&& dpkg-reconfigure tzdata
WORKDIR /usr/local/source/ptelnetd
RUN wget https://github.com/wedaa/LongTail-Telnet-honeypot-v2/raw/master/paranoid-telnetd-0.4.tgz \
&& tar -xf paranoid-telnetd-0.4.tgz
WORKDIR /usr/local/source/ptelnetd/paranoid-telnetd-0.4
COPY ./src/main.c main.c
COPY ./src/client.c client.c
COPY ./src/ptelnetd-initd ptelnetd-initd
COPY ./src/ptelnetd-cron /etc/cron.d/ptelnetd-cron
RUN cp ptelnetd-initd /etc/init.d \
&& chmod a+rx /etc/init.d/ptelnetd-initd
RUN chmod a+x /etc/cron.d/ptelnetd-cron \
&& crontab /etc/cron.d/ptelnetd-cron \
&& touch /var/log/cron.log
RUN ./configure \
&& make \
&& cp ptelnetd /usr/sbin \
&& chmod a+rwx /usr/sbin/ptelnetd
# Setup TCP Server
WORKDIR /TcpServer
COPY ./TcpServer .
RUN pip install -r requirements.txt \
&& chmod +x init.sh
ENTRYPOINT [ "/bin/bash" ]
CMD [ "./init.sh" ]