微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ubuntu下安装metasploit

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


1 安装Metasploit

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

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


2 安装postgresql数据库

apt-getinstallpostgresql
su-postgres
psql

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


3msf的启动

msfconsole

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


4 连接数据库

db_connectpostgres:postgres@127.0.0.1/msf
db_status

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

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

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


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

Unabletolocatepackage

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

sudoapt-getupdate


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

xxx@ubuntu:~$su-postgres
Password:
su:Authenticationfailure

$sudopasswdpostgres
EnternewUNIXpassword:
RetypenewUNIXpassword:
passwd:passwordupdatedsuccessfull

原文地址:https://www.jb51.cc/ubuntu/356086.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐