Install Metasploit On Ubuntu 15.10

发布 : 2016-11-09 分类 : Tools 浏览 :

1、准备Ubuntu的基本环境

1
2
apt-get update
apt-get upgrade

安装基础依赖包

1
apt-get install build-essential libreadline-dev libssl-dev libpq5 libpq-dev libreadline5 libsqlite3-dev libpcap-dev openjdk-7-jre git-core autoconf postgresql pgadmin3 curl zlib1g-dev libxml2-dev libxslt1-dev vncviewer libyaml-dev curl zlib1g-dev

2、安装Ruby

1⃣️通过 rbenv 的方式进行安装,两步,先安装 rbenv,之后安装 ruby-build 这是链接

1
2
3
4
5
6
7
8
9
10
11
12
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL

git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
exec $SHELL

rbenv install 2.3.1
rbenv global 2.3.1
ruby -v

2⃣️通过 rvm 的方式进行安装

1
2
3
4
5
6
7
curl -L https://get.rvm.io | bash -s stable 
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
source ~/.bashrc
rvm install 2.1.6
rvm use 2.1.6 --default
ruby -v

3、安装Nmap Nmap官网

1⃣️安装 alien

apt-get install alien

Download Nmap RPM Package

1
2
alien nmap-5.21-1.x86_64.rpm
dpkg --install nmap_5.21-2_amd64.deb

4、配置Postgre SQL Server

1
2
3
4
5
sudo -s
su postgres
createuser msf -P -S -R -D
createdb msf -O msf msf
exit

-P 使用密码
-S 不是超级管理员
-R 不允许创建新角色
-D 不允许创建数据库

5、安装Metasploit

1
2
3
4
5
6
7
8
9
10
cd /opt/
git clone https://github.com/rapid7/metasploit-framework.git
chown -R `whoami` /opt/metasploit-framework
cd metasploit-framework
rvm --default use [email protected]
gem install bundler
bundle install
cd metasploit-framework
bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'
vim /opt/metasploit-framework/config/database.yml
1
2
3
4
5
6
7
8
9
production: 
adapter: postgresql
database: msf
username: msf
password:
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5

First Run

msfconsole

本文作者 : Shiyf
原文链接 : https://www.shiyf.me/passages/Install Metasploit On Ubuntu15.04/
版权声明 : 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明出处!

知识 & 情怀 | 二者兼得

微信扫一扫, 向我投食

微信扫一扫, 向我投食

支付宝扫一扫, 向我投食

支付宝扫一扫, 向我投食

留下足迹