Lucene search

K
nessusThis script is Copyright (C) 2022-2023 Tenable Network Security, Inc.D-LINK_ROUTER_CVE-2021-45382.NASL
HistoryNov 03, 2022 - 12:00 a.m.

D-Link Routers RCE (CVE-2021-45382)

2022-11-0300:00:00
This script is Copyright (C) 2022-2023 Tenable Network Security, Inc.
www.tenable.com
17
d-link routers
rce vulnerability
cve-2021-45382
ddns function
ncc2 binary
end of life
end of service life
nessus scanner

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

0.969 High

EPSS

Percentile

99.7%

The remote D-Link router is affected by a vulnerability. A Remote Command Execution (RCE) vulnerability exists in all series H/W revisions D-link DIR-810L, DIR-820L/LW, DIR-826L, DIR-830L, and DIR-836L routers via the DDNS function in ncc2 binary file. Note: DIR-810L, DIR-820L, DIR-830L, DIR-826L, DIR-836L, all hardware revisions, have reached their End of Life (EOL) /End of Service Life (EOS) Life-Cycle and as such this issue will not be patched.

Note that Nessus has not tested for this issue but has instead relied only on the router’s self-reported model.

#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##

include('compat.inc');

if (description)
{
  script_id(166891);
  script_version("1.3");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/08/10");

  script_cve_id("CVE-2021-45382");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/04/25");

  script_name(english:"D-Link Routers RCE (CVE-2021-45382)");

  script_set_attribute(attribute:"synopsis", value:
"The remote router is affected by a remote command execution vulnerability.");
  script_set_attribute(attribute:"description", value:
"The remote D-Link router is affected by a vulnerability. A Remote Command Execution (RCE) vulnerability exists in all
series H/W revisions D-link DIR-810L, DIR-820L/LW, DIR-826L, DIR-830L, and DIR-836L routers via the DDNS function in
ncc2 binary file. Note: DIR-810L, DIR-820L, DIR-830L, DIR-826L, DIR-836L, all hardware revisions, have reached their End
of Life (EOL) /End of Service Life (EOS) Life-Cycle and as such this issue will not be patched.

Note that Nessus has not tested for this issue but has instead relied only on the router's self-reported model.");
  # https://github.com/doudoudedi/D-LINK_Command_Injection1/blob/main/D-LINK_Command_injection.md
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?2830baeb");
  # https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10264
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?4cb3d29f");
  script_set_attribute(attribute:"solution", value:
"Upgrade to a supported device.");
  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:F/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:F/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-45382");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2022/04/04");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/11/03");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2022-2023 Tenable Network Security, Inc.");

  script_dependencies("d-link_router_detect.nasl");
  script_require_keys("www/d-link", "d-link/model");
  script_require_ports("Services/www", 80);

  exit(0);
}

include('http.inc');

var model = toupper(get_kb_item_or_exit('d-link/model'));
if (
   model !~ "^DIR-810L$" &&
   model !~ "^DIR-820LW?$" &&
   model !~ "^DIR-826L$" &&
   model !~ "^DIR-830L$" &&
   model !~ "^DIR-836L$"
  )
 audit(AUDIT_HOST_NOT, 'an affected D-Link model');

var port = get_http_port(default:80, embedded:1);
var items = make_array('Model', model, 'Solution', 'Upgrade to a supported device');
var order = make_list('Model', 'Solution');
var report = report_items_str(report_items:items, ordered_fields:order);

security_report_v4(port:port, severity:SECURITY_HOLE, extra:report);

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

0.969 High

EPSS

Percentile

99.7%