├── msf_root.sh ├── README.md └── msf_vps_installer.sh /msf_root.sh: -------------------------------------------------------------------------------- 1 | cd /var 2 | touch swap.img 3 | chmod 600 swap.img 4 | dd if=/dev/zero of=/var/swap.img bs=1024k count=2000 5 | mkswap /var/swap.img 6 | swapon /var/swap.img 7 | 8 | cd ~ 9 | 10 | apt-get-update 11 | 12 | apt-get -y install screen autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev ruby-dev 13 | 14 | git clone https://github.com/rapid7/metasploit-framework.git 15 | 16 | curl -sSL https://rvm.io/mpapis.asc | gpg --import - 17 | curl -L https://get.rvm.io | bash -s stable 18 | source /etc/profile.d/rvm.sh 19 | echo "source /etc/profile.d/rvm.sh" >> /root/.profile 20 | cd metasploit-framework 21 | rvm install ruby-2.3.3 22 | cd .. 23 | cd metasploit-framework 24 | gem install bundler 25 | bundle install 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Metasploit installer for Debian (Jessie) VPS. 2 | 3 | Metasploit installer for Debian (Jessie) VPS, works out of the box on new 8.5 Debian servers. 4 | 5 | Do not run as root, RVM bundle will not work. Add a user, login with that user, and then run this script. 6 | Metasploit requires the following packages: 7 | 8 | autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev 9 | 10 | ## Instructions 11 | ``` 12 | adduser msfdev 13 | adduser msfdev sudo 14 | apt-get update 15 | apt-get -y install autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev 16 | 17 | su - msfdev 18 | wget https://raw.githubusercontent.com/iam1980/metasploit-vps-installer/master/msf_vps_installer.sh 19 | bash msf_vps_installer.sh 20 | ``` 21 | 22 | YMMV! 23 | https://medium.com/@iraklis 24 | 25 | -------------------------------------------------------------------------------- /msf_vps_installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Metasploit installer for Debian (Jessie) VPS. 4 | # works out of the box on new 8.5 Debian servers. 5 | # 6 | # Do not run as root, RVM bundle will not work. Add a user, login with that user, and then run this script. 7 | # Metasploit requires the following packages: 8 | # 9 | # apt-get -y install autoconf bison build-essential curl git-core libapr1 libaprutil1 libcurl4-openssl-dev libgmp3-dev libpcap-dev libpq-dev libreadline6-dev libsqlite3-dev libssl-dev libsvn1 libtool libxml2 libxml2-dev libxslt-dev libyaml-dev locate ncurses-dev openssl wget xsel zlib1g zlib1g-dev 10 | # 11 | # YMMV! 12 | # https://medium.com/@iraklis 13 | 14 | PURPLE='\033[1;35m' 15 | NC='\033[0m' 16 | 17 | cd ~ 18 | 19 | echo -e "${PURPLE}Cloning Metasploit from GitHub${NC}" 20 | echo -e "${PURPLE}------------------------------${NC} \n" 21 | 22 | git clone https://github.com/rapid7/metasploit-framework.git 23 | 24 | 25 | echo -e "${PURPLE}Installing RVM, this might take a while (5-10 mins)${NC}" 26 | echo -e "${PURPLE}---------------------------------------------------${NC} \n" 27 | 28 | curl -sSL https://rvm.io/mpapis.asc | gpg --import - 29 | curl -L https://get.rvm.io | bash -s stable 30 | source ~/.rvm/scripts/rvm 31 | cd ~/metasploit-framework 32 | echo -e "${PURPLE}Now we wait...${NC}" 33 | rvm install ruby-2.3.3 34 | gem install bundler 35 | bundle install 36 | 37 | 38 | echo -e "${PURPLE}All done. ${NC}" 39 | --------------------------------------------------------------------------------