通过以下快速安装脚本导入Rapid7签名密钥并为受支持的Linux和macOS系统设置程序包:
- curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
- chmod 755 msfinstall && \
- ./msfinstall
软件包将集成到系统的包管理器中,可以使用 msfupdate 命令或包管理器进行更新
作者:
锦凡歆在酷狗直播唱歌最好听
安装过程差不多是这样的:
- bcook@localhost:~$ uname -a
- Linux localhost 3.14.0 #1 SMP PREEMPT Mon Feb 6 21:59:30 PST 2017 armv7l armv7l armv7l GNU/Linux
- bcook@localhost:~$ curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
- > chmod 755 msfinstall && \
- > ./msfinstall
- % Total % Received % Xferd Average Speed Time Time Time Current
- Dload Upload Total Spent Left Speed
- 100 5394 100 5394 0 0 5609 0 --:--:-- --:--:-- --:--:-- 5607
- Switching to root user to update the package
- [sudo] password for bcook:
- 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 2 not upgraded.
- Need to get 148 MB of archives.
- After this operation, 358 MB of additional disk space will be used.
- Get:1 http://downloads.metasploit.com/data/releases/metasploit-framework/apt lucid/main armhf metasploit-framework armhf 4.13.23+20170217143300.git.1.85dca6a~1rapid7-1 [148 MB]
- Fetched 148 MB in 19s (7743 kB/s)
- Selecting previously unselected package metasploit-framework.
- (Reading database ... 28449 files and directories currently installed.)
- Preparing to unpack .../metasploit-framework_4.13.23+20170217143300.git.1.85dca6a~1rapid7-1_armhf.deb ...
- Unpacking metasploit-framework (4.13.23+20170217143300.git.1.85dca6a~1rapid7-1) ...
- Setting up metasploit-framework (4.13.23+20170217143300.git.1.85dca6a~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
- Run msfconsole to get started
- W: --force-yes is deprecated, use one of the options starting with --allow instead.
- bcook@localhost:~$ msfconsole //启动msfconsole
- ** Welcome to Metasploit Framework Initial Setup **
- Please answer a few questions to get started.
- Would you like to use and setup a new database (recommended)? y //是否设置数据库
- Creating database at /home/bcook/.msf4/db
- Starting database at /home/bcook/.msf4/db...success
- Creating database users
- Creating initial database schema
- ** Metasploit Framework Initial Setup Complete **
- =[ metasploit v4.13.23-dev-584850f1f8a1a74b69b5cea16c700c9fd1b8e4c6]
- + -- --=[ 1622 exploits - 924 auxiliary - 282 post ]
- + -- --=[ 472 payloads - 39 encoders - 9 nops ]
- + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
- msf >
在MacOS中手动安装Metasploit
最新的OS X安装程序包也可以直接在这里下载:https://osx.metasploit.com/metasploitframework-latest.pkg
下载完后安装即可,安装完后,使用/opt/metasploit-framework/bin/msfconsole启动msfconsole。