Last active
November 2, 2017 15:34
-
-
Save staaldraad/cf31ef34f0dd52b296bb to your computer and use it in GitHub Desktop.
Metasploit in a Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:14.04 | |
MAINTAINER Etienne Stalmans, etienne@sensepost.com | |
RUN apt-get update && apt-get install -y \ | |
unzip \ | |
iptables | |
RUN apt-get install -y \ | |
build-essential \ | |
zlib1g \ | |
zlib1g-dev \ | |
libxml2 \ | |
libxml2-dev \ | |
libxslt-dev \ | |
locate \ | |
libreadline6-dev \ | |
libcurl4-openssl-dev \ | |
git-core \ | |
libssl-dev \ | |
libyaml-dev \ | |
openssl \ | |
autoconf \ | |
libtool \ | |
ncurses-dev \ | |
bison \ | |
curl \ | |
wget \ | |
xsel \ | |
postgresql \ | |
postgresql-contrib \ | |
libpq-dev \ | |
libapr1 \ | |
libaprutil1 \ | |
libsvn1 \ | |
libpcap-dev \ | |
libsqlite3-dev \ | |
libgmp3-dev | |
RUN echo "[+] Setting up Metasploit" | |
#RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - | |
RUN curl -L https://get.rvm.io | bash -s stable | |
#RUN source /usr/local/rvm/scripts/rvm | |
RUN echo "source /usr/local/rvm/scripts/rvm" >> ~/.bashrc | |
ENV PATH /usr/local/rvm/bin:$PATH | |
RUN rvm install 2.1.8 && rvm use 2.1.8 --default | |
ENV PATH /usr/local/rvm/gems/ruby-2.1.8/bin:/usr/local/rvm/gems/ruby-2.1.8@global/bin:/usr/local/rvm/rubies/ruby-2.1.8/bin:/usr/local/rvm/bin/:$PATH | |
RUN gem install bundler | |
RUN cd /opt && mkdir metasploit && cd metasploit && git clone https://github.com/rapid7/metasploit-framework.git | |
RUN cd /opt/metasploit/metasploit-framework && bundle install && ./msfupdate | |
WORKDIR /opt/metasploit/metasploit-framework | |
ENTRYPOINT ./msfconsole |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment