一,第一种方法https://yq.aliyun.com/articles/392446/
1、首先我不是用官网上的软件包安装的而是直接去github上找代码编译安装的
下载
git clone https://github.com/rapid7/metasploit-framework.git
cd metasploit-framework
2、安装ruby
sudo apt-get install ruby
3、安装bundle
gem install bundle
4、安装各种依赖
bundle install
在安装的时候会碰到各种依赖问题,缺什么安装什么。
注意:个人在使用上述方法时遇到
“# bundler install
Traceback (most recent call last):
1: from /usr/local/bin/bundler:23:in `<main>'
/usr/local/bin/bundler:23:in `load': cannot load such file -- /usr/share/rubygems-integration/all/gems/bundler-1.16.1/exe/bundler (LoadError)
”
各种修改,源代码,最后都是相同错误,所以个人这种方法没有安装成功
二、第二种方法,通过官网的方法进行安装
metsploit官网:https://www.metasploit.com/
官网中linux系统的安装方法:https://github.com/rapid7/metasploit-framework/wiki/Nightly-Installers
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall
注:在使用改方法的时候,遇到问题是“curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443 ”
各种百度进行解决,有的说是代理问题,修改代理,有的说是nss问题,修改nss,有的说是openssl问题,进行修改。最终还是该问题没有解决,也安装失败
三、从官网下载安装包进行安装https://jingyan.baidu.com/article/3c48dd3494cd1ce10be358e8.html
下载网址:https://github.com/rapid7/metasploit-framework/wiki/Downloads-by-Version
根据个人需求进行下载
个人下载:metasploit-4.17.1-linux-x64-installer.run
chmod 加x权限,然后执行./metasploit-4.17.1-linux-x64-installer.run
是图形化界面安装,根据提示,等待最后安装成功。