metasploit连接postgresql数据库

metasploit 连接postgresql数据库:

1.打开postgresql服务:services postgresql start

2.进入postgresql中,设置默认用户密码、创建新用户、设置新用户权限、创建数据库:

sudo -u postgres psql#进入postgresql默认的用户

alter user postgres with password ‘密码‘; #设置默认用户的登录密码

create user ‘用户名‘ wiht password ‘密码‘ nocreatedb; #创建带密码的新用户

create database ‘数据库名‘ with owner = ‘用户名‘; #创建数据库并指定数据库的所属用户

\q

3.进入metasploit,连接数据库:

msfconsole

db_status#查看数据库的状态

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

db_status#检查是否开启成功



为什么要连接postgresql?

连接数据库之后搜索msf中模块的速度可以大大提高;

连接数据库之后,使用msf的痕迹会被保存下来,方便之后导出编写渗透测试报告

时间: 2024-08-04 14:04:41

metasploit连接postgresql数据库的相关文章

KaLi 之 Metasploit 连接 postgresql 数据库

KaLi 连接 postgresql 数据库 查看 postgresql 是否启动,没有启动的话,使用 service postgresql start 命令启动.启动后查看是否启动成功,端口是 5432,如图所示: 启动 metasploit 后,查看 postgresql 的连接状态,命令是:db_status,如出现如下,证明没有连接. 查看 postgresql 的账户密码,地址是:  cat /opt/metasploit/apps/pro/ui/config/database.yml

Kali2017 Metasploit连接postgresql数据库

msfdb:msf数据库管理命令 1.查看msf数据库连接状态 msf > db_status [*] postgresql selected, no connection //未连接 2.msfdb命令 msf > msfdb //msfdb可以在命令行直接使用 [*] exec: msfdb Manage a metasploit framework database msfdb init # initialize the database //初始化数据库 msfdb reinit #

BT5之Metasploit[MSF]连接postgresql数据库

1,先查看postgresql的端口,默认是自动开启的,端口7337 .   [email protected]:~# netstat -tnpl |grep postgres tcp        0      0 127.0.0.1:7337          0.0.0.0:*               LISTEN      1100/postgres tcp6       0      0 ::1:7337                :::*                   

kali linux 系列教程之metasploit 连接postgresql可能遇见的问题

kali linux 系列教程之metasploit 连接postgresql可能遇见的问题 文/玄魂   目录 kali linux 下metasploit 连接postgresql可能遇见的问题................................ 1 前言............................................................................................................... 1

kali linux 系列教程之metasploit 连接postgresql

前言 由于kali linux的版本不同,默认情况下对metasploit和postgresql的配置也不相同,导致我们启动metasploit后连接postgresql数据库会遇到无法连接的情况.下面就三种情况,简单的给大家描述一下,以及遇到问题的解决方案. 理想状态 理想情况下,只需要两步即可. 启动postgresql service postgresql start 启动mestasploit service metasploit start 在metasploit中输入db_statu

Metasploit连接postgres数据库

操作环境为Kali虚拟机 [email protected]:~# apt-get install postgresql 启动服务 [email protected]:~# service postgresql start [ ok ] Starting PostgreSQL 9.1 database server: main. 修改postgresql密码为toor: [email protected]:~# sudo -u postgres psql postgres postgres=#

视频教程--ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库

说好的给园子里的朋友们录制与<ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库> 这篇博客相对应的视频,由于一个月一来没有时间录制,今天我兑现了给朋友们的承诺.. 本次视频教程的目录为 视频.代码.资料,其中视频有4段,资料是我收集的相关资料.. 视频下载地址:http://pan.baidu.com/s/1c05sysC 希望大家多多支持... 郝喜路 2014年6月8日 11:11:02   http://haoxilu.cn

Entity Freamwork 6连接PostgreSql数据库

原文 Entity Freamwork 6连接PostgreSql数据库 开发环境 VS 2015  Update 1   Postgre Sql 9.4 使用过程 1.使用Nuget在项目中添加对EntityFramework6.Npgsql的引用 2.下载并安装NpgsqlDdexProvider程序,下载地址: https://github.com/npgsql/npgsql/releases ,请下载exe文件,他会帮你做很多事情.下载完成后关闭vs,安装下载好的文件,安装完成之后,点击

SSIS2012连接 PostgreSQL数据库

场景:     公司业务数据库位PostgreSQL数据库,需要用ETL工具(SSIS2012)将数据抽取到数据仓库中 1. SSIS2012 连接 PostgreSQL数据库 两种方法:  .NET Provider for OleDB 和ODBC  ,第一种同事是花钱从老外那边买的插件(如果有朋友有免费的连接适配器,求分享!) 下图为第一种 . 我们这里介绍第二种方式. 2. 下载PostgreSQL的ODBC连接驱动程序.      http://www.postgresql.org/ft