在Linux和MacOS上安装Metasploit

通过以下快速安装脚本导入Rapid7签名密钥并为受支持的Linux和macOS系统设置程序包:

  1. curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  2.  chmod 755 msfinstall && \
  3.  ./msfinstall

软件包将集成到系统的包管理器中,可以使用 msfupdate 命令或包管理器进行更新

作者:

锦凡歆在酷狗直播唱歌最好听

安装过程差不多是这样的:

  1. bcook@localhost:~$ uname -a
  2. Linux localhost 3.14.0 #1 SMP PREEMPT Mon Feb 6 21:59:30 PST 2017 armv7l armv7l armv7l GNU/Linux
  3. bcook@localhost:~$ curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
  4. >   chmod 755 msfinstall && \
  5. >   ./msfinstall
  6.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  7.                                 Dload  Upload   Total   Spent    Left  Speed
  8. 100  5394  100  5394    0     0   5609      0 --:--:-- --:--:-- --:--:--  5607
  9. Switching to root user to update the package
  10. [sudo] password for bcook: 
  11. Adding metasploit-framework to your repository list..OK
  12. Updating package cache..OK
  13. Checking for and installing update..
  14. Reading package lists... Done
  15. Building dependency tree      
  16. Reading state information... Done
  17. The following NEW packages will be installed:
  18.  metasploit-framework
  19. 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
  20. Need to get 148 MB of archives.
  21. After this operation, 358 MB of additional disk space will be used.
  22. 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]
  23. Fetched 148 MB in 19s (7743 kB/s)                                                                                                    
  24. Selecting previously unselected package metasploit-framework.
  25. (Reading database ... 28449 files and directories currently installed.)
  26. Preparing to unpack .../metasploit-framework_4.13.23+20170217143300.git.1.85dca6a~1rapid7-1_armhf.deb ...
  27. Unpacking metasploit-framework (4.13.23+20170217143300.git.1.85dca6a~1rapid7-1) ...
  28. Setting up metasploit-framework (4.13.23+20170217143300.git.1.85dca6a~1rapid7-1) ...
  29. update-alternatives: using /opt/metasploit-framework/bin/msfbinscan to provide /usr/bin/msfbinscan (msfbinscan) in auto mode
  30. update-alternatives: using /opt/metasploit-framework/bin/msfconsole to provide /usr/bin/msfconsole (msfconsole) in auto mode
  31. update-alternatives: using /opt/metasploit-framework/bin/msfd to provide /usr/bin/msfd (msfd) in auto mode
  32. update-alternatives: using /opt/metasploit-framework/bin/msfdb to provide /usr/bin/msfdb (msfdb) in auto mode
  33. update-alternatives: using /opt/metasploit-framework/bin/msfelfscan to provide /usr/bin/msfelfscan (msfelfscan) in auto mode
  34. update-alternatives: using /opt/metasploit-framework/bin/msfmachscan to provide /usr/bin/msfmachscan (msfmachscan) in auto mode
  35. update-alternatives: using /opt/metasploit-framework/bin/msfpescan to provide /usr/bin/msfpescan (msfpescan) in auto mode
  36. update-alternatives: using /opt/metasploit-framework/bin/msfrop to provide /usr/bin/msfrop (msfrop) in auto mode
  37. update-alternatives: using /opt/metasploit-framework/bin/msfrpc to provide /usr/bin/msfrpc (msfrpc) in auto mode
  38. update-alternatives: using /opt/metasploit-framework/bin/msfrpcd to provide /usr/bin/msfrpcd (msfrpcd) in auto mode
  39. update-alternatives: using /opt/metasploit-framework/bin/msfupdate to provide /usr/bin/msfupdate (msfupdate) in auto mode
  40. update-alternatives: using /opt/metasploit-framework/bin/msfvenom to provide /usr/bin/msfvenom (msfvenom) in auto mode
  41. Run msfconsole to get started
  42. W: --force-yes is deprecated, use one of the options starting with --allow instead.
  43. bcook@localhost:~$ msfconsole  //启动msfconsole
  44. ** Welcome to Metasploit Framework Initial Setup **
  45.    Please answer a few questions to get started.
  46. Would you like to use and setup a new database (recommended)? y //是否设置数据库
  47. Creating database at /home/bcook/.msf4/db
  48. Starting database at /home/bcook/.msf4/db...success
  49. Creating database users
  50. Creating initial database schema
  51. ** Metasploit Framework Initial Setup Complete **
  52.       =[ metasploit v4.13.23-dev-584850f1f8a1a74b69b5cea16c700c9fd1b8e4c6]
  53. + -- --=[ 1622 exploits - 924 auxiliary - 282 post        ]
  54. + -- --=[ 472 payloads - 39 encoders - 9 nops             ]
  55. + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]
  56. msf >

在MacOS中手动安装Metasploit

最新的OS X安装程序包也可以直接在这里下载:https://osx.metasploit.com/metasploitframework-latest.pkg

下载完后安装即可,安装完后,使用/opt/metasploit-framework/bin/msfconsole启动msfconsole。

猜你喜欢

转载自blog.csdn.net/hyg1165269653/article/details/89542789
今日推荐