ubuntu下安装metasploit

前端之家收集整理的这篇文章主要介绍了ubuntu下安装metasploit前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

Metasploit是一款非常优秀/流行的渗透测试框架,介绍一下它在ubuntu下的安装


1 安装Metasploit

  1. curlhttps://raw.githubusercontent.com/rapid7/Metasploit-omnibus/master/config/templates/Metasploit-framework-wrappers/msfupdate.erb>msfinstall
  2. chmod755msfinstall
  3. ./msfinstall

以上的三条命令,在Metasploit官网上就这样提供的。


2 安装postgresql数据库

  1. apt-getinstallpostgresql
  2. su-postgres
  3. psql

Metasploit会使用到postgres sql数据库,因此需要进行安装。


3msf的启动

  1. msfconsole

首次进入msf后会提示建立数据库,建立一个名为msf的数据库


4 连接数据库

  1. db_connectpostgres:postgres@127.0.0.1/msf
  2. db_status

db_connect是用于连接postgres数据库,这里命令的结构如下:

db_connect postgres用户名:postgres密码@主机地址/数据库

db_status用于查看连接数据库的状态


在安装Metasploit或postgres sql时,可能会报错,报错如下:

  1. Unabletolocatepackage

如果报该错误的话,那么执行以下的命令

  1. sudoapt-getupdate


在安装完postgres sql后会自动创建一个用户postgres,默认是没有密码的,可以通过如下命令修改postgres sql的密码

  1. xxx@ubuntu:~$su-postgres
  2. Password:
  3. su:Authenticationfailure
  4.  
  5. $sudopasswdpostgres
  6. EnternewUNIXpassword:
  7. RetypenewUNIXpassword:
  8. passwd:passwordupdatedsuccessfull

猜你在找的Ubuntu相关文章