mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +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
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
#
|
||||
# Include dist
|
||||
ADD dist/ /root/dist/
|
||||
|
||||
#
|
||||
# Install dependencies and packages
|
||||
RUN apt-get update -y && \
|
||||
apt-get dist-upgrade -y && \
|
||||
|
@ -32,7 +32,7 @@ RUN apt-get update -y && \
|
|||
python3-bson \
|
||||
python3-yaml \
|
||||
ttf-liberation && \
|
||||
|
||||
#
|
||||
# Get and install dionaea
|
||||
git clone --depth=1 https://github.com/dinotools/dionaea -b 0.8.0 /root/dionaea/ && \
|
||||
cd /root/dionaea && \
|
||||
|
@ -41,17 +41,17 @@ RUN apt-get update -y && \
|
|||
cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/dionaea .. && \
|
||||
make && \
|
||||
make install && \
|
||||
|
||||
#
|
||||
# Setup user and groups
|
||||
addgroup --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 && \
|
||||
|
||||
#
|
||||
# Supply configs and set permissions
|
||||
chown -R dionaea:dionaea /opt/dionaea/var && \
|
||||
rm -rf /opt/dionaea/etc/dionaea/* && \
|
||||
mv /root/dist/etc/* /opt/dionaea/etc/dionaea/ && \
|
||||
|
||||
#
|
||||
# Setup runtime and clean up
|
||||
apt-get purge -y \
|
||||
build-essential \
|
||||
|
@ -75,7 +75,7 @@ RUN apt-get update -y && \
|
|||
python3-dev \
|
||||
python3-bson \
|
||||
python3-yaml && \
|
||||
|
||||
#
|
||||
apt-get install -y \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
|
@ -90,11 +90,11 @@ RUN apt-get update -y && \
|
|||
libpcap0.8 \
|
||||
libpython3.5 \
|
||||
libudns0 && \
|
||||
|
||||
#
|
||||
apt-get autoremove --purge -y && \
|
||||
apt-get clean && \
|
||||
rm -rf /root/* /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
#
|
||||
# Start dionaea
|
||||
USER dionaea:dionaea
|
||||
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
|
||||
ADD dist/ /root/dist/
|
||||
#
|
||||
# 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 \
|
||||
git \
|
||||
libcap \
|
||||
|
@ -22,6 +23,7 @@ RUN apk -U --no-cache add \
|
|||
cd /opt/ && \
|
||||
git clone --depth=1 https://github.com/johnnykv/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 . && \
|
||||
#
|
||||
|
@ -47,7 +49,7 @@ RUN apk -U --no-cache add \
|
|||
/var/cache/apk/* \
|
||||
/opt/heralding
|
||||
#
|
||||
# Start elasticpot
|
||||
# Start Heralding
|
||||
STOPSIGNAL SIGINT
|
||||
WORKDIR /tmp/heralding/
|
||||
USER heralding:heralding
|
||||
|
|
Loading…
Reference in a new issue