Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]Metasploit errors
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Tue Mar 06, 2018 10:05 am    Post subject: [Solved]Metasploit errors Reply with quote

Hello, i would like to learn how to use metasploit to learn about net security. But when i start metasploit, i have this error:

Code:
fulgurance@msi-gs73vr-6rf ~ $ msfconsole
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
[-] Failed to connect to the database: FATAL:  le rôle « msf_user » n'existe pas

[-] WARNING! The following modules could not be loaded!
[-]     /usr/lib64/metasploit4.14/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb: LoadError cannot load such file -- nexpose
                                                 
     ,           ,
    /             \
   ((__---,,,---__))
      (_) O O (_)_________
         \ _ /            |\
          o_o \   M S F   | \
               \   _____  |  *
                |||   WW|||
                |||     |||


       =[ metasploit v4.14.16-dev                         ]
+ -- --=[ 1645 exploits - 944 auxiliary - 290 post        ]
+ -- --=[ 486 payloads - 40 encoders - 9 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf >


Last edited by Fulgurance on Thu Mar 08, 2018 3:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Tue Mar 06, 2018 10:24 am    Post subject: Reply with quote

I don't know if it will be useful for your case, but have you start postgresql service before run metasploit?
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Tue Mar 06, 2018 10:32 am    Post subject: Reply with quote

Code:
fulgurance@msi-gs73vr-6rf ~ $ post
postgres           postgres10         postgresql-config  post-grohtml       postmaster         postmaster10       
fulgurance@msi-gs73vr-6rf ~ $ sudo rc-service postgresql restart
Mot de passe : 
 * rc-service: service `postgresql' does not exist
fulgurance@msi-gs73vr-6rf ~ $ sudo /etc/init.d/postgresql-10 restart
 * Caching service dependencies ...                                                                                                                     [ ok ]
 * Stopping PostgreSQL 10 (this can take up to 92 seconds) ...                                                                                          [ ok ]
 * /run/postgresql: correcting mode
 * Starting PostgreSQL 10 ...
pg_ctl : n'a pas pu démarrer le serveur
Examinez le journal applicatif.
 * Check the log for a possible explanation of the above error.
 * The log may be located at:
 *     /var/lib/postgresql/10/data/postmaster.log
 * Or wherever you configured PostgreSQL 10 to log.                                                                                                     [ !! ]
 * ERROR: postgresql-10 failed to start
fulgurance@msi-gs73vr-6rf ~ $ sudo /etc/init.d/postgresql-10 reload
 * postgresql-10: cannot `reload' as it has not been started


Log
https://paste.pound-python.org/show/ZUH9YSSKgYPaCFfCS4Tq/

Metasploit is it only with ethernet or with wifi ?
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Tue Mar 06, 2018 4:46 pm    Post subject: Reply with quote

Do you have "postgres" user?
See in your /etc/passwd file or try

Code:
su postgres


Fulgurance wrote:
Metasploit is it only with ethernet or with wifi ?


I tried to use metasploit for make an exploit to my smartphone connected via wifi and it worked (even if I couldn't get a session)
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Tue Mar 06, 2018 5:12 pm    Post subject: Reply with quote

Now i have added my user to postgres group and i have this error when i start msfconsole:

Code:

fulgurance@msi-gs73vr-6rf ~ $ su postgres
Mot de passe :
su: Autorisation refusée
fulgurance@msi-gs73vr-6rf ~ $ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucp:/bin/false
operator:x:11:0:operator:/root:/sbin/nologin
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/var/empty:/bin/false
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
man:x:13:15:added by portage for man-db:/usr/share/man:/sbin/nologin
nullmail:x:88:88:added by portage for nullmailer:/var/spool/nullmailer:/sbin/nologin
fulgurance:x:1000:1000::/home/fulgurance:/bin/bash
messagebus:x:101:247:added by portage for dbus:/dev/null:/sbin/nologin
ldap:x:439:439:added by portage for openldap:/usr/lib64/openldap:/sbin/nologin
polkitd:x:102:105:added by portage for polkit:/var/lib/polkit-1:/sbin/nologin
rtkit:x:103:104:added by portage for rtkit:/dev/null:/sbin/nologin
vboxguest:x:104:102:added by portage for virtualbox-guest-additions:/dev/null:/bin/sh
postgres:x:70:70:added by portage for postgresql:/var/lib/postgresql:/bin/sh
fulgurance@msi-gs73vr-6rf ~ $ msfconsole
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
[-] Failed to connect to the database: could not connect to server: Connection refused
        Is the server running on host "localhost" (::1) and accepting
        TCP/IP connections on port 5432?
could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?

[-] WARNING! The following modules could not be loaded!
[-]     /usr/lib64/metasploit4.14/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb: LoadError cannot load such file -- nexpose
                                                 
  +-------------------------------------------------------+
  |  METASPLOIT by Rapid7                                 |
  +---------------------------+---------------------------+
  |      __________________   |                           |
  |  ==c(______(o(______(_()  | |""""""""""""|======[***  |
  |             )=\           | |  EXPLOIT   \            |
  |            // \\          | |_____________\_______    |
  |           //   \\         | |==[msf >]============\   |
  |          //     \\        | |______________________\  |
  |         // RECON \\       | \(@)(@)(@)(@)(@)(@)(@)/   |
  |        //         \\      |  *********************    |
  +---------------------------+---------------------------+
  |      o O o                |        \'\/\/\/'/         |
  |              o O          |         )======(          |
  |                 o         |       .'  LOOT  '.        |
  | |^^^^^^^^^^^^^^|l___      |      /    _||__   \       |
  | |    PAYLOAD     |""\___, |     /    (_||_     \      |
  | |________________|__|)__| |    |     __||_)     |     |
  | |(@)(@)"""**|(@)(@)**|(@) |    "       ||       "     |
  |  = = = = = = = = = = = =  |     '--------------'      |
  +---------------------------+---------------------------+


       =[ metasploit v4.14.16-dev                         ]
+ -- --=[ 1645 exploits - 944 auxiliary - 290 post        ]
+ -- --=[ 486 payloads - 40 encoders - 9 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf >


Code:
fulgurance@msi-gs73vr-6rf ~ $ sudo /etc/init.d/postgresql-10 restart
 * /run/postgresql: correcting mode
 * Starting PostgreSQL 10 ...
pg_ctl : n'a pas pu démarrer le serveur
Examinez le journal applicatif.
 * Check the log for a possible explanation of the above error.
 * The log may be located at:
 *     /var/lib/postgresql/10/data/postmaster.log
 * Or wherever you configured PostgreSQL 10 to log.                                                                                                     [ !! ]
 * ERROR: postgresql-10 failed to start


Log: https://paste.pound-python.org/show/UKBvGNpRPGWiHxYeifJk/

My config file:
Code:
fulgurance@msi-gs73vr-6rf ~ $ sudo cat /etc/postgresql-10/pg_hba.conf
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file.  A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access.  Records take one of these forms:
#
# local      DATABASE  USER  METHOD  [OPTIONS]
# host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
# hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
# hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof.  In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names
# from a separate file.
#
# ADDRESS specifies the set of hosts the record matches.  It can be a
# host name, or it is made up of an IP address and a CIDR mask that is
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
# specifies the number of significant bits in the mask.  A host name
# that starts with a dot (.) matches a suffix of the actual host name.
# Alternatively, you can write an IP address and netmask in separate
# columns to specify the set of hosts.  Instead of a CIDR-address, you
# can write "samehost" to match any of the server's own IP addresses,
# or "samenet" to match any address in any subnet that the server is
# directly connected to.
#
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
# Note that "password" sends passwords in clear text; "md5" or
# "scram-sha-256" are preferred since they send encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE.  The available options depend on the different
# authentication methods -- refer to the "Client Authentication"
# section in the documentation for a list of which options are
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted.  Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the server receives a
# SIGHUP signal.  If you edit the file on a running system, you have to
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
# or execute "SELECT pg_reload_conf()".
#
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records.  In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.

# CAUTION: Configuring the system for local "trust" authentication
# allows any local user to connect as any PostgreSQL user, including
# the database superuser.  If you do not trust all your local users,
# use another authentication method.


# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             fulgurance                              trust
# IPv4 local connections:
host    all             fulgurance      127.0.0.1/32            trust
# IPv6 local connections:
host    all             fulgurance      ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     fulgurance                              trust
host    replication     fulgurance      127.0.0.1/32            trust
host    replication     fulgurance      ::1/128                 trust
i�PSlocal   all         all                               trust�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�khost    all         all         ::1/128               trust�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kl�kb�kb �kbfulgurance�ku�ku�kl�kl�kl�kl�kl�kl�kl�kl�kr�kb�kb�kbfulgurance�kr�kr�kr�kr�kr�kr�kr�kr�kr�kb�kb�kb�kb�kb�kb�kd �kd�kr�kr�kr�kr�kr�kr�kb�kb�kbq!dwqb�kb�ku�ku�ku�ku�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr�kr �kr�kr�kr�kr�kr�kr�kr�kr�kr�kb�kb�kb�kb�kb�kb�kb�kd�kd�kr�kb�kd�kd�kr�kbwq

Mod edit: Split long unbroken lines to prevent fourm formatting from going crazy. — JRG
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Tue Mar 06, 2018 5:59 pm    Post subject: Reply with quote

In your "/etc/passwd" file, have you "postgres" user like this?

Code:
postgres:x:117:120:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Tue Mar 06, 2018 9:10 pm    Post subject: Reply with quote

It's in my previous post, you didn't see ? :)

Code:
fulgurance@msi-gs73vr-6rf ~ $ cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/bin/false
daemon:x:2:2:daemon:/sbin:/bin/false
adm:x:3:4:adm:/var/adm:/bin/false
lp:x:4:7:lp:/var/spool/lpd:/bin/false
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
news:x:9:13:news:/var/spool/news:/bin/false
uucp:x:10:14:uucp:/var/spool/uucp:/bin/false
operator:x:11:0:operator:/root:/sbin/nologin
portage:x:250:250:portage:/var/tmp/portage:/bin/false
nobody:x:65534:65534:nobody:/var/empty:/bin/false
sshd:x:22:22:added by portage for openssh:/var/empty:/sbin/nologin
man:x:13:15:added by portage for man-db:/usr/share/man:/sbin/nologin
nullmail:x:88:88:added by portage for nullmailer:/var/spool/nullmailer:/sbin/nologin
fulgurance:x:1000:1000::/home/fulgurance:/bin/bash
messagebus:x:101:247:added by portage for dbus:/dev/null:/sbin/nologin
ldap:x:439:439:added by portage for openldap:/usr/lib64/openldap:/sbin/nologin
polkitd:x:102:105:added by portage for polkit:/var/lib/polkit-1:/sbin/nologin
rtkit:x:103:104:added by portage for rtkit:/dev/null:/sbin/nologin
vboxguest:x:104:102:added by portage for virtualbox-guest-additions:/dev/null:/bin/sh
postgres:x:70:70:added by portage for postgresql:/var/lib/postgresql:/bin/sh
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Tue Mar 06, 2018 9:43 pm    Post subject: Reply with quote

Ah ok... Excuse me, i didn't see...
Now i don't know, i would try to reemerge postgresql, but i'm not sure.
In my opinion the problem it could just be postgresql, considering that it doesn't start.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Wed Mar 07, 2018 9:14 am    Post subject: Reply with quote

I have rebuild package, but the same problem :cry:
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Wed Mar 07, 2018 2:26 pm    Post subject: Reply with quote

Maybe it is useful:

https://fedoraproject.org/wiki/Metasploit_Postgres_Setup#Starting_postgres

In your log, you have:

Quote:
...
le rôle « msf_user » n'existe pas
...

I think that you must create a database user.

I use metasploit in Kali Linux in which everything is already set up, but in Gentoo probably you must set all things.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Wed Mar 07, 2018 3:34 pm    Post subject: Reply with quote

I have found how to make new user and how to make new database with postgres with your link. But is it possible to add other default name for "msf_user" ? I have created new user called fulgurance, but msfconsole load by default msf_user .... Where i set that ?
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Wed Mar 07, 2018 4:12 pm    Post subject: Reply with quote

See if you have this file:

Quote:
/usr/share/metasploit-framework/config/database.yml

In my Kali Linux i have this file in which there is database's name, user, password.
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Wed Mar 07, 2018 4:17 pm    Post subject: Reply with quote

At least, if you don't have this file in that directory, you must try:

Code:
/# updatedb

and

Code:
/# locate database.yml

to find it.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Wed Mar 07, 2018 4:37 pm    Post subject: Reply with quote

Yes, i have finally found it before your post. It's very strange... the configuration file is on /usr/lib64/metasploit4.14/config/database.yml directory ... not in /etc/... strange.

Now, this problem is solved. I have just one problem, with nexpose module:

Code:
fulgurance@msi-gs73vr-6rf ~ $ gem install nexpose
Successfully installed nexpose-7.2.0
Parsing documentation for nexpose-7.2.0
Done installing documentation for nexpose after 1 seconds
1 gem installed
fulgurance@msi-gs73vr-6rf ~ $ msfconsole
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
[-] WARNING! The following modules could not be loaded!
[-]     /usr/lib64/metasploit4.14/modules/auxiliary/admin/http/nexpose_xxe_file_read.rb: LoadError cannot load such file -- nexpose
                                                 
 _                                                    _
/ \    /\         __                         _   __  /_/ __
| |\  / | _____   \ \           ___   _____ | | /  \ _   \ \
| | \/| | | ___\ |- -|   /\    / __\ | -__/ | || | || | |- -|
|_|   | | | _|__  | |_  / -\ __\ \   | |    | | \__/| |  | |_
      |/  |____/  \___\/ /\ \\___/   \/     \__|    |_\  \___\


       =[ metasploit v4.14.16-dev                         ]
+ -- --=[ 1645 exploits - 944 auxiliary - 290 post        ]
+ -- --=[ 486 payloads - 40 encoders - 9 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf >


I have looked, metasploit have nexpose use flag, but by default masked... dangerous to unmask this ?
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Wed Mar 07, 2018 5:43 pm    Post subject: Reply with quote

Try to enable nexpose use flag and reemerge... see wiki:

https://wiki.gentoo.org/wiki/Metasploit#USE_flags

It says:
Quote:
USE Flags
...
nexpose -- Enable the plugin to integrate with nexpose
...

I don't see others solutions.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Wed Mar 07, 2018 11:11 pm    Post subject: Reply with quote

I have enabled this use flag and others, now i have problem when portage try to build metasploit ... :roll: (i install gem before, because emerge error complain about missing gem, but if you look, install this gem don't solve this problem...)

Code:
fulgurance@msi-gs73vr-6rf ~ $ gem install metasploit-aggregator
Fetching: google-protobuf-3.5.1.2-x86_64-linux.gem (100%)
Successfully installed google-protobuf-3.5.1.2-x86_64-linux
Fetching: little-plugger-1.1.4.gem (100%)
Successfully installed little-plugger-1.1.4
Fetching: multi_json-1.13.1.gem (100%)
Successfully installed multi_json-1.13.1
Fetching: logging-2.2.2.gem (100%)
Successfully installed logging-2.2.2
Fetching: jwt-2.1.0.gem (100%)
Successfully installed jwt-2.1.0
Fetching: memoist-0.16.0.gem (100%)
Successfully installed memoist-0.16.0
Fetching: os-0.9.6.gem (100%)
Successfully installed os-0.9.6
Fetching: signet-0.8.1.gem (100%)
Successfully installed signet-0.8.1
Fetching: googleauth-0.6.2.gem (100%)
Successfully installed googleauth-0.6.2
Fetching: googleapis-common-protos-types-1.0.1.gem (100%)
Successfully installed googleapis-common-protos-types-1.0.1
Fetching: grpc-1.10.0-x86_64-linux.gem (100%)
Successfully installed grpc-1.10.0-x86_64-linux
Fetching: metasploit-aggregator-1.0.0.gem (100%)
Successfully installed metasploit-aggregator-1.0.0
Parsing documentation for google-protobuf-3.5.1.2-x86_64-linux
Installing ri documentation for google-protobuf-3.5.1.2-x86_64-linux
Parsing documentation for little-plugger-1.1.4
Installing ri documentation for little-plugger-1.1.4
Parsing documentation for multi_json-1.13.1
Installing ri documentation for multi_json-1.13.1
Parsing documentation for logging-2.2.2
Installing ri documentation for logging-2.2.2
Parsing documentation for jwt-2.1.0
Installing ri documentation for jwt-2.1.0
Parsing documentation for memoist-0.16.0
Installing ri documentation for memoist-0.16.0
Parsing documentation for os-0.9.6
Installing ri documentation for os-0.9.6
Parsing documentation for signet-0.8.1
Installing ri documentation for signet-0.8.1
Parsing documentation for googleauth-0.6.2
Installing ri documentation for googleauth-0.6.2
Parsing documentation for googleapis-common-protos-types-1.0.1
Installing ri documentation for googleapis-common-protos-types-1.0.1
Parsing documentation for grpc-1.10.0-x86_64-linux
Installing ri documentation for grpc-1.10.0-x86_64-linux
Parsing documentation for metasploit-aggregator-1.0.0
Installing ri documentation for metasploit-aggregator-1.0.0
Done installing documentation for google-protobuf, little-plugger, multi_json, logging, jwt, memoist, os, signet, googleauth, googleapis-common-protos-types, grpc, metasploit-aggregator after 2 seconds
12 gems installed
fulgurance@msi-gs73vr-6rf ~ $ sudo emerge --ask metasploit

These are the packages that would be merged, in order:

Calculating dependencies... done!                                 
[ebuild   R    ] net-analyzer/metasploit-4.14.16  USE="development* nexpose* openvas*"

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) net-analyzer/metasploit-4.14.16::gentoo
 * metasploit-4.14.16.tar.gz BLAKE2B SHA512 size ;-) ...                                                                                               [ ok ]
>>> Unpacking source...
 * Running unpack phase for all ...
>>> Unpacking metasploit-4.14.16.tar.gz to /var/tmp/portage/net-analyzer/metasploit-4.14.16/work/all
>>> Source unpacked in /var/tmp/portage/net-analyzer/metasploit-4.14.16/work
>>> Preparing source in /var/tmp/portage/net-analyzer/metasploit-4.14.16/work ...
 * Running prepare phase for all ...
 * Running prepare phase for all ...
 * Running source copy phase for ruby23 ...
 * Running prepare phase for ruby23 ...
Could not find gem 'metasploit-aggregator' in any of the gem sources listed in your Gemfile.
 * ERROR: net-analyzer/metasploit-4.14.16::gentoo failed (prepare phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_prepare
 *   environment, line 4596:  Called ruby-ng_src_prepare
 *   environment, line 4417:  Called _ruby_each_implementation 'each_ruby_prepare'
 *   environment, line  754:  Called _ruby_invoke_environment 'ruby23' 'each_ruby_prepare'
 *   environment, line  879:  Called each_ruby_prepare
 *   environment, line 1067:  Called die
 * The specific snippet of code:
 *       MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die;
 *
 * If you need support, post the output of `emerge --info '=net-analyzer/metasploit-4.14.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-analyzer/metasploit-4.14.16::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info =metasploit-4.14.16
 * The complete build log is located at '/var/tmp/portage/net-analyzer/metasploit-4.14.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/metasploit-4.14.16/temp/environment'.
 * Working directory: '/var/tmp/portage/net-analyzer/metasploit-4.14.16/work/ruby23/metasploit-framework-4.14.16'
 * S: '/var/tmp/portage/net-analyzer/metasploit-4.14.16/work/ruby23/metasploit-framework-4.14.16'

>>> Failed to emerge net-analyzer/metasploit-4.14.16, Log file:

>>>  '/var/tmp/portage/net-analyzer/metasploit-4.14.16/temp/build.log'

 * Messages for package net-analyzer/metasploit-4.14.16:

 * ERROR: net-analyzer/metasploit-4.14.16::gentoo failed (prepare phase):
 *   (no error message)
 *
 * Call stack:
 *     ebuild.sh, line  124:  Called src_prepare
 *   environment, line 4596:  Called ruby-ng_src_prepare
 *   environment, line 4417:  Called _ruby_each_implementation 'each_ruby_prepare'
 *   environment, line  754:  Called _ruby_invoke_environment 'ruby23' 'each_ruby_prepare'
 *   environment, line  879:  Called each_ruby_prepare
 *   environment, line 1067:  Called die
 * The specific snippet of code:
 *       MSF_ROOT="." BUNDLE_GEMFILE=Gemfile ${RUBY} -S bundle install --local || die;
 *
 * If you need support, post the output of `emerge --info '=net-analyzer/metasploit-4.14.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-analyzer/metasploit-4.14.16::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/net-analyzer/metasploit-4.14.16/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-analyzer/metasploit-4.14.16/temp/environment'.
 * Working directory: '/var/tmp/portage/net-analyzer/metasploit-4.14.16/work/ruby23/metasploit-framework-4.14.16'
 * S: '/var/tmp/portage/net-analyzer/metasploit-4.14.16/work/ruby23/metasploit-framework-4.14.16'


Full log: https://paste.pound-python.org/show/1dpdNhNWPve0EFRz3dNv/

Help ?
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Thu Mar 08, 2018 9:43 am    Post subject: Reply with quote

Do you use ruby23?

Code:
# eselect ruby list

If yes, do you enable ruby23 USE Flag for "net-analyzer/metasploit"?
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Thu Mar 08, 2018 12:30 pm    Post subject: Reply with quote

Yes, i have already see that
Code:
fulgurance@msi-gs73vr-6rf ~ $ eix metasploit
[I] app-eselect/eselect-metasploit
     Available versions:  (~)0.16
     Installed versions:  0.16(17:40:37 05/03/2018)
     Homepage:            http://www.pentoo.ch/
     Description:         eselect module for metasploit

[I] dev-ruby/metasploit-concern
     Available versions:  (2.0) (~)2.0.3^t
       {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby23"}
     Installed versions:  2.0.3(2.0)^t(17:57:08 05/03/2018)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby23")
     Homepage:            https://github.com/rapid7/metasploit-concern
     Description:         Metasploit concern allows you to define concerns in app/concerns.

[I] dev-ruby/metasploit-credential
     Available versions:  (2.0.8) (~)2.0.8^t
       {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby23"}
     Installed versions:  2.0.8(2.0.8)^t(17:57:31 05/03/2018)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby23")
     Homepage:            https://github.com/rapid7/metasploit-credential
     Description:         Code for modeling and managing credentials in Metasploit

[I] dev-ruby/metasploit-model
     Available versions:  (2.0) (~)2.0.3^t
       {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby23"}
     Installed versions:  2.0.3(2.0)^t(17:57:16 05/03/2018)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby23")
     Homepage:            https://github.com/rapid7/metasploit-model
     Description:         Common code, such as validators and mixins

[U] dev-ruby/metasploit-payloads
     Available versions: 
     (1.2.24) (~)1.2.24^st
     (1.2.28) (~)1.2.28^st
       {test ELIBC="FreeBSD" RUBY_TARGETS="ruby22 ruby23"}
     Installed versions:  1.2.24(1.2.24)^st(17:46:22 05/03/2018)(-test ELIBC="-FreeBSD" RUBY_TARGETS="ruby22 ruby23")
     Homepage:            https://rubygems.org/gems/metasploit-payloads
     Description:         Compiled binaries for Metasploit's Meterpreter

[I] dev-ruby/metasploit_data_models
     Available versions:  (2.0.14) (~)2.0.14^t
       {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby23"}
     Installed versions:  2.0.14(2.0.14)^t(17:57:24 05/03/2018)(-doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby23")
     Homepage:            https://github.com/rapid7/metasploit_data_models
     Description:         The database layer for Metasploit

[I] dev-ruby/metasploit_payloads-mettle
     Available versions:  (0.1.9) (~)0.1.9^st
       {test ELIBC="FreeBSD" RUBY_TARGETS="ruby22 ruby23"}
     Installed versions:  0.1.9(0.1.9)^st(17:45:54 05/03/2018)(-test ELIBC="-FreeBSD" RUBY_TARGETS="ruby22 ruby23")
     Homepage:            https://rubygems.org/gems/metasploit_payloads-mettle
     Description:         Compiled binaries for Metasploit's next-gen Meterpreter

[I] net-analyzer/metasploit
     Available versions: 
     (4.14) (~)4.14.16^s
     (9999) **9999^s
       {development +java nexpose openvas oracle +pcap test ELIBC="FreeBSD" RUBY_TARGETS="ruby23"}
     Installed versions:  4.14.16(4.14)^s(17:57:42 05/03/2018)(java pcap -development -nexpose -openvas -oracle -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby23")
     Homepage:            http://www.metasploit.org/
     Description:         Advanced framework for developing, testing, and using vulnerability exploit code

Found 8 matches
fulgurance@msi-gs73vr-6rf ~ $ sudo eselect ruby list
Mot de passe : 
Available Ruby profiles:
  [1]   ruby22 (with Rubygems)
  [2]   ruby23 (with Rubygems) *
  [3]   ruby24 (with Rubygems)
  [4]   ruby25 (with Rubygems)
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Thu Mar 08, 2018 1:44 pm    Post subject: Reply with quote

Maybe you must emerge "dev-ruby/bundler" and run again

Code:
$ gem install metasploit-aggregator

As mentioned here:

http://bundler.io/


Quote:
Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Thu Mar 08, 2018 2:44 pm    Post subject: Reply with quote

Already installed :(

Code:
fulgurance@msi-gs73vr-6rf ~ $ sudo emerge --ask bundler
Mot de passe : 

These are the packages that would be merged, in order:

Calculating dependencies                                       ... done!
[ebuild   R    ] dev-ruby/bundler-1.16.1

Would you like to merge these packages? [Yes/No] n

Quitting.

fulgurance@msi-gs73vr-6rf ~ $ eix bundler
* dev-java/felix-bundlerepository
     Available versions:  1.6.6 {ELIBC="FreeBSD"}
     Homepage:            http://felix.apache.org/
     Description:         Felix Bundle Repository

* dev-java/jarbundler
     Available versions:  1.8.1-r2 (~)2.3.1 {doc source ELIBC="FreeBSD"}
     Homepage:            http://www.loomcom.com/jarbundler/
     Description:         Jar Bundler Ant Task

[I] dev-ruby/bundler
     Available versions:  1.12.5^t (~)1.12.6^t (~)1.13.7^t (~)1.14.6 (~)1.15.4 (~)1.16.1 {(+)doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby22 ruby23 ruby24 ruby25"}
     Installed versions:  1.16.1(18:22:59 07/03/2018)(doc -test ELIBC="-FreeBSD" RUBY_TARGETS="ruby22 ruby23 ruby24 ruby25")
     Homepage:            https://github.com/carlhuda/bundler
     Description:         An easy way to vendor gem dependencies

* dev-ruby/bundler-audit
     Available versions:  (~)0.6.0^t {doc test ELIBC="FreeBSD" RUBY_TARGETS="ruby22 ruby23"}
     Homepage:            https://github.com/rubysec/bundler-audit
     Description:         Provides patch-level verification for Bundled apps

Found 4 matches
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Thu Mar 08, 2018 3:20 pm    Post subject: Reply with quote

I think a solution is on this page, but i don't understand what to do ... https://github.com/rapid7/metasploit-aggregator
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Thu Mar 08, 2018 3:28 pm    Post subject: Reply with quote

In my system i have "Gemfile" (with G uppercase) under
Quote:

/usr/share/metasploit-framework/

In this file i have metasploit-aggregator lines:

Quote:
...
gem 'metasploit-aggregator' ...
...


Check if you have it too.

Otherwise see:

https://github.com/bundler/bundler/issues/1767

Could be interesting.
Back to top
View user's profile Send private message
Fulgurance
Guru
Guru


Joined: 15 Feb 2017
Posts: 552

PostPosted: Thu Mar 08, 2018 3:38 pm    Post subject: Reply with quote

Finally solved !!! Just launch gem install command with sudo ... seriously...

When portage complain missing gemfile, install gem with sudo and it's good.

Just one question:
this message is it normal ?
Code:
fulgurance@msi-gs73vr-6rf ~ $ msfconsole
The PGconn, PGresult, and PGError constants are deprecated, and will be
removed as of version 1.0.

You should use PG::Connection, PG::Result, and PG::Error instead, respectively.

Called from /usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
                                                 
  +-------------------------------------------------------+
  |  METASPLOIT by Rapid7                                 |
  +---------------------------+---------------------------+
  |      __________________   |                           |
  |  ==c(______(o(______(_()  | |""""""""""""|======[***  |
  |             )=\           | |  EXPLOIT   \            |
  |            // \\          | |_____________\_______    |
  |           //   \\         | |==[msf >]============\   |
  |          //     \\        | |______________________\  |
  |         // RECON \\       | \(@)(@)(@)(@)(@)(@)(@)/   |
  |        //         \\      |  *********************    |
  +---------------------------+---------------------------+
  |      o O o                |        \'\/\/\/'/         |
  |              o O          |         )======(          |
  |                 o         |       .'  LOOT  '.        |
  | |^^^^^^^^^^^^^^|l___      |      /    _||__   \       |
  | |    PAYLOAD     |""\___, |     /    (_||_     \      |
  | |________________|__|)__| |    |     __||_)     |     |
  | |(@)(@)"""**|(@)(@)**|(@) |    "       ||       "     |
  |  = = = = = = = = = = = =  |     '--------------'      |
  +---------------------------+---------------------------+


       =[ metasploit v4.14.16-dev                         ]
+ -- --=[ 1645 exploits - 945 auxiliary - 290 post        ]
+ -- --=[ 486 payloads - 40 encoders - 9 nops             ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > exit


I talk about this message:

Code:
Called from /usr/lib64/ruby/gems/2.3.0/gems/activesupport-4.2.10/lib/active_support/dependencies.rb:240:in `load_dependency'
Back to top
View user's profile Send private message
Maxxx
Guru
Guru


Joined: 12 Jan 2016
Posts: 515
Location: Italia

PostPosted: Thu Mar 08, 2018 3:56 pm    Post subject: Reply with quote

See this:

https://github.com/rails/rails/issues/29521

and this:

https://stackoverflow.com/questions/49149608/the-pgconn-pgresult-and-pgerror-constants-are-deprecated-on-heroku-and-rails/49150265#49150265

Maybe they help you.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum