From ceb8f0f543da21c885fab1a2d1882bc4bf5384f4 Mon Sep 17 00:00:00 2001 From: Michael Scalzetti Date: Thu, 17 Nov 2022 12:29:46 -0500 Subject: [PATCH] adding the whole setup --- Dockerfile | 29 ++++++++++++++++++++++++++--- docker-compose.yaml | 10 ++++++++++ run.sh | 3 +++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 docker-compose.yaml create mode 100755 run.sh diff --git a/Dockerfile b/Dockerfile index 0712046..bd06042 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..964f019 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +version: '3' + +services: + metasploit: + container_name: metasploit + image: docker.scalz.cloud/metasploit + + network_mode: "host" + tty: true + stdin_open: true diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..d08dc2e --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +docker-compose up -d --build +docker attach metasploit +docker-compose down