metasploit-framework
https://github.com/rapid7/metasploit-framework
Ruby
Metasploit Framework
Msf::DBManager::Cred#report_auth_info
Store a set of credentials in the database. report_auth_info used to create a note, now it creates an entry in the creds table. It's much more akin to report_vuln() now. opts MUST contain +:host+:: an IP address or Host object reference +:port+:: a port number opts can contain +:user+:: the username +:pass+:: the password, or path to ssh_key +:ptype+:: the type of password (password(ish), hash, or ssh_key) +:proto+:: a transport name for the port +:sname+:: service name +:active+:: by default, a cred is active, unless explicitly false +:proof+:: data used to prove the account is actually active. Sources: Credentials can be sourced from another credential, or from a vulnerability. For example, if an exploit was used to dump the smb_hashes, and this credential comes from there, the source_id would be the Vuln id (as reported by report_vuln) and the type would be "Vuln". +:source_id+:: The Vuln or Cred id of the source of this cred. +:source_type+:: Either Vuln or Cred TODO: This is written somewhat host-centric, when really the Service is the thing. Need to revisit someday.
Edit
git clone [email protected]:rapid7/metasploit-framework.git
cd metasploit-framework
open lib/msf/core/db_manager/cred.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Msf--DBManager--Cred-report_auth_info-for-pr
# Commit to gitgit add lib/msf/core/db_manager/cred.rbgit commit -m "better docs for Msf::DBManager::Cred#report_auth_info"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Msf--DBManager--Cred-report_auth_info-for-pr
hub pull-request
# Celebrate!