{"action":"closed","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5266","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5266/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5266/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5266/events","html_url":"https://github.com/rapid7/metasploit-framework/issues/5266","id":71696260,"number":5266,"title":"SNMP Login Scanner multiple issues","user":{"login":"FireFart","id":105281,"avatar_url":"https://avatars.githubusercontent.com/u/105281?v=3","gravatar_id":"","url":"https://api.github.com/users/FireFart","html_url":"https://github.com/FireFart","followers_url":"https://api.github.com/users/FireFart/followers","following_url":"https://api.github.com/users/FireFart/following{/other_user}","gists_url":"https://api.github.com/users/FireFart/gists{/gist_id}","starred_url":"https://api.github.com/users/FireFart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FireFart/subscriptions","organizations_url":"https://api.github.com/users/FireFart/orgs","repos_url":"https://api.github.com/users/FireFart/repos","events_url":"https://api.github.com/users/FireFart/events{/privacy}","received_events_url":"https://api.github.com/users/FireFart/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/creds","name":"creds","color":"d4c5f9"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/library","name":"library","color":"fad8c7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/module","name":"module","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-04-28T20:36:15Z","updated_at":"2015-05-19T16:31:25Z","closed_at":"2015-05-19T16:31:25Z","body":"This is the output of the SNMP Login scanner (https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/snmp/snmp_login.rb) in verbose mode without having a DB connected.\r\nAlso notice the wrong messages printed out.\r\n\r\n* We only need the \"no DB active\" message once\r\n * https://github.com/rapid7/metasploit-framework/blob/c2a252face46e541c6608f56abf1945cc91231e8/lib/msf/core/auxiliary/report.rb#L43\r\n* The output needs to be changed\r\n * On fail a `credential.proof` is printed out. It's only non nil on success so the `proof` needs to be moved to the success message: https://github.com/rapid7/metasploit-framework/blob/c2a252face46e541c6608f56abf1945cc91231e8/modules/auxiliary/scanner/snmp/snmp_login.rb#L83\r\n * There is an extra `:` after the credential which looks like it's caused by `.to_s`: https://github.com/rapid7/metasploit-framework/blob/c2a252face46e541c6608f56abf1945cc91231e8/lib/metasploit/framework/credential.rb#L79\r\n * The leading `:161SNMP` tracks down to here: https://github.com/rapid7/metasploit-framework/blob/c2a252face46e541c6608f56abf1945cc91231e8/lib/msf/core/auxiliary/auth_brute.rb#L570 The Code assumes there is a `RHOST` datastore option but in this case it's a `RHOSTS`. The rest of the code uses the `RHOST`option multiple times (example: https://github.com/rapid7/metasploit-framework/blob/c2a252face46e541c6608f56abf1945cc91231e8/lib/msf/core/auxiliary/auth_brute.rb#L252) so these occurences need to be changed too\r\n\r\n```\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: private: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[!] No active DB -- Credential data will not be saved!\r\n[+] 10.10.10.10:161 - LOGIN SUCCESSFUL: 0: (Access level: read-only)\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: 0392a0: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: 1234: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: 2read: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: 4changes: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: ANYCOM: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: Admin: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: C0de: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: CISCO: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: CR52401: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: IBM: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: ILMI: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: Intermec: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: NoGaH$@!: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: OrigEquipMfr: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: PRIVATE: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: PUBLIC: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: Private: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: Public: (Incorrect: )\r\n[!] No active DB -- Credential data will not be saved!\r\n[-] :161SNMP - 10.10.10.10:161 - LOGIN FAILED: SECRET: (Incorrect: )\r\n```"}}