mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
add /modify cpu healtchecks for adbhoney, conpot, dionaea
This commit is contained in:
parent
068f4bb67e
commit
886a7f159e
9 changed files with 32 additions and 26 deletions
|
@ -30,7 +30,7 @@ RUN apk --no-cache -U add \
|
||||||
# Set workdir and start adbhoney
|
# Set workdir and start adbhoney
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
# Adbhoney sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
|
# Adbhoney sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
|
||||||
HEALTHCHECK CMD if [ $(ps -C mpv -p 1 -o %cpu | tail -n 1 | cut -f 1 -d ".") -gt 99 ]; then kill -2 1; else exit 0; fi
|
HEALTHCHECK CMD if [ $(ps -C mpv -p 1 -o %cpu | tail -n 1 | cut -f 1 -d ".") -gt 90 ]; then kill -2 1; else exit 0; fi
|
||||||
USER adbhoney:adbhoney
|
USER adbhoney:adbhoney
|
||||||
WORKDIR /opt/adbhoney/
|
WORKDIR /opt/adbhoney/
|
||||||
CMD /usr/bin/python3 run.py
|
CMD /usr/bin/python3 run.py
|
||||||
|
|
|
@ -17,6 +17,7 @@ RUN apk --no-cache -U add \
|
||||||
libxslt-dev \
|
libxslt-dev \
|
||||||
mariadb-dev \
|
mariadb-dev \
|
||||||
pkgconfig \
|
pkgconfig \
|
||||||
|
procps \
|
||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
py3-pip \
|
py3-pip \
|
||||||
|
@ -73,5 +74,7 @@ RUN apk --no-cache -U add \
|
||||||
#
|
#
|
||||||
# Start conpot
|
# Start conpot
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
|
# Conpot sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
|
||||||
|
HEALTHCHECK CMD if [ $(ps -C mpv -p 1 -o %cpu | tail -n 1 | cut -f 1 -d ".") -gt 90 ]; then kill -2 1; else exit 0; fi
|
||||||
USER conpot:conpot
|
USER conpot:conpot
|
||||||
CMD exec /usr/bin/conpot --mibcache $CONPOT_TMP --temp_dir $CONPOT_TMP --template $CONPOT_TEMPLATE --logfile $CONPOT_LOG --config $CONPOT_CONFIG
|
CMD exec /usr/bin/conpot --mibcache $CONPOT_TMP --temp_dir $CONPOT_TMP --template $CONPOT_TEMPLATE --logfile $CONPOT_LOG --config $CONPOT_CONFIG
|
||||||
|
|
|
@ -23,8 +23,8 @@ services:
|
||||||
- CONPOT_TMP=/tmp/conpot
|
- CONPOT_TMP=/tmp/conpot
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/conpot:uid=2000,gid=2000
|
- /tmp/conpot:uid=2000,gid=2000
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- conpot_local_default
|
- conpot_local_default
|
||||||
ports:
|
ports:
|
||||||
|
@ -54,8 +54,8 @@ services:
|
||||||
- CONPOT_TMP=/tmp/conpot
|
- CONPOT_TMP=/tmp/conpot
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/conpot:uid=2000,gid=2000
|
- /tmp/conpot:uid=2000,gid=2000
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- conpot_local_IEC104
|
- conpot_local_IEC104
|
||||||
ports:
|
ports:
|
||||||
|
@ -78,8 +78,8 @@ services:
|
||||||
- CONPOT_TMP=/tmp/conpot
|
- CONPOT_TMP=/tmp/conpot
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/conpot:uid=2000,gid=2000
|
- /tmp/conpot:uid=2000,gid=2000
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- conpot_local_guardian_ast
|
- conpot_local_guardian_ast
|
||||||
ports:
|
ports:
|
||||||
|
@ -101,8 +101,8 @@ services:
|
||||||
- CONPOT_TMP=/tmp/conpot
|
- CONPOT_TMP=/tmp/conpot
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/conpot:uid=2000,gid=2000
|
- /tmp/conpot:uid=2000,gid=2000
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- conpot_local_ipmi
|
- conpot_local_ipmi
|
||||||
ports:
|
ports:
|
||||||
|
@ -124,8 +124,8 @@ services:
|
||||||
- CONPOT_TMP=/tmp/conpot
|
- CONPOT_TMP=/tmp/conpot
|
||||||
tmpfs:
|
tmpfs:
|
||||||
- /tmp/conpot:uid=2000,gid=2000
|
- /tmp/conpot:uid=2000,gid=2000
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- conpot_local_kamstrup_382
|
- conpot_local_kamstrup_382
|
||||||
ports:
|
ports:
|
||||||
|
|
|
@ -110,5 +110,8 @@ RUN ARCH=$(arch) && \
|
||||||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /opt/dionaea/.git
|
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache /opt/dionaea/.git
|
||||||
#
|
#
|
||||||
# Start dionaea
|
# Start dionaea
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
# Dionaea sometimes hangs at 100% CPU usage, if detected process will be killed and container restarts per docker-compose settings
|
||||||
|
HEALTHCHECK CMD if [ $(ps -C mpv -p 1 -o %cpu | tail -n 1 | cut -f 1 -d ".") -gt 90 ]; then kill -2 1; else exit 0; fi
|
||||||
USER dionaea:dionaea
|
USER dionaea:dionaea
|
||||||
CMD ["/opt/dionaea/bin/dionaea", "-u", "dionaea", "-g", "dionaea", "-c", "/opt/dionaea/etc/dionaea/dionaea.cfg"]
|
CMD ["/opt/dionaea/bin/dionaea", "-u", "dionaea", "-g", "dionaea", "-c", "/opt/dionaea/etc/dionaea/dionaea.cfg"]
|
||||||
|
|
|
@ -12,8 +12,8 @@ services:
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
restart: always
|
restart: always
|
||||||
cpu_count: 1
|
# cpu_count: 1
|
||||||
cpus: 0.25
|
# cpus: 0.25
|
||||||
networks:
|
networks:
|
||||||
- dionaea_local
|
- dionaea_local
|
||||||
ports:
|
ports:
|
||||||
|
@ -29,9 +29,9 @@ services:
|
||||||
- "1723:1723"
|
- "1723:1723"
|
||||||
- "1883:1883"
|
- "1883:1883"
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
- "5060:5060"
|
# - "5060:5060"
|
||||||
- "5060:5060/udp"
|
# - "5060:5060/udp"
|
||||||
- "5061:5061"
|
# - "5061:5061"
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
image: "dtagdevsec/dionaea:2203"
|
image: "dtagdevsec/dionaea:2203"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
|
@ -213,9 +213,9 @@ services:
|
||||||
- "1723:1723"
|
- "1723:1723"
|
||||||
- "1883:1883"
|
- "1883:1883"
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
- "5060:5060"
|
# - "5060:5060"
|
||||||
- "5060:5060/udp"
|
# - "5060:5060/udp"
|
||||||
- "5061:5061"
|
# - "5061:5061"
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
image: "dtagdevsec/dionaea:2203"
|
image: "dtagdevsec/dionaea:2203"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
|
@ -216,9 +216,9 @@ services:
|
||||||
- "1723:1723"
|
- "1723:1723"
|
||||||
- "1883:1883"
|
- "1883:1883"
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
- "5060:5060"
|
# - "5060:5060"
|
||||||
- "5060:5060/udp"
|
# - "5060:5060/udp"
|
||||||
- "5061:5061"
|
# - "5061:5061"
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
image: "dtagdevsec/dionaea:2203"
|
image: "dtagdevsec/dionaea:2203"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
|
@ -212,9 +212,9 @@ services:
|
||||||
- "1723:1723"
|
- "1723:1723"
|
||||||
- "1883:1883"
|
- "1883:1883"
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
- "5060:5060"
|
# - "5060:5060"
|
||||||
- "5060:5060/udp"
|
# - "5060:5060/udp"
|
||||||
- "5061:5061"
|
# - "5061:5061"
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
image: "dtagdevsec/dionaea:2203"
|
image: "dtagdevsec/dionaea:2203"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
|
@ -235,7 +235,7 @@ services:
|
||||||
- "3306:3306"
|
- "3306:3306"
|
||||||
# - "5060:5060"
|
# - "5060:5060"
|
||||||
# - "5060:5060/udp"
|
# - "5060:5060/udp"
|
||||||
- "5061:5061"
|
# - "5061:5061"
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
image: "dtagdevsec/dionaea:2203"
|
image: "dtagdevsec/dionaea:2203"
|
||||||
read_only: true
|
read_only: true
|
||||||
|
|
Loading…
Reference in a new issue