mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 01:27:27 -04:00
tweaking
multi stage build for dicompot rebuild fatt, glutton, hellpot, honeypots for alpine 3.19 bump glutton, hellpot, honeypots to latest master
This commit is contained in:
@ -1,46 +1,41 @@
|
||||
FROM alpine:3.17
|
||||
FROM golang:1.21-alpine as builder
|
||||
#
|
||||
# Include dist
|
||||
COPY dist/ /root/dist/
|
||||
#
|
||||
# Setup apk
|
||||
RUN apk -U --no-cache add \
|
||||
build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
build-base \
|
||||
git \
|
||||
g++ && \
|
||||
#
|
||||
# Setup go, hellpot
|
||||
cd /root && \
|
||||
export GOPATH=/opt/go/ && \
|
||||
mkdir -p /opt/hellpot && \
|
||||
mkdir -p /opt/go && \
|
||||
git clone https://github.com/yunginnanet/HellPot && \
|
||||
cd HellPot && \
|
||||
git checkout 49433bf499b6af314786cbbc3cb8566cdb18c40c && \
|
||||
git checkout 3673ab0228664fb3acd33102be5c7a5867137eb5 && \
|
||||
# git checkout 49433bf499b6af314786cbbc3cb8566cdb18c40c && \
|
||||
sed -i 's#logFileName := "HellPot"#logFileName := "hellpot"#g' internal/config/logger.go && \
|
||||
go build cmd/HellPot/HellPot.go && \
|
||||
mv /root/HellPot/HellPot /opt/hellpot/ && \
|
||||
go mod download && \
|
||||
go vet -v ./... && \
|
||||
go test -v ./... && \
|
||||
export CGO_ENABLED=0 && \
|
||||
export VERSION=`git tag --sort=-version:refname | head -n 1` && \
|
||||
go build -trimpath \
|
||||
-ldflags "-s -w -X main.version=$VERSION" \
|
||||
cmd/HellPot/HellPot.go
|
||||
#
|
||||
FROM alpine:3.19
|
||||
#
|
||||
COPY --from=builder /root/HellPot/HellPot /opt/hellpot/
|
||||
COPY --from=builder /root/dist/config.toml /opt/hellpot/config/
|
||||
#
|
||||
# Setup user, groups and configs
|
||||
addgroup -g 2000 hellpot && \
|
||||
RUN addgroup -g 2000 hellpot && \
|
||||
adduser -S -s /bin/ash -u 2000 -D -g 2000 hellpot && \
|
||||
mkdir -p /var/log/hellpot && \
|
||||
# Hellpot wants to create .config folder always in user's home
|
||||
mkdir -p /home/hellpot/.config/HellPot/logs && \
|
||||
mv /root/dist/config.toml /home/hellpot/.config/HellPot/ && \
|
||||
chown hellpot:hellpot -R /home/hellpot && \
|
||||
#
|
||||
# Clean up
|
||||
apk del --purge build-base \
|
||||
git \
|
||||
go \
|
||||
g++ && \
|
||||
rm -rf /var/cache/apk/* \
|
||||
/opt/go \
|
||||
/root/*
|
||||
mkdir -p /var/log/hellpot
|
||||
#
|
||||
# Start hellpot
|
||||
WORKDIR /opt/hellpot
|
||||
USER hellpot:hellpot
|
||||
CMD ["./HellPot"]
|
||||
CMD ["./HellPot", "-c","config/config.toml"]
|
||||
|
68
docker/hellpot/dist/config.toml
vendored
68
docker/hellpot/dist/config.toml
vendored
@ -7,6 +7,9 @@
|
||||
bind_addr = "0.0.0.0"
|
||||
bind_port = "8080"
|
||||
|
||||
# header name containing clients real IP, for reverse proxy deployments
|
||||
real_ip_header = 'X-Real-IP'
|
||||
|
||||
# this contains a list of blacklisted useragent strings. (case sensitive)
|
||||
# clients with useragents containing any of these strings will receive "Not found" for any requests.
|
||||
uagent_string_blacklist = ["Cloudflare-Traffic-Manager", "curl"]
|
||||
@ -22,14 +25,73 @@
|
||||
# Toggling this to false will prevent creation of robots.txt handler.
|
||||
makerobots = true
|
||||
# Handlers will be created for these paths, as well as robots.txt entries. Only valid if catchall = false.
|
||||
paths = ["wp-json/omapp/v1/support", "wp-login.php", "wp-login"]
|
||||
|
||||
paths = [
|
||||
"wp-json/omapp/v1/support",
|
||||
"wp-login.php",
|
||||
"wp-login",
|
||||
"admin",
|
||||
"admin.php",
|
||||
"admin/login.php",
|
||||
"admin/login",
|
||||
"admin.asp",
|
||||
"admin.aspx",
|
||||
"wp-admin",
|
||||
"login",
|
||||
"xmlrpc.php",
|
||||
".env",
|
||||
"config.php",
|
||||
"config.yaml",
|
||||
"config.json",
|
||||
"db.php",
|
||||
"db.yaml",
|
||||
"db.json",
|
||||
"admin.yaml",
|
||||
"admin.json",
|
||||
"user.yaml",
|
||||
"user.json",
|
||||
"site.yaml",
|
||||
"site.json",
|
||||
"mysql.php",
|
||||
"mysql.yaml",
|
||||
"mysql.json",
|
||||
"mongodb.php",
|
||||
"mongodb.yaml",
|
||||
"mongodb.json",
|
||||
"sql.php",
|
||||
"sql.yaml",
|
||||
"sql.json",
|
||||
"install.php",
|
||||
"setup.php",
|
||||
"main.php",
|
||||
"test.php",
|
||||
"README.md",
|
||||
"LICENSE",
|
||||
".git",
|
||||
".htaccess",
|
||||
".htpasswd",
|
||||
"server-status",
|
||||
"phpinfo.php",
|
||||
"info.php",
|
||||
"env",
|
||||
"config/",
|
||||
"admin/config/",
|
||||
"admin.php/config/",
|
||||
"admin.asp/config/",
|
||||
"admin.aspx/config/",
|
||||
"phpmyadmin",
|
||||
"pma",
|
||||
"dbadmin",
|
||||
"mysql",
|
||||
"myadmin",
|
||||
"phpmyadmin2"
|
||||
]
|
||||
|
||||
[logger]
|
||||
# verbose (-v)
|
||||
debug = true
|
||||
# extra verbose (-vv)
|
||||
trace = false
|
||||
# JSON log files will be storn in the below directory.
|
||||
# JSON log files will be stored in the below directory.
|
||||
directory = "/var/log/hellpot/"
|
||||
# disable all color in console output. when using Windows this will default to true.
|
||||
nocolor = true
|
||||
|
@ -19,4 +19,4 @@ services:
|
||||
image: "dtagdevsec/hellpot:alpha"
|
||||
read_only: true
|
||||
volumes:
|
||||
- /data/hellpot/log:/var/log/hellpot
|
||||
- $HOME/tpotce/data/hellpot/log:/var/log/hellpot
|
||||
|
Reference in New Issue
Block a user