kali是黑客的强大武器,还有一个也是哦——Metasploit

postgreSQL数据库是Metasploit的默认数据库哦!

启动postgresql:

service postgresql start

既然postgresql是配合Metasploit框架的,那么也要启动Metasploit:

kali >  msfconsole
root@kali:~# service postgresql start
root@kali:~# msfconsole
[-] ***rting the Metasploit Framework console...|
[-] * WARNING: No database support: No database YAML file
[-] *** Unable to handle kernel NULL pointer dereference at virtual address 0xd34db33f
EFLAGS:
eax: ebx: f77c8c00 ecx: edx: f77f0001
esi: 803bf014 edi: 8023c755 ebp: 80237f84 esp: 80237f60
ds: es: ss:
Process Swapper (Pid: , process nr: , stackpage=) Stack: 90909090.90909090.
90909090.90909090.
90909090.90909090.
90909090.90909090.
..........................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
ccccccccc.................
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
.................ccccccccc
cccccccccccccccccccccccccc
cccccccccccccccccccccccccc
..........................
ffffffffffffffffffffffffff
ffffffff..................
ffffffffffffffffffffffffff
ffffffff..................
ffffffff..................
ffffffff.................. Code: M3 T4 SP L0 1T FR 4M 3W OR K! V3 R5 I0 N4
Aiee, Killing Interrupt handler
Kernel panic: Attempted to kill the idle task!
In swapper task - not syncing =[ metasploit v5.0.2-dev ]
+ -- --=[ exploits - auxiliary - post ]
+ -- --=[ payloads - encoders - nops ]
+ -- --=[ evasion ]
+ -- --=[ ** This is Metasploit development branch ** ] msf5 >

启动完成

启动metasploit成功后则会进入:

msf >

命令行环境下

下一步,将建立metasploit将其信息存储在其中的数据库中:

需要以root权限身份登录postgres :(su:“switch user”命令)

提示:postgres@kali:/root$ 【表示程序 - 主机名 - 用户】

下一步,创建用户和密码:

使用 createuser 命令的-P选项创建用户名msf_user,并提示输入密码。

下一步,授予用户一定的权限并创建一个数据库:

使用 createdb 命令的-O为msf_user用户创建了 hack_db 数据库。

初步配置结束,exit退出!

接下来,则是连接msf和数据库了!参考数据库连接的博文

检查数据库是否连接?结果显示未连接!

使用 db_connect 命令连接数据库:

msf5 > db_connect
[-] A URL or saved data service name is required. USAGE:
* Postgres Data Service:
db_connect <user:[pass]>@<host:[port]>/<database>
Examples:
db_connect user@metasploit3
db_connect user:pass@192.168.0.2/metasploit3
db_connect user:pass@192.168.0.2:/metasploit3
db_connect -y [path/to/database.yml] * HTTP Data Service:
db_connect [options] <http|https>://<host:[port]>
Examples:
db_connect http://localhost:
db_connect http://my-super-msf-data.service.com
db_connect -c ~/cert.pem -t 6a7a74c1a5003802c955ead1bbddd4ab1b05a7f2940b4732d34bfc555bc6e1c5d7611a497b29e8f0 https://localhost:
NOTE: You must be connected to a Postgres data service in order to successfully connect to a HTTP data service. Persisting Connections:
db_connect --name <name to save connection as> [options] <address>
Examples:
Saving: db_connect --name LA-server http://123.123.123.45:
Connecting: db_connect LA-server OPTIONS:
-l,--list-services List the available data services that have been previously saved.
-y,--yaml Connect to the data service specified in the provided database.yml file.
-n,--name Name used to store the connection. Providing an existing name will overwrite the settings for that connection.
-c,--cert Certificate file matching the remote data server's certificate. Needed when using self-signed SSL cert.
-t,--token The API token used to authenticate to the remote data service.
--skip-verify Skip validating authenticity of server's certificate (NOT RECOMMENDED).

db_connect --help

如上图显示: Connected to Postgres data service: 127.0.0.1/hack_db 【连接到hack_db数据库】

检查是否连接:

------------------------------------

至此,msf和postgreSQL数据库已经连接并可以使用,使用Metasploit进行的工作,结果将存到PostgreSQL数据库中。

更多了解,待它日研究后更新!!!

postgreSQL数据库的初探的更多相关文章

  1. ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库

    前段时间在园子里看到了小蝶惊鸿 发布的有关绿色版的Linux.NET——“Jws.Mono”.由于我对.Net程序跑在Linux上非常感兴趣,自己也看了一些有关mono的资料,但是一直没有时间抽出时间 ...

  2. PostgreSQL介绍以及如何开发框架中使用PostgreSQL数据库

    最近准备下PostgreSQL数据库开发的相关知识,本文把总结的PPT内容通过博客记录分享,本随笔的主要内容是介绍PostgreSQL数据库的基础信息,以及如何在我们的开发框架中使用PostgreSQ ...

  3. TPC-H生成.tbl文件导入postgresql数据库的坑

    数据库project好好的不用主流的MySQL和Microsoft server而要求用听都没听过的postgresql (当然,可能你三个都没听过) 这里的坑主要是把生成的那八张.tbl的表导入pg ...

  4. PowerDesigner反向工程PostgreSQL数据库

    1. 环境准备: a)         安装PowerDesigner,以PowerDesigner15.1为例 b)         安装java jdk,以jdk-7-windows-i586为例 ...

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

    说好的给园子里的朋友们录制与<ASP.NET MVC 使用 Petapoco 微型ORM框架+NpgSql驱动连接 PostgreSQL数据库> 这篇博客相对应的视频,由于一个月一来没有时 ...

  6. Enterprise Architect的共享Respository设置,postgresql数据库

    Enterprise Architect有一个很实用的共享,在设计UML图的时候,可以连接到一个数据库服务器,将所有的画图数据共享在上面,所有连到这个server的人,都可以看到 别人的图,图中的元素 ...

  7. PostgreSQL数据库基本配置

    一.安装 首先安装PostgreSQL客户端: sudo apt-get install postgresql-client 然后,安装PostgreSQL服务器: sudo apt-get inst ...

  8. C#访问PostGreSQL数据库的方法 http://www.jb51.net/article/35643.htm

    这次的项目中的一个环节要求我把PostGreSQL数据取出来,然后放到SqlServer里,再去处理分析. http://www.jb51.net/article/35643.htm - 我对Post ...

  9. C#访问postgresql数据库

    最近开始做C#的DotNet的工作,因为对PostgreSQL数据库比较有兴趣,所以自己研究了一下如何访问PostgreSQL的 数据库的问题. 1.为了访问PostgreSQL数据库,需要从pgfo ...

随机推荐

  1. [Spring cloud 一步步实现广告系统] 3. 网关路由

    Zuul(Router and Filter) WIKI: 传送门 作用 认证,鉴权(Authentication/Security) 预判(Insights) 压力测试(Stress Testing ...

  2. 一起学Android之Xml与Json解析

    概述 在网络中,数据交互通常是以XML和Json的格式进行,所以对这两种格式的数据进行解析,是Android开发中的必备功能,本文以一个简单的小例子,简述Android开发中Xml和Json解析的常用 ...

  3. goweb- 对请求的处理

    对请求的处理 Go 语言的 net/http 包提供了一系列用于表示 HTTP 报文的结构,我们可以使用它 处理请求和发送相应,其中 Request 结构代表了客户端发送的请求报文,下面让我们看 一下 ...

  4. SAP系统邮件功能配置

    相信SAP顾问或多或少都会接到用户要求SAP系统能够定时发送邮件的功能,定时将用户需要的信息已邮件的方式发送给固定的人员. 下面就来讲一下SAP发送邮件应该如何配置: 1.RZ10做配置: is/SM ...

  5. HBuilderx 模拟器调试设置

    模拟器名称    连接默认端口夜神安卓模拟器夜神安卓模拟器     62001逍遥安卓模拟器逍遥安卓模拟器     21503BlueStacks(蓝叠安卓模拟器)BlueStacks(蓝叠安卓模拟器 ...

  6. [Linux]线程分离状态的理解

    在任何一个时间点上,线程是可结合的(joinable),或者是分离的(detached).一个可结合的线程能够被其他线程收回其资源和杀死:在被其他线程回收之前,它的存储器资源(如栈)是不释放的.相反, ...

  7. AcWing 28. 在O(1)时间删除链表结点

    地址 https://www.acwing.com/problem/content/description/85/ 题目描述给定单向链表的一个节点指针,定义一个函数在O(1)时间删除该结点. 假设链表 ...

  8. [译]ABP v1.0终于发布了!

    ABP v1.0终于发布了! 今天是个大日子!经过约3年的不断开发,第一个稳定的ABP版本,1.0,已经发布了.感谢为该项目做出贡献或试用过的每个人. 立即开始使用新的ABP框架:abp.io/get ...

  9. CF1253F Cheap Robot(神奇思路,图论,最短路,最小生成树/Kruskal 重构树/并查集)

    神仙题. 先考虑平方级别的暴力怎么做. 明显答案有单调性,先二分 \(c\). 先最短路预处理 \(dis_u\) 表示 \(u\) 到离它最近的充电站的距离(一开始把 \(1\) 到 \(k\) 全 ...

  10. Norm比较

    目录 Introduction BN LN IN GN SN Conclusion Introduction 输入图像shape记为[N, C, H, W] Batch Norm是在batch上,对N ...