Metasploit four built-in PostgreSQL database

Source: Internet
Author: User

Recently work is very uncomfortable, also looking at Python, so did not insist on writing notes, today to update a little note, Metasploit support database has 2 kinds, one is PostgreSQL, there is a familiar with MySQL, in fact, I am not familiar with MySQL, I have only used orcal Mmsql and accsess database, as for PostgreSQL, I have not heard before, well, this does not matter, unless it is the team to do security, for individuals, I think what database does not matter, I want to support SQL statements ^_^

Kaili_linux just download Metasploit is unable to build the database, it should be a bug,bt I remember there seems to be a problem, there are many solutions on the Internet, but I actually used a very simple way to solve, that is upgrade metastatisploit.

>msfconsole

>msfupdate

In this case, the database is created automatically when you open Metasploit again, and the default account is MSF3/MSF3. We can use the command:

>db_status to see if the database is connected, if connected to Msf3dev is connected

Of course, you can also build (createdb) a database, or connect to other people's database, such as team work, the use of commands are:

Msf>db_connect Username: password @ip:port/dbname (forgive my Chinese-English combination)

The Disconnect Database command is:

Msf>db_disconnect (commands are actually very simple, also good to remember)

Msf>dropdb MSF3 (cautious operation Ah, because it seems that the new database has a small bug, the online solution tutorial, but still have a headache)

How to use the database in general:

Database OK, then you need to know how to use, take nmap to give examples

Msf> DB_NAMP-PN-SV 10.10.10.0/24

Namp can be used this way because Metasploit encapsulates it, and there's another way:

>nmap-pn-sv-ox test 10.10.10.0/24 generate a file named test, note the current path

Msf> db_import/root/test using Db_import to import db

This method is not universal, in fact, there is a certain format requirements, probably what, uh, uh, not introduced,

Are foreign software, I also do not know, OpenVAS on the support is very good, see vas sensible understand what happened to it, OK not to say, other software believe that people do not use, if you want to use, temporary judge whether it conforms to the data format can be, if not and, also simple. Modify the format, and then import the DB, also very easy!

Share your Information database

To be honest, I've never shared it, but here's the principle, because there's no one around me who's studying these things with me ╮(╯▽╰)╭

The default database of the shared address is 127.0.0.1, is only valid for the local, here as long as the change to his external IP is good, here I pick someone else, although you can modify the configuration file, but different versions of the configuration file is not a place.

Msf>msfrpcd-p 1234-u msf-a 0.0.0.0

0.0.0.0 represents all addresses, if the intranet, you can write 192.0.0.0 and so on, the default is to use SSL encrypted access, you can use the-s cancellation, or encrypted well




This article is from the "wind-like Freedom" blog, please make sure to keep this source http://capricorn.blog.51cto.com/8304701/1410601

Related Article

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.