云网牛站
所在位置:首页 > Linux教程 > 在Ubuntu 18.04/Debian 9上安装Metasploit Framework

在Ubuntu 18.04/Debian 9上安装Metasploit Framework

2019-01-08 11:13:10作者:吴析稿源:云网牛站

在本文中,我们将介绍如何在Ubuntu 18.04/Debian 9上安装Metasploit Framework,包括启动msfconsole及更新的方法。

 

简介

Metasploit Framework是一个开源项目,提供基础结构,内容和工具来执行广泛的安全审计和渗透测试。Metasploit的商业版本适用于喜欢使用网络界面进行测试的用户。

 

Metasploit Framework运行要求

需要:PostgreSQL数据库服务器-由Metasploit用于存储项目中的数据、Ruby on Rails、Metasploit服务。

在Ubuntu 18.04/Debian 9上运行Metasploit Framework的最低硬件要求:2GHz+处理器、可用4GB RAM(建议8GB)、1GB可用磁盘空间(建议50GB)、64位版本的Ubuntu 18.04/Debian 9。

 

在Ubuntu 18.04/Debian 9上安装Metasploit Framework的方法

安装Metasploit Framework最简单方法是从Metasploit程序安装,此安装程序附带运行Metasploit Framework所需的所有依赖项和工具。

1、通过在终端中运行以下命令下载Metasploit安装程序:

curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall

2、下载脚本后,将其设为可执行文件:

chmod 755 msfinstall

3、然后执行:

# ./msfinstall

Adding metasploit-framework to your repository list..OK

Updating package cache..OK

Checking for and installing update..

Reading package lists… Done

Building dependency tree       

Reading state information… Done

The following NEW packages will be installed:

metasploit-framework

0 upgraded, 1 newly installed, 0 to remove and 122 not upgraded.

Need to get 169 MB of archives.

After this operation, 397 MB of additional disk space will be used.

Get:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid/main amd64 metasploit-framework amd64 4.17.35+20190105104028~1rapid7-1 [169 MB]

Fetched 169 MB in 4s (42.3 MB/s)               

debconf: delaying package configuration, since apt-utils is not installed

Selecting previously unselected package metasploit-framework.

(Reading database … 34892 files and directories currently installed.)

Preparing to unpack …/metasploit-framework_4.17.35+20190105104028~1rapid7-1_amd64.deb …

Unpacking metasploit-framework (4.17.35+20190105104028~1rapid7-1) …

Setting up metasploit-framework (4.17.35+20190105104028~1rapid7-1) …

update-alternatives: using /opt/metasploit-framework/bin/msfbinscan to provide /usr/bin/msfbinscan (msfbinscan) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfconsole to provide /usr/bin/msfconsole (msfconsole) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfd to provide /usr/bin/msfd (msfd) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfdb to provide /usr/bin/msfdb (msfdb) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfelfscan to provide /usr/bin/msfelfscan (msfelfscan) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfmachscan to provide /usr/bin/msfmachscan (msfmachscan) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfpescan to provide /usr/bin/msfpescan (msfpescan) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfrop to provide /usr/bin/msfrop (msfrop) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfrpc to provide /usr/bin/msfrpc (msfrpc) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfrpcd to provide /usr/bin/msfrpcd (msfrpcd) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfupdate to provide /usr/bin/msfupdate (msfupdate) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/msfvenom to provide /usr/bin/msfvenom (msfvenom) in auto mode

update-alternatives: using /opt/metasploit-framework/bin/metasploit-aggregator to provide /usr/bin/metasploit-aggregator (metasploit-aggregator) in auto mode

Run msfconsole to get started

4、创建并初始化msf数据库:

$ msfdb init

Creating database at /home/jmutai/.msf4/db

Starting database at /home/jmutai/.msf4/db…success

Creating database users

Creating initial database schema

 

启动msfconsole

1、现在该数据库已初始化,你可以启动msfconsole:

$ msfconsole

2、样本输出如下图所示:

在Ubuntu 18.04/Debian 9上安装Metasploit Framework

3、使用db_status命令验证数据库连接,如下:

msf > db_status

[*] postgresql connected to msf

msf >

 

更新Metasploit Framework的方法

1、要在Ubuntu 18.04/Debian 9系统上更新Metasploit Framework,请运行以下命令:

# msfupdate

Updating package cache..OK

Checking for and installing update..

Reading package lists… Done

Building dependency tree       

Reading state information… Done

metasploit-framework is already the newest version (4.17.35+20190105104028~1rapid7-1).

0 upgraded, 0 newly installed, 0 to remove and 123 not upgraded.

2、你可以使用以下方法检查Framework版本:

# msfconsole  --version

Framework Version: 4.17.35-dev-

 

相关主题

使用metasploit破解Tomcat密码

精选文章
热门文章