mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-04-20 06:02:24 +00:00
update adbhoney for py 3.12
This commit is contained in:
parent
817fac6b45
commit
422123139d
3 changed files with 51 additions and 19 deletions
|
@ -896,7 +896,7 @@ Without open source and the development community we are proud to be a part of,
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
## **And of course ***YOU*** for joining the community!**
|
## **And of course ***YOU*** for joining the community!**
|
||||||
<br><br>
|
<br>
|
||||||
|
|
||||||
# Testimonials
|
# Testimonials
|
||||||
One of the greatest feedback we have gotten so far is by one of the Conpot developers:<br>
|
One of the greatest feedback we have gotten so far is by one of the Conpot developers:<br>
|
||||||
|
|
|
@ -1,39 +1,32 @@
|
||||||
FROM alpine:3.19
|
FROM alpine:3.20 AS builder
|
||||||
#
|
#
|
||||||
# Include dist
|
# Include dist
|
||||||
COPY dist/ /root/dist/
|
COPY dist/ /root/dist/
|
||||||
#
|
#
|
||||||
# Install packages
|
# Install packages
|
||||||
RUN apk --no-cache -U add \
|
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
||||||
|
apk --no-cache -U add \
|
||||||
|
build-base \
|
||||||
git \
|
git \
|
||||||
procps \
|
procps \
|
||||||
py3-psutil \
|
py3-psutil \
|
||||||
py3-requests \
|
py3-requests \
|
||||||
|
py3-pyinstaller@testing \
|
||||||
python3 && \
|
python3 && \
|
||||||
#
|
#
|
||||||
# Install adbhoney from git
|
# Install adbhoney from git
|
||||||
git clone https://github.com/huuck/ADBHoney /opt/adbhoney && \
|
git clone https://github.com/t3chn0m4g3/ADBHoney -b pyinstaller /opt/adbhoney && \
|
||||||
cd /opt/adbhoney && \
|
cd /opt/adbhoney && \
|
||||||
# git checkout 2417a7a982f4fd527b3a048048df9a23178767ad && \
|
|
||||||
git checkout 42afd98611724ca3d694a48b694c957e8d953db4 && \
|
|
||||||
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
|
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
|
||||||
cp /root/dist/cpu_check.py / && \
|
|
||||||
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
|
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
|
||||||
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
|
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
|
||||||
|
pyinstaller adbhoney.spec
|
||||||
#
|
#
|
||||||
# Setup user, groups and configs
|
FROM alpine:3.20
|
||||||
addgroup -g 2000 adbhoney && \
|
COPY --from=builder /opt/adbhoney/dist/adbhoney/ /opt/adbhoney/
|
||||||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 adbhoney && \
|
|
||||||
chown -R adbhoney:adbhoney /opt/adbhoney && \
|
|
||||||
#
|
|
||||||
# Clean up
|
|
||||||
apk del --purge git && \
|
|
||||||
rm -rf /root/* /opt/adbhoney/.git /var/cache/apk/*
|
|
||||||
#
|
#
|
||||||
# Set workdir and start adbhoney
|
# Set workdir and start adbhoney
|
||||||
STOPSIGNAL SIGINT
|
STOPSIGNAL SIGINT
|
||||||
# Adbhoney sometimes hangs at 100% CPU usage, if detected container will become unhealthy and restarted by tpotinit
|
USER 2000:2000
|
||||||
HEALTHCHECK --interval=5m --timeout=30s --retries=3 CMD python3 /cpu_check.py $(pgrep -of run.py) 99
|
|
||||||
USER adbhoney:adbhoney
|
|
||||||
WORKDIR /opt/adbhoney/
|
WORKDIR /opt/adbhoney/
|
||||||
CMD ["/usr/bin/python3", "run.py"]
|
CMD ["./adbhoney"]
|
||||||
|
|
39
docker/adbhoney/Dockerfile.old
Normal file
39
docker/adbhoney/Dockerfile.old
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
FROM alpine:3.20
|
||||||
|
#
|
||||||
|
# Include dist
|
||||||
|
COPY dist/ /root/dist/
|
||||||
|
#
|
||||||
|
# Install packages
|
||||||
|
RUN apk --no-cache -U add \
|
||||||
|
git \
|
||||||
|
procps \
|
||||||
|
py3-psutil \
|
||||||
|
py3-requests \
|
||||||
|
python3 && \
|
||||||
|
#
|
||||||
|
# Install adbhoney from git
|
||||||
|
git clone https://github.com/t3chn0m4g3/ADBHoney /opt/adbhoney && \
|
||||||
|
# cd /opt/adbhoney && \
|
||||||
|
# git checkout 2417a7a982f4fd527b3a048048df9a23178767ad && \
|
||||||
|
# git checkout 42afd98611724ca3d694a48b694c957e8d953db4 && \
|
||||||
|
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
|
||||||
|
cp /root/dist/cpu_check.py / && \
|
||||||
|
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
|
||||||
|
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
|
||||||
|
#
|
||||||
|
# Setup user, groups and configs
|
||||||
|
addgroup -g 2000 adbhoney && \
|
||||||
|
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 adbhoney && \
|
||||||
|
chown -R adbhoney:adbhoney /opt/adbhoney && \
|
||||||
|
#
|
||||||
|
# Clean up
|
||||||
|
apk del --purge git && \
|
||||||
|
rm -rf /root/* /opt/adbhoney/.git /var/cache/apk/*
|
||||||
|
#
|
||||||
|
# Set workdir and start adbhoney
|
||||||
|
STOPSIGNAL SIGINT
|
||||||
|
# Adbhoney sometimes hangs at 100% CPU usage, if detected container will become unhealthy and restarted by tpotinit
|
||||||
|
HEALTHCHECK --interval=5m --timeout=30s --retries=3 CMD python3 /cpu_check.py $(pgrep -of run.py) 99
|
||||||
|
USER adbhoney:adbhoney
|
||||||
|
WORKDIR /opt/adbhoney/
|
||||||
|
CMD ["/usr/bin/python3", "run.py"]
|
Loading…
Reference in a new issue