mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 12:32:12 +00:00
tweaking, hardening
This commit is contained in:
parent
594361a056
commit
5c403a5cce
7 changed files with 40 additions and 27 deletions
|
@ -1,8 +1,4 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER MO
|
|
||||||
|
|
||||||
# Include dist
|
|
||||||
#ADD dist/ /root/dist/
|
|
||||||
|
|
||||||
# Setup apk
|
# Setup apk
|
||||||
RUN apk -U add bash \
|
RUN apk -U add bash \
|
||||||
|
@ -11,7 +7,10 @@ RUN apk -U add bash \
|
||||||
go \
|
go \
|
||||||
procps && \
|
procps && \
|
||||||
|
|
||||||
# Setup vnclowpot
|
# Setup go, vnclowpot
|
||||||
|
export GOPATH=/opt/go/ && \
|
||||||
|
mkdir -p /opt/go/ && \
|
||||||
|
cd /opt && \
|
||||||
go get github.com/magisterquis/vnclowpot && \
|
go get github.com/magisterquis/vnclowpot && \
|
||||||
go install github.com/magisterquis/vnclowpot && \
|
go install github.com/magisterquis/vnclowpot && \
|
||||||
|
|
||||||
|
@ -22,8 +21,10 @@ RUN apk -U add bash \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del build-base \
|
apk del build-base \
|
||||||
git && \
|
git \
|
||||||
|
go && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
# Run supervisor upon container start
|
# Run supervisor upon container start
|
||||||
CMD /root/go/bin/vnclowpot -j >> /var/log/vnclowpot/vnclowpot.log
|
USER vnclowpot:vnclowpot
|
||||||
|
CMD /opt/go/bin/vnclowpot -j >> /var/log/vnclowpot/vnclowpot.log
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[](https://microbadger.com/images/dtagdevsec/vnclowpot:1710 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/vnclowpot:1710 "Get your own image badge on microbadger.com")
|
[](https://microbadger.com/images/dtagdevsec/vnclowpot:1804 "Get your own version badge on microbadger.com") [](https://microbadger.com/images/dtagdevsec/vnclowpot:1804 "Get your own image badge on microbadger.com")
|
||||||
|
|
||||||
# vnclowpot
|
# vnclowpot
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
version: '2.1'
|
version: '2.2'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
vnclowpot_local:
|
vnclowpot_local:
|
||||||
|
@ -7,12 +7,14 @@ services:
|
||||||
|
|
||||||
# vnclowpot service
|
# vnclowpot service
|
||||||
vnclowpot:
|
vnclowpot:
|
||||||
|
build: .
|
||||||
container_name: vnclowpot
|
container_name: vnclowpot
|
||||||
restart: always
|
restart: always
|
||||||
networks:
|
networks:
|
||||||
- vnclowpot_local
|
- vnclowpot_local
|
||||||
ports:
|
ports:
|
||||||
- "5900:5900"
|
- "5900:5900"
|
||||||
image: "dtagdevsec/vnclowpot:1710"
|
image: "dtagdevsec/vnclowpot:1804"
|
||||||
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/vnclowpot/log:/var/log/vnclowpot
|
- /data/vnclowpot/log:/var/log/vnclowpot
|
||||||
|
|
|
@ -1,23 +1,32 @@
|
||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER MO
|
|
||||||
|
|
||||||
# Setup env and apt
|
# Setup env and apt
|
||||||
RUN apk -U upgrade && \
|
RUN apk -U upgrade && \
|
||||||
apk add bash build-base git nodejs nodejs-npm openssh-client python procps && \
|
apk add bash \
|
||||||
|
build-base \
|
||||||
|
git \
|
||||||
|
nodejs \
|
||||||
|
nodejs-npm \
|
||||||
|
openssh-client \
|
||||||
|
python \
|
||||||
|
procps && \
|
||||||
|
|
||||||
# Setup user
|
# Setup user
|
||||||
addgroup -g 2000 wetty && \
|
addgroup -g 2000 wetty && \
|
||||||
adduser -S -s /bin/bash -u 2000 -D -g 2000 wetty && \
|
adduser -S -s /bin/bash -u 2000 -D -g 2000 wetty && \
|
||||||
|
|
||||||
# Get and install packages
|
# Get and install packages
|
||||||
mkdir -p /app/ && \
|
mkdir -p /opt/ && \
|
||||||
cd /app/ && \
|
cd /opt/ && \
|
||||||
npm install https://github.com/t3chn0m4g3/wetty && \
|
npm install https://github.com/t3chn0m4g3/wetty && \
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
apk del build-base git nodejs-npm python
|
apk del --purge build-base \
|
||||||
|
git \
|
||||||
|
nodejs-npm \
|
||||||
|
python
|
||||||
|
|
||||||
# Start elasticsearch-head
|
# Start elasticsearch-head
|
||||||
WORKDIR /app
|
WORKDIR /opt
|
||||||
USER wetty
|
USER wetty:wetty
|
||||||
CMD /usr/bin/node /app/node_modules/wetty/app.js -p 64300 --host 127.0.0.1 --sshhost 127.0.0.1 --sshport 64295 --sshuser $MY_SSHUSER
|
CMD /usr/bin/node /opt/node_modules/wetty/app.js -p 64300 --host 127.0.0.1 --sshhost 127.0.0.1 --sshport 64295 --sshuser $MY_SSHUSER
|
||||||
|
|
|
@ -6,9 +6,11 @@ services:
|
||||||
|
|
||||||
# Wetty service
|
# Wetty service
|
||||||
wetty:
|
wetty:
|
||||||
|
build: .
|
||||||
container_name: wetty
|
container_name: wetty
|
||||||
restart: always
|
restart: always
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
env_file:
|
env_file:
|
||||||
- /opt/tpot/etc/compose/wetty_environment
|
- /opt/tpot/etc/compose/wetty_environment
|
||||||
image: "dtagdevsec/wetty:1710"
|
image: "dtagdevsec/wetty:1804"
|
||||||
|
read_only: true
|
||||||
|
|
|
@ -219,6 +219,5 @@ services:
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
env_file:
|
env_file:
|
||||||
- /opt/tpot/etc/compose/wetty_environment
|
- /opt/tpot/etc/compose/wetty_environment
|
||||||
ports:
|
image: "dtagdevsec/wetty:1804"
|
||||||
- "64300:64300"
|
read_only: true
|
||||||
image: "dtagdevsec/wetty:1710"
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- /data/p0f/log:/var/log/p0f
|
- /data/p0f/log:/var/log/p0f
|
||||||
|
|
||||||
# Vnclowpot service
|
# vnclowpot service
|
||||||
vnclowpot:
|
vnclowpot:
|
||||||
container_name: vnclowpot
|
container_name: vnclowpot
|
||||||
restart: always
|
restart: always
|
||||||
|
@ -322,7 +322,8 @@ services:
|
||||||
- vnclowpot_local
|
- vnclowpot_local
|
||||||
ports:
|
ports:
|
||||||
- "5900:5900"
|
- "5900:5900"
|
||||||
image: "dtagdevsec/vnclowpot:1710"
|
image: "dtagdevsec/vnclowpot:1804"
|
||||||
|
read_only: true
|
||||||
volumes:
|
volumes:
|
||||||
- /data/vnclowpot/log:/var/log/vnclowpot
|
- /data/vnclowpot/log:/var/log/vnclowpot
|
||||||
|
|
||||||
|
@ -333,6 +334,5 @@ services:
|
||||||
network_mode: "host"
|
network_mode: "host"
|
||||||
env_file:
|
env_file:
|
||||||
- /opt/tpot/etc/compose/wetty_environment
|
- /opt/tpot/etc/compose/wetty_environment
|
||||||
ports:
|
image: "dtagdevsec/wetty:1804"
|
||||||
- "64300:64300"
|
read_only: true
|
||||||
image: "dtagdevsec/wetty:1710"
|
|
||||||
|
|
Loading…
Reference in a new issue