adding the whole setup

This commit is contained in:
Michael Scalzetti 2022-11-17 12:29:46 -05:00
parent a51d8fcbb3
commit ceb8f0f543
3 changed files with 39 additions and 3 deletions

View File

@ -1,10 +1,33 @@
FROM debian:latest
RUN apt-get update && apt-get install -y curl wget gnupg2
RUN apt-get update && apt-get install -y curl wget gnupg2 git python3 python3-pip python3-venv \
ncat nmap hydra iputils-ping iproute2
# Install metasploit
RUN mkdir -p /metasploit
WORKDIR /metasploit
RUN curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod +x ./msfinstall &&\
./msfinstall && \
rm ./msfinstall
rm -rf /msfinstall
RUN useradd nroot && usermod --shell /bin/bash nroot
# Install routersploit
RUN git clone https://www.github.com/threat9/routersploit /routersploit
WORKDIR /routersploit
RUN python3 -m pip install -r requirements.txt
# Install cme
RUN python3 -m pip install pipx
RUN pipx install crackmapexec
RUN pipx ensurepath
# DL rockyou wordlist
RUN mkdir -p /wordlists
WORKDIR /wordlists
RUN curl -LOJ https://github.com/zacheller/rockyou/raw/master/rockyou.txt.tar.gz
RUN tar -xvf rockyou.txt.tar.gz
WORKDIR /
RUN useradd -m -s /bin/bash nroot

10
docker-compose.yaml Normal file
View File

@ -0,0 +1,10 @@
version: '3'
services:
metasploit:
container_name: metasploit
image: docker.scalz.cloud/metasploit
network_mode: "host"
tty: true
stdin_open: true

3
run.sh Executable file
View File

@ -0,0 +1,3 @@
docker-compose up -d --build
docker attach metasploit
docker-compose down