Не удаётся подключиться к db metasploit

egorngvcn

New member
18.10.2021
3
0
BIT
0
Здравствуйте! Копался в metasploit и обнаружил у себя проблему, а именно то, что база данных postgresql не хочет работать с metasploit(или наоборот) нормально.

пытаюсь законектиться к ней

msf6 > db_connect -y /usr/share/metasploit-framework/config/database.yml
[-] Error while running command db_connect: connection to server at "::1", port 5432 failed: ВАЖНО: пользователь "msf" не прошёл проверку подлинности (по паролю)
connection to server at "::1", port 5432 failed: ВАЖНО: пользователь "msf" не прошёл проверку подлинности (по паролю)


Call stack:
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:459:in `with_connection'
/usr/share/metasploit-framework/lib/msf/core/db_manager/connection.rb:118:in `connection_established?'
/usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:134:in `method_missing'
/usr/share/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1936:in `cmd_db_connect'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in `run_command'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in `block in run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `each'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:162:in `run'
/usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
/usr/bin/msfconsole:23:in `<main>'

также пытался и другим способом

msf6 > db_connect msf:ga+FiQU6gh6I/NiOYk+OBkBDefg+giVihIGVyJB/BB4=@localhost:5432/msf_test
[-] Error while running command db_connect: connection to server at "::1", port 5432 failed: ВАЖНО: пользователь "msf" не прошёл проверку подлинности (по паролю)
connection to server at "::1", port 5432 failed: ВАЖНО: пользователь "msf" не прошёл проверку подлинности (по паролю)


Call stack:
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `public_send'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:882:in `new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:926:in `checkout_new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:905:in `try_to_checkout_new_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:866:in `acquire_connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:588:in `checkout'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:428:in `connection'
/usr/share/metasploit-framework/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:459:in `with_connection'
/usr/share/metasploit-framework/lib/msf/core/db_manager/connection.rb:118:in `connection_established?'
/usr/share/metasploit-framework/lib/metasploit/framework/data_service/proxy/core.rb:134:in `method_missing'
/usr/share/metasploit-framework/lib/msf/ui/console/command_dispatcher/db.rb:1936:in `cmd_db_connect'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:581:in `run_command'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:530:in `block in run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `each'
/usr/share/metasploit-framework/lib/rex/ui/text/dispatcher_shell.rb:524:in `run_single'
/usr/share/metasploit-framework/lib/rex/ui/text/shell.rb:162:in `run'
/usr/share/metasploit-framework/lib/metasploit/framework/command/console.rb:48:in `start'
/usr/share/metasploit-framework/lib/metasploit/framework/command/base.rb:82:in `start'
/usr/bin/msfconsole:23:in `<main>'

но таже самая ошибка(
брал пароль для пользователя msf из файла /usr/share/metasploit-framework/config/database.yml и пробовал подключиться к postresql, всё логиниться
хз что делать, пробовал гуглить, но ничего не нашёл
 
Мы в соцсетях:

Обучение наступательной кибербезопасности в игровой форме. Начать игру!