update, tweaking, add

add wordpot incl. json logging with activated plugins
bump snare, tanner, phpox, tanner_redis to latest master and to alpine 3.19
This commit is contained in:
t3chn0m4g3 2024-03-11 17:33:53 +01:00
parent 4baac7ac04
commit 1da35284be
9 changed files with 98 additions and 100 deletions

View file

@ -717,7 +717,7 @@ services:
pull_policy: ${TPOT_PULL_POLICY}
read_only: true
volumes:
- ${TPOT_DATA_PATH}/wordpot/log:/opt/wordpot/log
- ${TPOT_DATA_PATH}/wordpot/log:/opt/wordpot/logs/
##################

View file

@ -51,7 +51,7 @@ services:
image: "dtagdevsec/tanner:alpha"
read_only: true
volumes:
- /data/tanner/log:/var/log/tanner
- $HOME/tpotce/data/tanner/log:/var/log/tanner
command: tannerapi
depends_on:
- tanner_redis
@ -94,8 +94,8 @@ services:
command: tanner
read_only: true
volumes:
- /data/tanner/log:/var/log/tanner
- /data/tanner/files:/opt/tanner/files
- $HOME/tpotce/data/tanner/log:/var/log/tanner
- $HOME/tpotce/data/tanner/files:/opt/tanner/files
depends_on:
- tanner_api
# - tanner_web

View file

@ -1,4 +1,4 @@
FROM alpine:3.15
FROM alpine:3.19
#
# Install packages
RUN apk -U --no-cache add \
@ -6,37 +6,37 @@ RUN apk -U --no-cache add \
file \
git \
make \
php7 \
php7-dev \
php83 \
php83-dev \
py3-aiohttp \
python3 \
python3-dev \
re2c && \
#
# Install bfr sandbox from git
git clone https://github.com/mushorg/BFR /opt/BFR && \
git clone https://github.com/mushorg/BFR -b v1.0.0 /opt/BFR && \
cd /opt/BFR && \
# git checkout 508729202428a35bcc6bb27dd97b831f7e5009b5 && \
phpize7 && \
# git checkout 91a8a4e155875c50b69d5c6af454e304994815a7 && \
phpize83 && \
./configure \
--with-php-config=/usr/bin/php-config7 \
--with-php-config=/usr/bin/php-config83 \
--enable-bfr && \
make && \
make install && \
cd / && \
rm -rf /opt/BFR /tmp/* /var/tmp/* && \
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php7/php.ini && \
echo "zend_extension = "$(find /usr -name bfr.so) >> /etc/php83/php.ini && \
#
# Install PHP Sandbox
git clone https://github.com/mushorg/phpox /opt/phpox && \
cd /opt/phpox && \
git checkout a62c8136ec7b3ebab0c989f4235e2960175121f8 && \
#git checkout a62c8136ec7b3ebab0c989f4235e2960175121f8 && \
make && \
#
# Clean up
apk del --purge build-base \
git \
php7-dev \
php83-dev \
python3-dev && \
rm -rf /root/* /var/cache/apk/* /opt/phpox/.git
#

View file

@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.19
#
# Include dist
COPY dist/ /root/dist/

View file

@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.19
#
# Include dist
COPY dist/ /root/dist/
@ -23,9 +23,10 @@ RUN apk -U --no-cache add \
# Setup Snare
git clone https://github.com/mushorg/snare /opt/snare && \
cd /opt/snare/ && \
git checkout 0919a80838eb0823a3b7029b0264628ee0a36211 && \
# git checkout 0919a80838eb0823a3b7029b0264628ee0a36211 && \
git checkout 08c69b7165354ea2040b6170c37d92ff3c304f96 && \
cp /root/dist/requirements.txt . && \
pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --break-system-packages --no-cache-dir -r requirements.txt && \
python3 setup.py install && \
cd / && \
rm -rf /opt/snare && \

View file

@ -31,15 +31,10 @@ RUN apk -U --no-cache add \
python3-dev && \
#
# Setup Tanner
# git clone https://github.com/mushorg/tanner /opt/tanner && \
git clone https://github.com/t3chn0m4g3/tanner /opt/tanner && \
# git clone https://github.com/t3chn0m4g3/tanner /opt/tanner && \
git clone https://github.com/mushorg/tanner /opt/tanner && \
cd /opt/tanner/ && \
# git fetch origin pull/364/head:test && \
# git checkout test && \
# git checkout 20dabcbccc50f8878525677b925a4c9abcaf9f54 && \
# git checkout 2fdce2e2ad7e125012c7e6dcbfa02b50f73c128e && \
# sed -i 's/aioredis/aioredis==1.3.1/g' requirements.txt && \
# sed -i 's/^aiohttp$/aiohttp==3.7.4/g' requirements.txt && \
git checkout 245d628f4023e5462c7035e760a6b5eed0a33fbe && \
cp /root/dist/config.yaml /opt/tanner/tanner/data && \
cp /root/dist/requirements.txt . && \
pip3 install --no-cache-dir -r requirements.txt && \

View file

@ -1,4 +1,4 @@
FROM alpine:3.17
FROM alpine:3.19
#
# Include dist
COPY dist/ /root/dist/
@ -14,34 +14,35 @@ RUN apk -U --no-cache add \
py3-jinja2 \
py3-markupsafe \
py3-pip \
py3-ua-parser \
py3-werkzeug \
py3-yaml \
python3 \
python3-dev && \
#
# Install wordpot from GitHub and setup
mkdir -p /opt && \
cd /opt/ && \
git clone https://github.com/Will-777/wordpot2 && \
cd wordpot2 && \
git checkout e93a2e00d84d280b0acd58ba6889b4bee8a6e4d2 && \
# cp /root/dist/views.py /opt/wordpot2/wordpot/views.py && \
git clone https://github.com/t3chn0m4g3/wordpot && \
cd wordpot && \
git checkout 8fedeb1b74e1d225da2a7273656bf0afa84a20aa && \
cp /root/dist/requirements.txt . && \
pip3 install -r requirements.txt && \
setcap cap_net_bind_service=+ep /usr/bin/python3.10 && \
pip3 install --break-system-packages -r requirements.txt && \
setcap cap_net_bind_service=+ep $(readlink -f $(type -P python3)) && \
#
# Setup user, groups and configs
addgroup -g 2000 wordpot && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 wordpot && \
chown wordpot:wordpot -R /opt/wordpot2 && \
chown wordpot:wordpot -R /opt/wordpot && \
#
# Clean up
apk del --purge build-base \
git \
python3-dev && \
rm -rf /root/* /var/cache/apk/* /opt/wordpot2/.git
rm -rf /root/* /var/cache/apk/* /opt/wordpot/.git
#
# Start wordpot
STOPSIGNAL SIGINT
USER wordpot:wordpot
WORKDIR /opt/wordpot2
CMD ["/usr/bin/python3","wordpot2.py", "--host", "0.0.0.0", "--port", "80", "--title", "Wordpress"]
WORKDIR /opt/wordpot
CMD ["/usr/bin/python3","wordpot.py", "--host", "0.0.0.0", "--port", "80", "--title", "Wordpress"]

View file

@ -1 +1,2 @@
hpfeeds-threatstream==1.1
user-agents

View file

@ -17,6 +17,6 @@ services:
ports:
- "80:80"
image: "dtagdevsec/wordpot:alpha"
# read_only: true
# volumes:
# - /data/wordpot/log:/opt/ddospot/ddospot/db
read_only: true
volumes:
- $HOME/tpotce/data/wordpot/log:/opt/wordpot/logs/