I am trying to access the credentials I have gathered so far with Metasploit in a Ruby-Resource script. Unfortunately I get the following error when I try to access framework.db.creds.

>> framework.db.creds.each
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR:  missing    FROM-clause entry for table "hosts"
LINE 1: SELECT "creds".* FROM "creds" WHERE (hosts.workspace_id = 2)

When I look into the creds table, I see that it is not populated. Instead, I see that credentials are stored in metasploit_credential_* tables. The creds method seems to be supported, though...

>> framework.db.methods.each do |m|
?> next if ( m !~ /creds/ )
>> print_line("#{m}")
>> end


Am I doing something wrong or is this a (known) issue with Metasploit? I discovered this problem when trying to run the supplied auto_pass_the_hash.rc script.

I'm running the following version of Metasploit

msf > version
Framework: 4.12.13-dev-202969fae9c0a27bff5c1a82cbe4badb7438036d
Console  : 4.12.13-dev-202969fae9c0a27bff5c1a82cbe4badb7438036d

1 Answer 1


Patch is available at https://github.com/rapid7/metasploit-framework/pull/7104. If you are using the Github repo, pull the PR in and test. Otherwise, you will have to wait till the patch is included in the Kali update or MSF Pro/Community versions.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .