Lucene search

K
nessusThis script is Copyright (C) 2022-2023 Tenable, Inc.D-LINK_ROUTER_CVE-2020-25506.NASL
HistoryNov 04, 2022 - 12:00 a.m.

D-Link Routers RCE (CVE-2020-25506)

2022-11-0400:00:00
This script is Copyright (C) 2022-2023 Tenable, Inc.
www.tenable.com
5

The remote D-Link router is affected by a vulnerability. D-Link DNS-320 FW v2.06B01 Revision Ax is affected by command injection in the system_mgr.cgi component, which can lead to remote arbitrary code execution.

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(166966);
  script_version("1.3");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/08/10");

  script_cve_id("CVE-2020-25506");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"D-Link Routers RCE (CVE-2020-25506)");

  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. D-Link DNS-320 FW v2.06B01 Revision Ax is affected by command
injection in the system_mgr.cgi component, which can lead to remote arbitrary code execution.

Note that Nessus has not tested for this issue but has instead relied only on the router's self-reported model.");
  script_set_attribute(attribute:"see_also", value:"https://gist.github.com/WinMin/6f63fd1ae95977e0e2d49bd4b5f00675");
  # https://supportannouncement.us.dlink.com/announcement/publication.aspx?name=SAP10183
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?41aae730");
  script_set_attribute(attribute:"solution", value:
"Upgrade to a supported device.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  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-2020-25506");

  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:"2020/07/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/11/04");

  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, 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 !~ "^DNS-320$")
 audit(AUDIT_HOST_NOT, 'an affected D-Link model');

if (report_paranoia < 2) audit(AUDIT_POTENTIAL_VULN, 'D-Link model ' + 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);