From a1d903db016f57719e5b117d5ce8efa9614e1b12 Mon Sep 17 00:00:00 2001 From: t3chn0m4g3 Date: Fri, 27 Dec 2019 16:21:12 +0000 Subject: [PATCH] bump conpot to latest master --- docker/conpot/Dockerfile | 21 +++++++++++---------- docker/conpot/dist/conpot.cfg | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/conpot/Dockerfile b/docker/conpot/Dockerfile index 1d03245f..e91d038f 100644 --- a/docker/conpot/Dockerfile +++ b/docker/conpot/Dockerfile @@ -1,10 +1,11 @@ FROM alpine - +# # Include dist ADD dist/ /root/dist/ - +# # Setup apt -RUN apk -U add \ +RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \ + apk -U add \ build-base \ file \ git \ @@ -21,7 +22,7 @@ RUN apk -U add \ py-cryptography \ tcpdump \ wget && \ - +# # Setup ConPot git clone --depth=1 https://github.com/mushorg/conpot /opt/conpot && \ cd /opt/conpot/ && \ @@ -37,20 +38,20 @@ RUN apk -U add \ sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \ sed -i 's/port="16100"/port="161"/' /opt/conpot/conpot/templates/IEC104/snmp/snmp.xml && \ sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \ - pip3 install --no-cache-dir -U pip setuptools && \ + pip3 install --no-cache-dir -U setuptools && \ pip3 install --no-cache-dir . && \ cd / && \ rm -rf /opt/conpot /tmp/* /var/tmp/* && \ - setcap cap_net_bind_service=+ep /usr/bin/python3.6 && \ - + setcap cap_net_bind_service=+ep /usr/bin/python3.7 && \ +# # Get wireshark manuf db for scapy, setup configs, user, groups mkdir -p /etc/conpot /var/log/conpot /usr/share/wireshark && \ wget https://github.com/wireshark/wireshark/raw/master/manuf -o /usr/share/wireshark/manuf && \ cp /root/dist/conpot.cfg /etc/conpot/conpot.cfg && \ - cp -R /root/dist/templates /usr/lib/python3.6/site-packages/conpot/ && \ + cp -R /root/dist/templates /usr/lib/python3.7/site-packages/conpot/ && \ addgroup -g 2000 conpot && \ adduser -S -s /bin/ash -u 2000 -D -g 2000 conpot && \ - +# # Clean up apk del --purge \ build-base \ @@ -68,7 +69,7 @@ RUN apk -U add \ rm -rf /root/* && \ rm -rf /tmp/* && \ rm -rf /var/cache/apk/* - +# # Start conpot STOPSIGNAL SIGINT USER conpot:conpot diff --git a/docker/conpot/dist/conpot.cfg b/docker/conpot/dist/conpot.cfg index 218e7b51..f3f3752a 100644 --- a/docker/conpot/dist/conpot.cfg +++ b/docker/conpot/dist/conpot.cfg @@ -3,7 +3,7 @@ sensorid = conpot [virtual_file_system] data_fs_url = %(CONPOT_TMP)s -fs_url = tar:///usr/lib/python3.6/site-packages/conpot/data.tar +fs_url = tar:///usr/lib/python3.7/site-packages/conpot/data.tar [session] timeout = 30