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

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...