diff --git a/modules/exploits/linux/snmp/awind_snmp_exec.rb b/modules/exploits/linux/snmp/awind_snmp_exec.rb index 7102f005a1..d629ae983a 100644 --- a/modules/exploits/linux/snmp/awind_snmp_exec.rb +++ b/modules/exploits/linux/snmp/awind_snmp_exec.rb @@ -58,9 +58,15 @@ class MetasploitModule < Msf::Exploit::Remote sys_description = snmp.get_value('1.3.6.1.2.1.1.1.0').to_s print_status("Target system is #{sys_description}") # AM-100 and AM-101 considered EOL, no fix so no need to check version. - return Exploit::CheckCode::Vulnerable if sys_description.include? "Crestron Electronics AM-100" or sys.description.include? "Crestron Electronics AM-101" - # TODO: insert description check for other vulnerable models (that I don't have) - # In the meantime, we return 'unknown'. + model = sys_description.scan(/Crestron Electronics (AM-100|AM-101)/).flatten.first + case model + when 'AM-100', 'AM-101' + return CheckCode::Vulnerable + else + # TODO: insert description check for other vulnerable models (that I don't have) + # In the meantime, we return 'safe'. + return CheckCode::Safe + end rescue SNMP::RequestTimeout print_error("#{ip} SNMP request timeout.") rescue Rex::ConnectionError