metasploit-framework安装
1.一条代码就可以安装了
apt-get install metasploit-framework
2.安装完成后,首先启动postgresql数据库:
/etc/init.d/postgresql start
或者 service postgresql start
3. 设置postgresql开机自启
update-rc.d postgresql enable
4.初始化MSF数据库(关键步骤!):
msfdb init
msfdb init(默认创建数据库名:msf,msf_test,用户;msf;默认口令为零;
5.运行msfconsole:
msfconsole
Kali Linux 2020.1a系统安装后,启动msfconsole将出现如下错误:
root@kali:~# msfconsole
[*] Bundler failed to load and returned this error:
'cannot load such file -- bundler / setup'
[*] You may need to uninstall or upgrade bundler
由于默认安装的bundler的源失效,需要重新安装。:
root@kali:~# gem install bundler
执行gem install bundler后报错:
ERROR: Could not find a valid gem ‘bundler’ (>= 0), here is why:
Unable to download data from https://ruby.taobao.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)
原因是https://ruby.taobao.org/的RubyGems镜像已经不再维护了,需要更换Gem Source,这里我们直接换成Ruby China 镜像。
更换RubyGems镜像源
检查现在用的源
$ gem sources -l
添加ruby-china的源,并删除掉失效的源
$ gem sources --add https://gems.ruby-china.com/ --remove https://ruby.taobao.org/
确保只有 gems.ruby-china.com
$ gem sources -l
安装bundler
$gem install bundler