-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a98b447
commit b033961
Showing
7 changed files
with
344 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM alpine:3.14 | ||
# | ||
# Install packages | ||
RUN apk -U add \ | ||
build-base \ | ||
cargo \ | ||
git \ | ||
libcap \ | ||
libffi-dev \ | ||
openssl-dev \ | ||
python3 \ | ||
python3-dev \ | ||
rust && \ | ||
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing poetry && \ | ||
# | ||
# 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 && \ | ||
sed -i 's#"type": logtype,#"reason": logtype,#g' log4pot.py && \ | ||
poetry install && \ | ||
setcap cap_net_bind_service=+ep /usr/bin/python3.9 && \ | ||
# | ||
# Setup user, groups and configs | ||
addgroup -g 2000 log4pot && \ | ||
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 log4pot && \ | ||
chown log4pot:log4pot -R /opt/Log4Pot && \ | ||
# | ||
# Clean up | ||
apk del --purge build-base \ | ||
git \ | ||
python3-dev && \ | ||
rm -rf /root/* && \ | ||
rm -rf /var/cache/apk/* | ||
# | ||
# Start log4pot | ||
STOPSIGNAL SIGINT | ||
USER log4pot:log4pot | ||
WORKDIR /opt/Log4Pot/ | ||
CMD ["/usr/bin/python3","log4pot.py","--port","8080","--log","/var/log/log4pot/log4pot.log"] |
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,23 @@ | ||
version: '2.3' | ||
|
||
networks: | ||
log4pot_local: | ||
|
||
services: | ||
|
||
# Log4pot service | ||
log4pot: | ||
build: . | ||
container_name: log4pot | ||
restart: always | ||
networks: | ||
- log4pot_local | ||
ports: | ||
- "80:8080" | ||
- "443:8080" | ||
- "8080:8080" | ||
- "9200:8080" | ||
image: "dtagdevsec/log4pot:2006" | ||
read_only: true | ||
volumes: | ||
- /data/log4pot/log:/var/log/log4pot |
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,237 @@ | ||
# T-Pot (Log4j) | ||
# Do not erase ports sections, these are used by /opt/tpot/bin/rules.sh to setup iptables ACCEPT rules for NFQ (honeytrap / glutton) | ||
version: '2.3' | ||
|
||
networks: | ||
cyberchef_local: | ||
log4pot_local: | ||
ewsposter_local: | ||
spiderfoot_local: | ||
|
||
services: | ||
|
||
################## | ||
#### Honeypots | ||
################## | ||
|
||
# Log4pot service | ||
log4pot: | ||
container_name: log4pot | ||
restart: always | ||
networks: | ||
- log4pot_local | ||
ports: | ||
- "80:8080" | ||
- "443:8080" | ||
- "8080:8080" | ||
- "9200:8080" | ||
image: "dtagdevsec/log4pot:2006" | ||
read_only: true | ||
volumes: | ||
- /data/log4pot/log:/var/log/log4pot | ||
|
||
# Honeytrap service | ||
honeytrap: | ||
container_name: honeytrap | ||
restart: always | ||
tmpfs: | ||
- /tmp/honeytrap:uid=2000,gid=2000 | ||
network_mode: "host" | ||
cap_add: | ||
- NET_ADMIN | ||
image: "dtagdevsec/honeytrap:2006" | ||
read_only: true | ||
volumes: | ||
- /data/honeytrap/attacks:/opt/honeytrap/var/attacks | ||
- /data/honeytrap/downloads:/opt/honeytrap/var/downloads | ||
- /data/honeytrap/log:/opt/honeytrap/var/log | ||
|
||
|
||
################## | ||
#### NSM | ||
################## | ||
|
||
# Fatt service | ||
fatt: | ||
container_name: fatt | ||
restart: always | ||
network_mode: "host" | ||
cap_add: | ||
- NET_ADMIN | ||
- SYS_NICE | ||
- NET_RAW | ||
image: "dtagdevsec/fatt:2006" | ||
volumes: | ||
- /data/fatt/log:/opt/fatt/log | ||
|
||
# P0f service | ||
p0f: | ||
container_name: p0f | ||
restart: always | ||
network_mode: "host" | ||
image: "dtagdevsec/p0f:2006" | ||
read_only: true | ||
volumes: | ||
- /data/p0f/log:/var/log/p0f | ||
|
||
# Suricata service | ||
suricata: | ||
container_name: suricata | ||
restart: always | ||
environment: | ||
# For ET Pro ruleset replace "OPEN" with your OINKCODE | ||
- OINKCODE=OPEN | ||
network_mode: "host" | ||
cap_add: | ||
- NET_ADMIN | ||
- SYS_NICE | ||
- NET_RAW | ||
image: "dtagdevsec/suricata:2006" | ||
volumes: | ||
- /data/suricata/log:/var/log/suricata | ||
|
||
|
||
################## | ||
#### Tools | ||
################## | ||
|
||
# Cyberchef service | ||
cyberchef: | ||
container_name: cyberchef | ||
restart: always | ||
networks: | ||
- cyberchef_local | ||
ports: | ||
- "127.0.0.1:64299:8000" | ||
image: "dtagdevsec/cyberchef:2006" | ||
read_only: true | ||
|
||
#### ELK | ||
## Elasticsearch service | ||
elasticsearch: | ||
container_name: elasticsearch | ||
restart: always | ||
environment: | ||
- bootstrap.memory_lock=true | ||
# - ES_JAVA_OPTS=-Xms2048m -Xmx2048m | ||
- ES_TMPDIR=/tmp | ||
cap_add: | ||
- IPC_LOCK | ||
ulimits: | ||
memlock: | ||
soft: -1 | ||
hard: -1 | ||
nofile: | ||
soft: 65536 | ||
hard: 65536 | ||
# mem_limit: 4g | ||
ports: | ||
- "127.0.0.1:64298:9200" | ||
image: "dtagdevsec/elasticsearch:2006" | ||
volumes: | ||
- /data:/data | ||
|
||
## Kibana service | ||
kibana: | ||
container_name: kibana | ||
restart: always | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
ports: | ||
- "127.0.0.1:64296:5601" | ||
image: "dtagdevsec/kibana:2006" | ||
|
||
## Logstash service | ||
logstash: | ||
container_name: logstash | ||
restart: always | ||
# environment: | ||
# - LS_JAVA_OPTS=-Xms2048m -Xmx2048m | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
env_file: | ||
- /opt/tpot/etc/compose/elk_environment | ||
image: "dtagdevsec/logstash:2006" | ||
volumes: | ||
- /data:/data | ||
|
||
## Elasticsearch-head service | ||
head: | ||
container_name: head | ||
restart: always | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
ports: | ||
- "127.0.0.1:64302:9100" | ||
image: "dtagdevsec/head:2006" | ||
read_only: true | ||
|
||
# Ewsposter service | ||
ewsposter: | ||
container_name: ewsposter | ||
restart: always | ||
networks: | ||
- ewsposter_local | ||
environment: | ||
- EWS_HPFEEDS_ENABLE=false | ||
- EWS_HPFEEDS_HOST=host | ||
- EWS_HPFEEDS_PORT=port | ||
- EWS_HPFEEDS_CHANNELS=channels | ||
- EWS_HPFEEDS_IDENT=user | ||
- EWS_HPFEEDS_SECRET=secret | ||
- EWS_HPFEEDS_TLSCERT=false | ||
- EWS_HPFEEDS_FORMAT=json | ||
env_file: | ||
- /opt/tpot/etc/compose/elk_environment | ||
image: "dtagdevsec/ewsposter:2006" | ||
volumes: | ||
- /data:/data | ||
- /data/ews/conf/ews.ip:/opt/ewsposter/ews.ip | ||
|
||
# Nginx service | ||
nginx: | ||
container_name: nginx | ||
restart: always | ||
environment: | ||
### If set to YES all changes within Heimdall will remain for the next start | ||
### Make sure to uncomment the corresponding volume statements below, or the setting will prevent a successful start of T-Pot. | ||
- HEIMDALL_PERSIST=NO | ||
tmpfs: | ||
- /var/tmp/nginx/client_body | ||
- /var/tmp/nginx/proxy | ||
- /var/tmp/nginx/fastcgi | ||
- /var/tmp/nginx/uwsgi | ||
- /var/tmp/nginx/scgi | ||
- /run | ||
- /var/log/php7/ | ||
- /var/lib/nginx/tmp:uid=100,gid=82 | ||
- /var/lib/nginx/html/storage/logs:uid=100,gid=82 | ||
- /var/lib/nginx/html/storage/framework/views:uid=100,gid=82 | ||
network_mode: "host" | ||
ports: | ||
- "64297:64297" | ||
- "127.0.0.1:64304:64304" | ||
image: "dtagdevsec/nginx:2006" | ||
read_only: true | ||
volumes: | ||
- /data/nginx/cert/:/etc/nginx/cert/:ro | ||
- /data/nginx/conf/nginxpasswd:/etc/nginx/nginxpasswd:ro | ||
- /data/nginx/log/:/var/log/nginx/ | ||
### Enable the following volumes if you set HEIMDALL_PERSIST=YES | ||
# - /data/nginx/heimdall/database:/var/lib/nginx/html/database | ||
# - /data/nginx/heimdall/storage:/var/lib/nginx/html/storage | ||
|
||
# Spiderfoot service | ||
spiderfoot: | ||
container_name: spiderfoot | ||
restart: always | ||
networks: | ||
- spiderfoot_local | ||
ports: | ||
- "127.0.0.1:64303:8080" | ||
image: "dtagdevsec/spiderfoot:2006" | ||
volumes: | ||
- /data/spiderfoot/spiderfoot.db:/home/spiderfoot/spiderfoot.db |
Oops, something went wrong.