CentOS 7 安装 metasploit-framework

1 一键安装metasploit-framework

 
apt-get install curl,wget
curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall &&
  chmod 755 msfinstall &&
  ./msfinstall

    1
    2
    3
    4
    5

成功安装后请运行下属代码,以使下载的最新版本的msf连接数据库。

adduser msf
su msf
./msfconsole

    1
    2
    3

PS.在运行时请cd到msfconsole所在目录,应在"/opt/metasploit-framework/bin"

初次运行msf会创建数据库,但是msf默认使用的PostgreSQL数据库不能与root用户关联,这也这也就是需要新建用户msf来运行metasploit的原因所在。如果你一不小心手一抖,初次运行是在root用户下,请使用以下命令,然后使用非root用户初始化数据库。

msfdb reinit

原文地址:https://www.cnblogs.com/kofsony/p/11193922.html