tpotce/docker/adbhoney/Dockerfile

36 lines
979 B
Text
Raw Normal View History

2018-12-05 16:59:08 +00:00
FROM alpine
2019-08-28 12:46:19 +00:00
#
# Include dist
ADD dist/ /root/dist/
#
2018-12-05 16:59:08 +00:00
# Install packages
RUN apk -U add \
2018-12-05 16:59:08 +00:00
git \
libcap \
python3 \
python3-dev && \
2019-08-28 12:46:19 +00:00
#
2018-12-05 16:59:08 +00:00
# Install adbhoney from git
git clone --depth=1 https://github.com/huuck/ADBHoney /opt/adbhoney && \
2019-08-28 12:46:19 +00:00
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
sed -i 's/dst_ip/dest_ip/' /opt/adbhoney/adbhoney/core.py && \
sed -i 's/dst_port/dest_port/' /opt/adbhoney/adbhoney/core.py && \
#
2018-12-05 16:59:08 +00:00
# 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 && \
setcap cap_net_bind_service=+ep /usr/bin/python3.7 && \
2019-08-28 12:46:19 +00:00
#
2018-12-05 16:59:08 +00:00
# Clean up
apk del --purge git \
python3-dev && \
2018-12-05 16:59:08 +00:00
rm -rf /root/* && \
rm -rf /var/cache/apk/*
2019-08-28 12:46:19 +00:00
#
2018-12-05 16:59:08 +00:00
# Set workdir and start adbhoney
STOPSIGNAL SIGINT
USER adbhoney:adbhoney
WORKDIR /opt/adbhoney/
CMD nohup /usr/bin/python3 run.py