-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
94 lines (82 loc) · 2.48 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# From the Kali linux base image
FROM kalilinux/kali
# Update and apt install programs
RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install -y \
exploitdb \
exploitdb-bin-sploits \
metasploit-framework \
git \
gdb \
gobuster \
hashcat \
hydra \
man-db \
minicom \
nasm \
nmap \
sqlmap \
sslscan \
wordlists \
python \
python-pip \
firefox-esr \
chromium \
openssh-server \
libcanberra-gtk-module \
curl \
sudo \
vim
# Install Chrome
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
hicolor-icon-theme \
libcanberra-gtk* \
libgl1-mesa-dri \
libgl1-mesa-glx \
libpango1.0-0 \
libpulse0 \
libv4l-0 \
fonts-symbola \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \
&& apt-get update && apt-get install -y \
google-chrome-stable \
--no-install-recommends \
# && apt-get purge --auto-remove -y curl \
&& rm -rf /var/lib/apt/lists/*
# # Add chrome user
# RUN groupadd -r chrome && useradd -r -g chrome -G audio,video chrome \
# && mkdir -p /home/chrome/Downloads && chown -R chrome:chrome /home/chrome
COPY local.conf /etc/fonts/local.conf
# Clone git repos
RUN git clone https://github.com/danielmiessler/SecLists.git /opt/seclists
RUN git clone https://github.com/PowerShellMafia/PowerSploit.git /opt/powersploit
# Other installs
RUN pip install pwntools
# Update ENV
ENV PATH=$PATH:/opt/powersploit
ENV username marco
ENV github-username metaver5o
# adding user / setting up keys
RUN useradd -ms /bin/bash ${username}
USER ${username}
RUN mkdir -p /home/${username}/.ssh/
RUN chmod 700 /home/${username}/.ssh/
RUN curl https://github.com/${github-username}.keys |head -1 > /home/${username}/.ssh/authorized_keys
RUN chmod 600 /home/${username}/.ssh/authorized_keys
# RUN touch /home/${username}/.ssh/known_hosts
RUN ssh-keyscan github.com >> /home/${username}/.ssh/known_hosts
RUN chmod go-w /home/${username}
ENV DISPLAY :0
# Set entrypoint and working directory
# WORKDIR /root/
USER root
RUN usermod -aG sudo ${username}
USER ${username}
WORKDIR /home/${username}/
# Indicate we want to expose ports 80 and 443
EXPOSE 22 80/tcp 443/tcp