Results 1 to 10 of 10

Thread: metasploit update goes wrong

  1. #1
    Senior Member skull2006's Avatar
    Join Date
    Jan 2010
    Location
    In my skull
    Posts
    125

    Question metasploit update goes wrong

    Dear nice guys,

    I download metasploit 3.4 and make the installation and everything goes okay until i try to run Fast-Track to my VBOX but it show me this lines :

    =[ metasploit v3.4.1-dev [core:3.4 api:1.0]
    + -- --=[ 561 exploits - 271 auxiliary
    + -- --=[ 209 payloads - 26 encoders - 8 nops
    =[ svn r9502 updated today (2010.06.12)

    msf > db_destroy pentest
    /usr/lib/postgresql/8.3/bin/dropdb: symbol lookup error: /usr/lib/postgresql/8.3/bin/dropdb: undefined symbol: PQconnectionNeedsPassword
    msf > db_create pentest
    [-]
    [-] Warning: The db_create command is deprecated, use db_connect instead.
    [-] The database and schema will be created automatically by
    [-] db_connect. If db_connect fails to create the database, create
    [-] it manually with your DBMS's administration tools.
    [-]
    /usr/lib/postgresql/8.3/bin/createdb: symbol lookup error: /usr/lib/postgresql/8.3/bin/createdb: undefined symbol: PQconnectionNeedsPassword
    [-] Error while running command db_create: Failed to connect to the database: could not connect to server: Connection refused
    Is the server running on host "127.0.0.1" and accepting
    TCP/IP connections on port 5432?


    Call stack:
    /pentest/exploits/framework3/lib/msf/ui/console/command_dispatcher/db.rb:1684:in `db_create_postgresql'
    /pentest/exploits/framework3/lib/msf/ui/console/command_dispatcher/db.rb:1236:in `send'
    /pentest/exploits/framework3/lib/msf/ui/console/command_dispatcher/db.rb:1236:in `cmd_db_create'
    /pentest/exploits/framework3/lib/rex/ui/text/dispatcher_shell.rb:246:in `send'
    /pentest/exploits/framework3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
    /pentest/exploits/framework3/lib/rex/ui/text/dispatcher_shell.rb:208:in `run_single'
    /pentest/exploits/framework3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
    /pentest/exploits/framework3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
    /pentest/exploits/framework3/lib/rex/ui/text/shell.rb:141:in `run'
    /pentest/exploits/framework3/msfconsole:112
    msf > db_nmap -PN 172.16.23.22
    [-] Database not connected
    msf > db_autopwn -p -t -e -b
    [-] Database not connected
    msf > sleep 5
    msf > jobs -K
    Stopping all jobs...
    msf >
    msf >
    __________________________________________________ ________________

    so i need your advice.

    thank you,

    And after i made search in this forum i found this :
    http://www.backtrack-linux.org/forum...ml?pagenumber=
    and i make that steps and i got this :

    =[ metasploit v3.4.1-dev [core:3.4 api:1.0]
    + -- --=[ 561 exploits - 271 auxiliary
    + -- --=[ 209 payloads - 26 encoders - 8 nops
    =[ svn r9502 updated today (2010.06.12)

    msf > db_destroy pentest
    /usr/lib/postgresql/8.3/bin/dropdb: symbol lookup error: /usr/lib/postgresql/8.3/bin/dropdb: undefined symbol: PQconnectionNeedsPassword
    msf > db_create pentest
    [-]
    [-] Warning: The db_create command is deprecated, use db_connect instead.
    [-] The database and schema will be created automatically by
    [-] db_connect. If db_connect fails to create the database, create
    [-] it manually with your DBMS's administration tools.
    [-]
    NOTICE: CREATE TABLE will create implicit sequence "hosts_id_seq" for serial column "hosts.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "hosts_pkey" for table "hosts"
    NOTICE: CREATE TABLE will create implicit sequence "clients_id_seq" for serial column "clients.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clients_pkey" for table "clients"
    NOTICE: CREATE TABLE will create implicit sequence "services_id_seq" for serial column "services.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "services_pkey" for table "services"
    NOTICE: CREATE TABLE will create implicit sequence "vulns_id_seq" for serial column "vulns.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "vulns_pkey" for table "vulns"
    NOTICE: CREATE TABLE will create implicit sequence "refs_id_seq" for serial column "refs.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "refs_pkey" for table "refs"
    NOTICE: CREATE TABLE will create implicit sequence "notes_id_seq" for serial column "notes.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "notes_pkey" for table "notes"
    NOTICE: CREATE TABLE will create implicit sequence "wmap_targets_id_seq" for serial column "wmap_targets.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "wmap_targets_pkey" for table "wmap_targets"
    NOTICE: CREATE TABLE will create implicit sequence "wmap_requests_id_seq" for serial column "wmap_requests.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "wmap_requests_pkey" for table "wmap_requests"
    NOTICE: CREATE TABLE will create implicit sequence "workspaces_id_seq" for serial column "workspaces.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "workspaces_pkey" for table "workspaces"
    NOTICE: CREATE TABLE will create implicit sequence "events_id_seq" for serial column "events.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "events_pkey" for table "events"
    NOTICE: CREATE TABLE will create implicit sequence "loots_id_seq" for serial column "loots.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "loots_pkey" for table "loots"
    NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users"
    NOTICE: CREATE TABLE will create implicit sequence "reports_id_seq" for serial column "reports.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "reports_pkey" for table "reports"
    NOTICE: CREATE TABLE will create implicit sequence "tasks_id_seq" for serial column "tasks.id"
    NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "tasks_pkey" for table "tasks"[*] Database creation complete (check for errors)
    msf > db_nmap -PN 172.16.23.22

    Starting Nmap 5.21 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2010-06-12 21:20 CEST
    Nmap scan report for 172.16.23.22
    Host is up (0.00046s latency).
    Not shown: 994 closed ports
    PORT STATE SERVICE
    25/tcp open smtp
    110/tcp open pop3
    135/tcp open msrpc
    139/tcp open netbios-ssn
    143/tcp open imap
    445/tcp open microsoft-ds
    MAC Address: 08:00:27:B2:3B:A0 (Cadmus Computer Systems)

    Nmap done: 1 IP address (1 host up) scanned in 1.83 seconds
    msf > db_autopwn -p -t -e -b[*] Analysis completed in 8 seconds (0 vulns / 0 refs)[*][*] ================================================== ==============================[*] Matching Exploit Modules[*] ================================================== ==============================[*] 172.16.23.22:143 exploit/windows/imap/mercur_login (port match)[*] 172.16.23.22:445 exploit/windows/smb/psexec (port match)[*] 172.16.23.22:143 exploit/windows/imap/mercury_rename (port match)
    .
    .
    .
    .
    msf > sessions -l

    Active sessions
    ===============

    Id Type Information Connection
    -- ---- ----------- ----------
    1 meterpreter 172.16.23.20:60892 -> 172.16.23.22:39968
    2 meterpreter 172.16.23.20:40800 -> 172.16.23.22:12263

    ssions -i <id> to jump into a shell", then you were unsuccessful. Simply type se[*] exec: echo "If it states No sessions, then you were unsuccessful. Simply type sessions -i <id> to jump into a shell"

    If it states No sessions, then you were unsuccessful. Simply type sessions -i <id> to jump into a shell
    msf > sessions -i 1[*] Starting interaction with 1...

    meterpreter > ps
    [-] Error running command ps: NoMethodError undefined method `process' for nil:NilClass
    meterpreter > help
    __________________________________________________ _________________________________

    any one know what's going on.....

    thank you.
    Last edited by balding_parrot; 06-12-2010 at 11:52 PM.

  2. #2
    Junior Member pigtail23's Avatar
    Join Date
    Jun 2010
    Location
    black hole
    Posts
    41

    Default Re: metasploit update goes wrong

    use db_driver sqlite3

  3. #3
    Just burned his ISO
    Join Date
    Jan 2010
    Posts
    8

    Default Re: metasploit update goes wrong

    @pigtail23 I would stay with postgresql, is the advice I had once on #metasploit, and @skull2006 re-check that your postgresql installation is OK

  4. #4
    Junior Member pigtail23's Avatar
    Join Date
    Jun 2010
    Location
    black hole
    Posts
    41

    Default Re: metasploit update goes wrong

    why is postgresql better? find the engine more exploits or why?
    Last edited by pigtail23; 06-13-2010 at 12:23 PM.

  5. #5
    Senior Member skull2006's Avatar
    Join Date
    Jan 2010
    Location
    In my skull
    Posts
    125

    Default Re: metasploit update goes wrong

    Quote Originally Posted by celord View Post
    @pigtail23 I would stay with postgresql, is the advice I had once on #metasploit, and @skull2006 re-check that your postgresql installation is OK
    okay i agree with you but how i can check the postgresql database?

    thank you,

  6. #6
    Junior Member skidmarq's Avatar
    Join Date
    Jan 2010
    Posts
    88

    Default Re: metasploit update goes wrong

    apt-get remove postgresql-8.3
    apt-get install postgresql-8.3
    ln –s /etc/init.d/postgresql-8-3 /etc/init.d/postgresq
    cd /etc/ssl/certs
    make-ssl-cert generate-default-snakeoil –force-overwrite
    createuser –U postgres –P postgres
    /etc/init.d/postgresql-8.3 restart
    cd /pentest/exploits/framework3
    ./msfconsole
    db_connect postgres : postgres@localhost
    I've posted this in at least three threads?!?
    I got 99 problems but the bits ain't one...

  7. #7
    Junior Member pigtail23's Avatar
    Join Date
    Jun 2010
    Location
    black hole
    Posts
    41

    Default Re: metasploit update goes wrong

    ok it's work fine, but why you use postgresql? ok is a little bit faster, but the result it's the same. or am I mistaken?

  8. #8
    Junior Member skidmarq's Avatar
    Join Date
    Jan 2010
    Posts
    88

    Default Re: metasploit update goes wrong

    Quote from HD Moore (founder of Metasploit)

    For this example, we will use the PostgreSQL database server on a Gentoo Linux system. While the SQLite database support is functional, performance problems will prevent it from being useful for performing large-scale exploit automation
    Metasploit: Metasploit 3.0 Automated Exploitation
    Metasploit/UsingMetasploit - Wikibooks, collection of open-content textbooks
    I got 99 problems but the bits ain't one...

  9. #9
    Senior Member skull2006's Avatar
    Join Date
    Jan 2010
    Location
    In my skull
    Posts
    125

    Default Re: metasploit update goes wrong

    Quote Originally Posted by skidmarq View Post
    I've posted this in at least three threads?!?
    thank you for your help.

    i make your steps but nothing happen : may you can see the lines below.

    root@skull:/# ln -s /etc/init.d/postgresql-8-3 /etc/init.d/postgresq
    ln: creating symbolic link `/etc/init.d/postgresq': File exists
    ---------------------------------------------------------------------------------------------------
    root@skull:/etc/ssl/certs# createuser -U postgres -P postgres
    Enter password for new role:
    Enter it again:
    Shall the new role be a superuser? (y/n) y
    createuser: creation of new role failed: ERROR: role "postgres" already exists
    ---------------------------------------------------------------------------------------------------
    and this line below from msf :
    msf > db_connect postgres : postgres@localhost
    [-] Error while running command db_connect: Failed to connect to the database: FATAL: role "root" does not exist


    Call stack:
    /opt/metasploit3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1594:in `db_connect_postgresql'
    /opt/metasploit3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1262:in `send'
    /opt/metasploit3/msf3/lib/msf/ui/console/command_dispatcher/db.rb:1262:in `cmd_db_connect'
    /opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `send'
    /opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:246:in `run_command'
    /opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:208:in `run_single'
    /opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `each'
    /opt/metasploit3/msf3/lib/rex/ui/text/dispatcher_shell.rb:202:in `run_single'
    /opt/metasploit3/msf3/lib/rex/ui/text/shell.rb:141:in `run'
    ./msfconsole:112
    msf >
    __________________________________________________ _____________________

  10. #10
    Administrator sickness's Avatar
    Join Date
    Jan 2010
    Location
    Behind the screen.
    Posts
    2,921

    Default Re: metasploit update goes wrong

    Code:
    createuser: creation of new role failed: ERROR: role "postgres" already exists
    That means that the user already exists, try to reset you password or google it.
    Back|track giving machine guns to monkeys since 2007 !

    Do not read the Wiki, most your questions will not be answered there !
    Do not take a look at the: Forum Rules !

Similar Threads

  1. Metasploit update
    By baslifrog in forum Beginners Forum
    Replies: 3
    Last Post: 03-19-2010, 12:25 AM
  2. Metasploit Update Wrong Meterpreter
    By tutuzpi in forum OLD Newbie Area
    Replies: 1
    Last Post: 11-12-2009, 01:45 PM
  3. How to Update Metasploit
    By purehate in forum OLD Announcements
    Replies: 0
    Last Post: 11-07-2009, 06:58 PM
  4. troubleshooting update in metasploit
    By zals07 in forum OLD Newbie Area
    Replies: 1
    Last Post: 06-17-2009, 06:13 AM
  5. Svn Update Metasploit Error
    By fload in forum OLD Newbie Area
    Replies: 2
    Last Post: 02-27-2009, 09:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •