mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
rebuild Dionaea, Heralding
This commit is contained in:
parent
f7a6a30c90
commit
0928e37326
2 changed files with 14 additions and 12 deletions
|
@ -1,9 +1,9 @@
|
||||||
FROM debian:stretch-slim
|
FROM debian:stretch-slim
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
|
#
|
||||||
# Install dependencies and packages
|
# Install dependencies and packages
|
||||||
RUN apt-get update -y && \
|
RUN apt-get update -y && \
|
||||||
apt-get dist-upgrade -y && \
|
apt-get dist-upgrade -y && \
|
||||||
|
@ -32,7 +32,7 @@ RUN apt-get update -y && \
|
||||||
python3-bson \
|
python3-bson \
|
||||||
python3-yaml \
|
python3-yaml \
|
||||||
ttf-liberation && \
|
ttf-liberation && \
|
||||||
|
#
|
||||||
# Get and install dionaea
|
# Get and install dionaea
|
||||||
git clone --depth=1 https://github.com/dinotools/dionaea -b 0.8.0 /root/dionaea/ && \
|
git clone --depth=1 https://github.com/dinotools/dionaea -b 0.8.0 /root/dionaea/ && \
|
||||||
cd /root/dionaea && \
|
cd /root/dionaea && \
|
||||||
|
@ -41,17 +41,17 @@ RUN apt-get update -y && \
|
||||||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea .. && \
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea .. && \
|
||||||
make && \
|
make && \
|
||||||
make install && \
|
make install && \
|
||||||
|
#
|
||||||
# Setup user and groups
|
# Setup user and groups
|
||||||
addgroup --gid 2000 dionaea && \
|
addgroup --gid 2000 dionaea && \
|
||||||
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 dionaea && \
|
adduser --system --no-create-home --shell /bin/bash --uid 2000 --disabled-password --disabled-login --gid 2000 dionaea && \
|
||||||
setcap cap_net_bind_service=+ep /opt/dionaea/bin/dionaea && \
|
setcap cap_net_bind_service=+ep /opt/dionaea/bin/dionaea && \
|
||||||
|
#
|
||||||
# Supply configs and set permissions
|
# Supply configs and set permissions
|
||||||
chown -R dionaea:dionaea /opt/dionaea/var && \
|
chown -R dionaea:dionaea /opt/dionaea/var && \
|
||||||
rm -rf /opt/dionaea/etc/dionaea/* && \
|
rm -rf /opt/dionaea/etc/dionaea/* && \
|
||||||
mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \
|
mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \
|
||||||
|
#
|
||||||
# Setup runtime and clean up
|
# Setup runtime and clean up
|
||||||
apt-get purge -y \
|
apt-get purge -y \
|
||||||
build-essential \
|
build-essential \
|
||||||
|
@ -75,7 +75,7 @@ RUN apt-get update -y && \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-bson \
|
python3-bson \
|
||||||
python3-yaml && \
|
python3-yaml && \
|
||||||
|
#
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
python3 \
|
python3 \
|
||||||
|
@ -90,11 +90,11 @@ RUN apt-get update -y && \
|
||||||
libpcap0.8 \
|
libpcap0.8 \
|
||||||
libpython3.5 \
|
libpython3.5 \
|
||||||
libudns0 && \
|
libudns0 && \
|
||||||
|
#
|
||||||
apt-get autoremove --purge -y && \
|
apt-get autoremove --purge -y && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
#
|
||||||
# Start dionaea
|
# Start dionaea
|
||||||
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"]
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
FROM alpine
|
FROM alpine:3.10
|
||||||
#
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
ADD dist/ /root/dist/
|
ADD dist/ /root/dist/
|
||||||
#
|
#
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk -U --no-cache add \
|
RUN sed -i 's/dl-cdn/dl-2/g' /etc/apk/repositories && \
|
||||||
|
apk -U --no-cache add \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
libcap \
|
libcap \
|
||||||
|
@ -22,6 +23,7 @@ RUN apk -U --no-cache add \
|
||||||
cd /opt/ && \
|
cd /opt/ && \
|
||||||
git clone --depth=1 https://github.com/johnnykv/heralding && \
|
git clone --depth=1 https://github.com/johnnykv/heralding && \
|
||||||
cd heralding && \
|
cd heralding && \
|
||||||
|
sed -i 's/asyncssh/asyncssh==1.18.0/' requirements.txt && \
|
||||||
pip3 install --no-cache-dir -r requirements.txt && \
|
pip3 install --no-cache-dir -r requirements.txt && \
|
||||||
pip3 install --no-cache-dir . && \
|
pip3 install --no-cache-dir . && \
|
||||||
#
|
#
|
||||||
|
@ -47,7 +49,7 @@ RUN apk -U --no-cache add \
|
||||||
/var/cache/apk/* \
|
/var/cache/apk/* \
|
||||||
/opt/heralding
|
/opt/heralding
|
||||||
#
|
#
|
||||||
# Start elasticpot
|
# Start Heralding
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
WORKDIR /tmp/heralding/
|
WORKDIR /tmp/heralding/
|
||||||
USER heralding:heralding
|
USER heralding:heralding
|
||||||
|
|
Loading…
Reference in a new issue