Kali rolling Metasploit Open the database connection!

Source: Internet
Author: User
Tags postgresql kali linux

The latest version of the Kali rolling has been released, with the Debian kernel, added a timely update! But its built-in, Metasploit with: Metasploit-framework version! It's not the same as it used to be. "Bt5,kali Linux" his latest service, no Metasploit service! So the service Metasploit start is useless! The service that starts PostgreSQL also becomes "service PostgreSQL start"! And it won't automatically connect to the database! To do this manually, I'll write down the method:

1, open the latest version of Kali rolling is the time:

Open Terminal: Write "Sevicer PostgreSQL start" and Kali will start the service,

Down input: "NETSTAT-NTPL" query PostgreSQL port is generally "5432"

2, open the new port and enter "Msfconsole" to wait for Metasploit to start!

650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7F/E8/wKiom1cxbtfReHpPAAFEpMynos4730.jpg "title=" to see the port number! "alt=" Wkiom1cxbtfrehppaafepmynos4730.jpg "/>

After startup: 650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/7F/E6/wKioL1cxcIaD8DnAAAJ9Ibid7Vg216.jpg "title=" The MSF "Alt=", which was just launched, "Wkiol1cxciad8dnaaaj9ibid7vg216.jpg"/>

Input: Help to see common commands!

Input:

MSF > Db_status

[*] PostgreSQL selected, no connection

Description, no database connected! For this we are going to create a database!


Open new terminal: 650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/7F/E8/wKiom1cxcV6CX83wAACREI_sNGk617.jpg "title=" Enter PostgreSQL "alt=" Wkiom1cxcv6cx83waacrei_sngk617.jpg "/>


Then create a new database in "Postgres"! We can first "\l" to see the database you have! "\du" is for viewing users!


Input:

postgres=# Create user "MSF" with password ' 123456 ' nocreatedb;

Create ROLE Description We successfully created a user "MSF" password "123456"

Down: Create a database:


postgres=# CREATE DATABASE "MSF2" with Owner= "MSF";

Create DATABASE We have created a db "MSF2" user group is "MSF"

And then back to Metaspgresql.

To connect:

SF > Db_connect msf:[email protected]/msf2

[*] Rebuilding the module cache in the background ...

In the input:

MSF > Db_status

[*] PostgreSQL connected to MSF2

The instructions are connected!

Let's Test it:

Use Db_nmap after you want to test the IP or domain name! After a while nmap will be out of the data, here will not show!


Then use hosts, look!


MSF > Hosts


Hosts

=====


Address Mac name Os_name os_flavor os_sp Purpose Info comments

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

*.*.*.* Unknown Device

Also available: Services is not shown here!


Then we disconnect in the re-connect, the data is still explaining our database no problem!


If we want to delete the database! Disconnect the database First!

SF > Db_disconnect

Then go back to the database: do the following!


postgres=# DROP DATABASE

postgres-# msf2;

Drop DATABASE Description has been removed can be viewed with "\l"

Delete User name:

postgres=# DROP ROLE MSF;

DROP ROLE can be viewed with "\du"


Exit database "\q"

So far this article finished "Dragon Connaught Production" New people please forgive!

There are Kali rolling installation files as well as the database saved files are changed to: usr/share/metasploint/config/database.yml, pure memory hand hit!

This article is from the "Ronno Chronicle" blog, make sure to keep this source http://longnuo.blog.51cto.com/9009281/1771757

Kali rolling Metasploit Open the database connection!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.