forked from telekom-security/tpotce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/telekom-security/tpotce
- Loading branch information
Showing
14 changed files
with
390 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
FROM ubuntu:20.04 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
# | ||
# Install packages | ||
RUN apt-get update && \ | ||
apt-get update -y && \ | ||
apt-get dist-upgrade -y && \ | ||
apt-get install -y \ | ||
build-essential \ | ||
cargo \ | ||
cleo \ | ||
git \ | ||
libcap2 \ | ||
libcap2-bin \ | ||
libcurl4 \ | ||
libcurl4-nss-dev \ | ||
libffi7 \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
python3-pip \ | ||
python3 \ | ||
python3-dev \ | ||
rust-all && \ | ||
pip3 install --upgrade pip && \ | ||
pip3 install poetry pycurl && \ | ||
# | ||
# Install log4pot from GitHub and setup | ||
mkdir -p /opt /var/log/log4pot && \ | ||
cd /opt/ && \ | ||
git clone https://github.com/thomaspatzke/Log4Pot && \ | ||
cd Log4Pot && \ | ||
# git checkout 4269bf4a91457328fb64c3e7941cb2f520e5e911 && \ | ||
git checkout 4e9bac32605e4d2dd4bbc6df56365988b4815c4a && \ | ||
sed -i 's#"type": logtype,#"reason": logtype,#g' log4pot.py && \ | ||
poetry install && \ | ||
setcap cap_net_bind_service=+ep /usr/bin/python3.8 && \ | ||
# | ||
# Setup user, groups and configs | ||
addgroup --gid 2000 log4pot && \ | ||
adduser --system --no-create-home --shell /bin/bash -uid 2000 --disabled-password --disabled-login -gid 2000 log4pot && \ | ||
chown log4pot:log4pot -R /opt/Log4Pot && \ | ||
# | ||
# Clean up | ||
apt-get purge -y build-essential \ | ||
cargo \ | ||
git \ | ||
libffi-dev \ | ||
libssl-dev \ | ||
python3-dev \ | ||
rust-all && \ | ||
apt-get autoremove -y --purge && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
# | ||
# Start log4pot | ||
STOPSIGNAL SIGINT | ||
USER log4pot:log4pot | ||
WORKDIR /opt/Log4Pot/ | ||
CMD ["/usr/bin/python3","log4pot.py","--port","8080","--log","/var/log/log4pot/log/log4pot.log","--download-dir","/var/log/log4pot/payloads/","--download-class","--download-payloads"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '2.3' | ||
|
||
networks: | ||
log4pot_local: | ||
|
||
services: | ||
|
||
# Log4pot service | ||
log4pot: | ||
build: . | ||
container_name: log4pot | ||
restart: always | ||
tmpfs: | ||
- /tmp:uid=2000,gid=2000 | ||
networks: | ||
- log4pot_local | ||
ports: | ||
- "80:8080" | ||
- "443:8080" | ||
- "8080:8080" | ||
- "9200:8080" | ||
- "25565:8080" | ||
image: "dtagdevsec/log4pot:2006" | ||
read_only: true | ||
volumes: | ||
- /data/log4pot/log:/var/log/log4pot/log | ||
- /data/log4pot/payloads:/var/log/log4pot/payloads |
Oops, something went wrong.