add h0neytr4p honeypot

This commit is contained in:
t3chn0m4g3
2024-11-12 21:51:39 +01:00
parent 4bedb8d39b
commit 817fac6b45
18 changed files with 389 additions and 190 deletions

View File

@ -0,0 +1,30 @@
FROM golang:1.21-alpine AS builder
WORKDIR /app
#
RUN apk -U add git openssl
RUN git clone https://github.com/t3chn0m4g3/h0neytr4p -b v0.32 /app
RUN go mod download
RUN go mod tidy
RUN go build -o /app/main
RUN openssl req \
-nodes \
-x509 \
-sha512 \
-newkey rsa:4096 \
-keyout "app.key" \
-out "app.crt" \
-days 3650 \
-subj '/C=AU/ST=Some-State/O=Internet Widgits Pty Ltd'
RUN chmod 444 app.key app.crt
#
FROM scratch
#
COPY --from=builder /app/main /opt/h0neytr4p/h0neytr4p
COPY --from=builder /app/traps /opt/h0neytr4p/traps
COPY --from=builder /app/app.key /opt/h0neytr4p/
COPY --from=builder /app/app.crt /opt/h0neytr4p/
#
WORKDIR /opt/h0neytr4p
USER 2000:2000
CMD ["-cert=app.crt", "-key=app.key", "-log=log/log.json", "-catchall=false", "-payload=/data/h0neytr4p/payloads/", "-wildcard=true", "-traps=traps/"]
ENTRYPOINT ["./h0neytr4p"]

View File

@ -0,0 +1,22 @@
networks:
h0neytr4p_local:
services:
# H0neytr4p service
h0neytr4p:
build: .
container_name: h0neytr4p
restart: always
# cpu_count: 1
# cpus: 0.25
networks:
- h0neytr4p_local
ports:
- "80:80"
- "443:443"
image: "dtagdevsec/h0neytr4p:24.04"
read_only: true
volumes:
- $HOME/tpotce/data/h0neytr4p/log/:/opt/h0neytr4p/log/
- $HOME/tpotce/data/h0neytr4p/payloads/:/data/h0neytr4p/payloads/