Fedora26安装metasploit
一、安装ruby:
Metasploit框架主要使用Ruby语言编写,因此需要安装Ruby环境。
直接使用yum命令安装:yum install ruby
二、安装支持包
yum install xorg-x11-server-Xvfb
三、官网下载Metasploit:
(1)使用wget命令下载安装包:
32位系统
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-installer.run
64位系统
wget http://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run
(2)下载完成后,赋予安装包最高权限:
chomd 777 metasploit-latest-linux-x64-installer.run
(3)运行安装程序:./metasploit-latest-linux-x64-installer.run
然后根据提示一直同意就好
出现上图即表示安装完毕,如果按回车没有自动结束安装,可以直接ctrl+c强行停止。
(注:默认的安装位置为/opt/metasploit)
四、检查是否安装结果:
(1)输入msfconsole启动Metasploit:
(2)输入命令 db_status查看数据库连接情况,出现以下内容即为连接成功:
如果没有连接成功,先退出msf,查看一下postgres服务是否启动:netstat -tnpl | grep postgres
上图显示是已经启动,如果没启动可以尝试启动一下服务:service start postgres
不行的话需要重新安装数据库服务:
具体解决方法,请参看下面这篇文章:
https://blog.****.net/wyvbboy/article/details/51526640
(3)使用search随便查找漏洞作为测试:
search mysql(查找mysql的漏洞):
发现有警告,而且查询速度很慢,这个问题可输入init解决:
再次查询mysql漏洞:
问题解决,查询速度很快!
---------------------------------------------------------------------------------------------------------------------------------
OK,至此Metasploit就安装成功啦!