arachni-ui-web icon indicating copy to clipboard operation
arachni-ui-web copied to clipboard

New and existing db postgresql/sqlite3 got BCrypt::Errors::InvalidHash: invalid hash error

Open eL-Prova opened this issue 4 years ago • 3 comments

I try to setup arachni. Got login page but with default credentials it returns Something went wrong. Looked in log and saw message: BCrypt::Errors::InvalidHash: invalid hash

So removed the sqlite3 database and run arachni_web_task db:setup but got a [WARN] ([WARN] table 'Role' doesn't exist. Did you run the migration ? Ignoring rolify config.), but after that got the same error again.

So tried with postgresql but even that one got the same error. Do anyone know how to solve?

Version: 1.5.1-0.5.12 OS: Ubuntu 18.04 / Kali 2020.1

Full:

[WARN] table 'Role' doesn't exist. Did you run the migration ? Ignoring rolify config.
-- create_table("comments", {:force=>:cascade})
   -> 0.0232s
-- create_table("dispatchers", {:force=>:cascade})
   -> 0.0053s
-- create_table("dispatchers_users", {:id=>false, :force=>:cascade})
   -> 0.0015s
-- create_table("issues", {:force=>:cascade})
   -> 0.0076s
-- create_table("notifications", {:force=>:cascade})
   -> 0.0055s
-- create_table("profiles", {:force=>:cascade})
   -> 0.0085s
-- create_table("profiles_users", {:id=>false, :force=>:cascade})
   -> 0.0016s
-- create_table("reports", {:force=>:cascade})
   -> 0.0058s
-- create_table("roles", {:force=>:cascade})
   -> 0.0053s
-- add_index("roles", ["name", "resource_type", "resource_id"], {:name=>"index_roles_on_name_and_resource_type_and_resource_id"})
   -> 0.0033s
-- add_index("roles", ["name"], {:name=>"index_roles_on_name"})
   -> 0.0029s
-- create_table("scan_groups", {:force=>:cascade})
   -> 0.0045s
-- create_table("scan_groups_scans", {:id=>false, :force=>:cascade})
   -> 0.0014s
-- create_table("scan_groups_users", {:id=>false, :force=>:cascade})
   -> 0.0015s
-- create_table("scans", {:force=>:cascade})
   -> 0.0070s
-- create_table("scans_users", {:id=>false, :force=>:cascade})
   -> 0.0015s
-- create_table("schedules", {:force=>:cascade})
   -> 0.0057s
-- create_table("settings", {:force=>:cascade})
   -> 0.0060s
-- create_table("users", {:force=>:cascade})
   -> 0.0066s
-- add_index("users", ["email"], {:name=>"index_users_on_email", :unique=>true})
   -> 0.0035s
-- add_index("users", ["reset_password_token"], {:name=>"index_users_on_reset_password_token", :unique=>true})
   -> 0.0031s
-- create_table("users_roles", {:id=>false, :force=>:cascade})
   -> 0.0015s
-- add_index("users_roles", ["user_id", "role_id"], {:name=>"index_users_roles_on_user_id_and_role_id"})
   -> 0.0031s
-- initialize_schema_migrations_table()
   -> 0.0075s
SETTING UP EMPTY SETTINGS
SETTING UP DEFAULT USERS
rake aborted!
BCrypt::Errors::InvalidHash: invalid hash
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/bcrypt-3.1.11/lib/bcrypt/password.rb:60:in `initialize'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/bcrypt-3.1.11/lib/bcrypt/password.rb:46:in `new'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/bcrypt-3.1.11/lib/bcrypt/password.rb:46:in `create'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/devise-3.5.10/lib/devise/encryptor.rb:9:in `digest'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/devise-3.5.10/lib/devise/models/database_authenticatable.rb:150:in `password_digest'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/devise-3.5.10/lib/devise/models/database_authenticatable.rb:43:in `password='
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_assignment.rb:54:in `public_send'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_assignment.rb:54:in `_assign_attribute'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_assignment.rb:41:in `block in assign_attributes'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_assignment.rb:35:in `each'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_assignment.rb:35:in `assign_attributes'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/core.rb:566:in `init_attributes'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/core.rb:281:in `initialize'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/inheritance.rb:61:in `new'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/inheritance.rb:61:in `new'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/persistence.rb:50:in `create!'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/arachni-ui-web/db/seeds.rb:15:in `<top (required)>'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `block in load'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activesupport-4.2.5.1/lib/active_support/dependencies.rb:268:in `load'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/railties-4.2.5.1/lib/rails/engine.rb:547:in `load_seed'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/tasks/database_tasks.rb:250:in `load_seed'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/activerecord-4.2.5.1/lib/active_record/railties/databases.rake:183:in `block (2 levels) in <top (required)>'
/home/ubuntu/tools/arachni-1.5.1-0.5.12/system/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:setup => db:seed
(See full trace by running task with --trace)

eL-Prova avatar Feb 21 '20 12:02 eL-Prova

Same here on Centos 8.1.1911

dcabro avatar Feb 26 '20 13:02 dcabro

Just found out that arachni is no longer being maintained: https://www.arachni-scanner.com/blog/arachni-is-no-longer-maintained/

dcabro avatar Feb 26 '20 13:02 dcabro

True, saw it last week too. But its since 28 january 2020 so I dont believe its broken within a month. I have less experience with ruby yet, but can the solution be to update all gems to make it work?

@Zapotek hopefully he can help to make it work for the community

eL-Prova avatar Feb 26 '20 13:02 eL-Prova