bump conpot to latest master, cleanup

This commit is contained in:
t3chn0m4g3 2022-03-09 15:19:51 +00:00
parent d2f3be9477
commit 99c719eed4
4 changed files with 16 additions and 1142 deletions

View file

@ -19,18 +19,14 @@ RUN apk --no-cache -U add \
pkgconfig \ pkgconfig \
python3 \ python3 \
python3-dev \ python3-dev \
py3-cffi \
py3-cryptography \
py3-gevent \
py3-pip \ py3-pip \
tcpdump \
wget && \ wget && \
# #
# Setup ConPot # Setup ConPot
git clone https://github.com/mushorg/conpot /opt/conpot && \ git clone https://github.com/mushorg/conpot /opt/conpot && \
cd /opt/conpot/ && \ cd /opt/conpot/ && \
# git checkout 804fd65aa3b7ffa31c07fd4e863d4a5500414cf3 && \ git checkout b3740505fd26d82473c0d7be405b372fa0f82575 && \
git checkout 1c2382ea290b611fdc6a0a5f9572c7504bcb616e && \ #git checkout 1c2382ea290b611fdc6a0a5f9572c7504bcb616e && \
# Change template default ports if <1024 # Change template default ports if <1024
sed -i 's/port="2121"/port="21"/' /opt/conpot/conpot/templates/default/ftp/ftp.xml && \ sed -i 's/port="2121"/port="21"/' /opt/conpot/conpot/templates/default/ftp/ftp.xml && \
sed -i 's/port="8800"/port="80"/' /opt/conpot/conpot/templates/default/http/http.xml && \ sed -i 's/port="8800"/port="80"/' /opt/conpot/conpot/templates/default/http/http.xml && \
@ -41,9 +37,11 @@ RUN apk --no-cache -U add \
sed -i 's/port="6969"/port="69"/' /opt/conpot/conpot/templates/default/tftp/tftp.xml && \ 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="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 && \ sed -i 's/port="6230"/port="623"/' /opt/conpot/conpot/templates/ipmi/ipmi/ipmi.xml && \
pip3 install --no-cache-dir -U setuptools && \ pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -U cffi \
setuptools \
wheel && \
pip3 install --no-cache-dir . && \ pip3 install --no-cache-dir . && \
pip3 install --no-cache-dir pysnmp-mibs && \
cd / && \ cd / && \
rm -rf /opt/conpot /tmp/* /var/tmp/* && \ rm -rf /opt/conpot /tmp/* /var/tmp/* && \
setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \ setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \
@ -68,7 +66,6 @@ RUN apk --no-cache -U add \
mariadb-dev \ mariadb-dev \
pkgconfig \ pkgconfig \
python3-dev \ python3-dev \
py-cffi \
wget && \ wget && \
rm -rf /root/* && \ rm -rf /root/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \

File diff suppressed because it is too large Load diff

View file

@ -91,19 +91,19 @@
<value type="value">1</value> <value type="value">1</value>
</key> </key>
<key name="ifInOctets"> <key name="ifInOctets">
<value type="value">1618895</value> <value type="function">conpot.emulators.misc.sysinfo.BytesRecv</value>
</key> </key>
<key name="ifInUcastPkts"> <key name="ifInUcastPkts">
<value type="value">7018</value> <value type="function">conpot.emulators.misc.sysinfo.PacketsRecv</value>
</key> </key>
<key name="ifInNUcastPkts"> <key name="ifInNUcastPkts">
<value type="value">291</value> <value type="value">291</value>
</key> </key>
<key name="ifOutOctets"> <key name="ifOutOctets">
<value type="value">455107</value> <value type="function">conpot.emulators.misc.sysinfo.BytesSent</value>
</key> </key>
<key name="ifOutUcastPkts"> <key name="ifOutUcastPkts">
<value type="value">872264</value> <value type="function">conpot.emulators.misc.sysinfo.PacketsSent</value>
</key> </key>
<key name="ifOutUNcastPkts"> <key name="ifOutUNcastPkts">
<value type="value">143</value> <value type="value">143</value>
@ -168,7 +168,7 @@
<value type="value">0</value> <value type="value">0</value>
</key> </key>
<key name="ipAdEntAddr"> <key name="ipAdEntAddr">
<value type="value">"217.172.190.137"</value> <value type="function">conpot.emulators.misc.sysinfo.LocalIP</value>
</key> </key>
<key name="ipAdEntIfIndex"> <key name="ipAdEntIfIndex">
<value type="value">1</value> <value type="value">1</value>
@ -290,7 +290,7 @@
<value type="value">45</value> <value type="value">45</value>
</key> </key>
<key name="tcpCurrEstab"> <key name="tcpCurrEstab">
<value type="value">0</value> <value type="function">conpot.emulators.misc.sysinfo.TcpCurrEstab</value>
</key> </key>
<key name="tcpInSegs"> <key name="tcpInSegs">
<value type="value">30321</value> <value type="value">30321</value>
@ -305,7 +305,7 @@
<value type="value">2</value> <value type="value">2</value>
</key> </key>
<key name="tcpConnLocalAddress"> <key name="tcpConnLocalAddress">
<value type="value">"217.172.190.137"</value> <value type="function">conpot.emulators.misc.sysinfo.LocalIP</value>
</key> </key>
<key name="tcpConnLocalPort"> <key name="tcpConnLocalPort">
<value type="value">2404</value> <value type="value">2404</value>
@ -336,7 +336,7 @@
<value type="value">47</value> <value type="value">47</value>
</key> </key>
<key name="udpLocalAddress"> <key name="udpLocalAddress">
<value type="value">"217.172.190.137"</value> <value type="value">"163.172.189.137"</value>
</key> </key>
<key name="udpLocalPort"> <key name="udpLocalPort">
<value type="value">161</value> <value type="value">161</value>

View file

@ -11,7 +11,7 @@
<!-- Core value that can be retrieved from the databus by key --> <!-- Core value that can be retrieved from the databus by key -->
<key_value_mappings> <key_value_mappings>
<key name="power_simulator"> <key name="power_simulator">
<value type="function">conpot.protocols.kamstrup.usage_simulator.UsageSimulator</value> <value type="function">conpot.emulators.kamstrup.usage_simulator.UsageSimulator</value>
</key> </key>
<key name="register_1024"> <key name="register_1024">
<value type="value">0</value> <value type="value">0</value>