Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/modules/auxiliary/scanner/misc/sercomm_backdoor_scanner.rb
Views: 11784
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary6include Msf::Exploit::Remote::Tcp7include Msf::Auxiliary::Scanner8include Msf::Auxiliary::Report910def initialize(info={})11super(update_info(info,12'Name' => 'SerComm Network Device Backdoor Detection',13'Description' => %q{14This module can identify SerComm manufactured network devices which15contain a backdoor, allowing command injection or account disclosure.16},17'Author' =>18[19'Eloi Vanderbeken <eloi.vanderbeken[at]gmail.com>', # Initial discovery, poc20'Matt "hostess" Andreko <mandreko[at]accuvant.com>' # Msf module21],22'License' => MSF_LICENSE,23'References' =>24[25[ 'CVE', '2014-0659' ],26[ 'OSVDB', '101653' ],27[ 'URL', 'https://github.com/elvanderb/TCP-32764' ]28],29'DisclosureDate' => '2013-12-31' ))3031register_options([32Opt::RPORT(32764)33])34end3536def do_report(ip, endianness)37report_vuln({38:host => ip,39:port => rport,40:name => "SerComm Network Device Backdoor",41:refs => self.references,42:info => "SerComm Network Device Backdoor found on a #{endianness} device"43})44end4546def run_host(ip)47begin48connect49sock.put(Rex::Text.rand_text(5))50res = sock.get_once51disconnect5253if (res && res.start_with?("MMcS"))54print_good("#{ip}:#{rport} - Possible backdoor detected - Big Endian")55do_report(ip, "Big Endian")56elsif (res && res.start_with?("ScMM"))57print_good("#{ip}:#{rport} - Possible backdoor detected - Little Endian")58do_report(ip, "Little Endian")59else60vprint_status("#{ip}:#{rport} - Backdoor not detected.")61end62rescue Rex::ConnectionError => e63vprint_error("#{ip}:#{rport} - Connection failed: #{e.class}: #{e}")64end65end66end676869