Home page logo
/

metasploit logo Metasploit mailing list archives

Re: guidence required in installing mysql in metasploit
From: jambunathan sadasivamiyer <jamshuttle77 () gmail com>
Date: Fri, 17 Jun 2011 23:01:54 +0530

hi all
thanks for your support,

let me tell what i have done.
step 1
downloaded postgreSql8.4 for windows

step 2
downloaded metasploit framework 3.0 from archive

step3
installed metasploit framework 3.0

then i double clicked metasploit update icon which was available in my
windows desktop

now the version after update is showing as framework and core are of 3.8 and
Api of something

i executed following things to see what is available
msf> help
msf> db_driver to see the selected / installed / active database driver.

found postgresql

step4
with msf console active , i minimized the console and from system
console(cmd of windows) installed postgresql,
while installing posgres, it was asking for additional component connection,
asked for ftp/HTTP connection.

with that, it got installed, with this ftp components, i saw pdAdminIII was
also present.

i opened the pgAdminIII and saw server avaialbe, it was showing posgresql8.4
as name and database as posgres
the properties of default installed database of posgressql has  listening
port 5432,

i tried creating login roles  , added user as default user with no super
user power, no power to create database


then i went to msf console to execute db_connect
user:userx () 127 0 0 1/metasploit3 then it was given fatal error.

in the mean time i recived mail from Karan for steps for installing posgres
in command

Step5
i started system console (cmd- prompt ) of windows went to install directory
of posgres
c:\Program files\posgresql\8.4\bin
then i listed available contents of directory,
i found initdb.exe,pg_ctl.exe,createdb.exe etc
then i executed
c:\<posgres  path> initdb -D ~/metasploitdb   this command successfully got
executed

then
step 6
 i trie to execute  pg_ctl -D ~/metasploitdb
while executing the command , i was getting

 *C:\Program Files\PostgreSQL\8.4\bin>pg_ctl -D ~/metasploitdb start*
*server starting*
*
*
*C:\Program Files\PostgreSQL\8.4\bin>LOG:  could not bind IPv6 socket: No
error*
*HINT:  Is another postmaster already running on port 5432? If not, wait a
few se*
*conds and retry.*
*LOG:  could not bind IPv4 socket: No error*
*HINT:  Is another postmaster already running on port 5432? If not, wait a
few se*
*conds and retry.*
*WARNING:  could not create listen socket for "localhost"*
*FATAL:  could not create any TCP/IP sockets*

now, i stuck up here,
please tell me, way out. for this

further, do i need to start the posgres server as soon i open pgAdminIII
is that causing the port conflict.

one group member was sharing, that , database initialization is not required
to run exploits or doing penetration test.

if i need to have collectively analyze my network computers , i think i need
to have a database have all information of ports,ip, etc.

please guide me , hence, i could do small experiments and learn.

thanks for support provided













On Fri, Jun 17, 2011 at 3:51 PM, jambunathan sadasivamiyer <
jamshuttle77 () gmail com> wrote:

hi Karan

i am feel, i am doing some mistake in configuring this postgres

C:\Program Files\PostgreSQL\8.4\bin>pg_ctl -D ~/metasploitdb start
server starting

C:\Program Files\PostgreSQL\8.4\bin>LOG:  could not bind IPv6 socket: No
error
HINT:  Is another postmaster already running on port 5432? If not, wait a
few se
conds and retry.
LOG:  could not bind IPv4 socket: No error
HINT:  Is another postmaster already running on port 5432? If not, wait a
few se
conds and retry.
WARNING:  could not create listen socket for "localhost"
FATAL:  could not create any TCP/IP sockets

can you please share your guidance in this

thanks with regards
jambunathan.m.s




On Wed, Jun 15, 2011 at 9:37 PM, Karan Ingle <karan.ingle () gmail com>wrote:


Hey Jambu

The procedure remains the same.

Use the system console option and then move to the postgresql folder and
follow the mentioned steps.

Cheers


On Wed, Jun 15, 2011 at 10:52 AM, jambunathan sadasivamiyer <
jamshuttle77 () gmail com> wrote:

hi karan

thanks for you support and guidance.
well, currently i am exploring with windows platform,
is the procedure same for the windows.

can you please tell me what is the procedure in windows xp



On Tue, Jun 14, 2011 at 4:09 PM, Karan Ingle <karan.ingle () gmail com>wrote:

*TO initialize and set up postgres SQL before you use metasploit you
have to do the following:*

*1. initialize the postgres SQL*

#initdb -D ~/metasploitdb

*2. Start the postgres SQL*

# pg_ctl -D ~/metasploitdb start

*3. Now while the service is listening create the user and set a
password for it:*

#createuser -P msfuser

Enter password for new role:

Enter it again:

Shall the new role be a superuser? (y/n) n

Shall the new role be allowed to create databases? (y/n) n

Shall the new role be allowed to create more new roles? (y/n) n


*4. Now assign ownership for the DB *

# createdb --owner=msfuser metasploitdb

*WHILE SETTING UP THE METASPLOIT USE:*

PORT: 5432 (DEFAULT FOR POSTGRES SQL)
USERNAME: msfuser
PASSWORD: <WHATEVER YOU SET>
DB: metasploitdb
*
eg. db_connect msfuser:[whatever password you set]@
127.0.0.1:5432/metasploitdb*




On Tue, Jun 14, 2011 at 3:24 PM, Linan Wang <wang.linan () gmail com>wrote:

yes, actually i think metasploit folks prefer postgres over mysql. to
configure postgres:
https://community.rapid7.com/docs/DOC-1268
what i found is there is no need to download the pro package. only svn
the msf3 directory and use mysql/postgres of your own system.


On Tue, Jun 14, 2011 at 10:26 AM, jambunathan sadasivamiyer <
jamshuttle77 () gmail com> wrote:

hi
thanks for sending links
i am getting following error with mysql

Database not connected
msf > db_connect root:userx () 127 0 0 1/msf3
[-] Error while running command db_connect: Failed to connect to the
database: uninitialized constant MysqlCompat::MysqlRes
Call stack:
/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1841:in
`db_connect_mysql'
/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1724:in
`cmd_db_connect'
/msf3/lib/rex/ui/text/dispatcher_shell.rb:376:in `run_command'
/msf3/lib/rex/ui/text/dispatcher_shell.rb:338:in `block in run_single'
/msf3/lib/rex/ui/text/dispatcher_shell.rb:332:in `each'
/msf3/lib/rex/ui/text/dispatcher_shell.rb:332:in `run_single'
/msf3/lib/rex/ui/text/shell.rb:143:in `run'
msfconsole:130:in `<main>'
what does it mean

if postgresql is installed by default in metaploit ,

is there any way to select posgresql instead of  mysql

guide me please

jambunathan.ms


On Tue, Jun 14, 2011 at 2:10 PM, Linan Wang <wang.linan () gmail com>wrote:

hi,
i'm new too. seems nobody here in this list takes care of new comers
:(
here is the page for db_*.

http://www.offensive-security.com/metasploit-unleashed/Configuring_Databases


  On Tue, Jun 14, 2011 at 9:27 AM, jambunathan sadasivamiyer <
jamshuttle77 () gmail com> wrote:

  From: jambunathan sadasivamiyer <jamshuttle77 () gmail com>
To: framework-request () spool metasploit com
Date: Tue, 14 Jun 2011 13:43:11 +0530
Subject: guidence required in installing mysql in metasploit
hi
I am  a newbie

i am currently working  with Metasploit 3.0

i installed metasploit 3.0 and executed update
now it is 3.8

whether mysql or postgressql is mandatory for this metasploit?
if so ,  how to do that,
if i execute
msf> db_driver
i am getting current mysql
it is asking for mysqladmin and mysql to be installed,
how i should do that.

can  any body guide in this


thanks
jambunathan.ms


--

Jambu

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework




--
Best regards

Linan Wang




--

Jambu




--
Best regards

Linan Wang

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework




--
Regards,
Karan Ingle.
*Facebook:* *http://www.facebook.com/karan.ingle*
*Twitter:* *http://twitter.com/karantw33ts<http://twitter.com/karantwits>
*
*Website:* *http://www.facebook.com/karaninglephotography*




--

Jambu




--
Regards,
Karan Ingle.
*Facebook:* *http://www.facebook.com/karan.ingle*
*Twitter:* *http://twitter.com/karantw33ts<http://twitter.com/karantwits>
*
*Website:* *http://www.facebook.com/karaninglephotography*




--

Jambu




-- 

Jambu
_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework

  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]