code | #
# (C) Tenable Network Security, Inc.
#
include("compat.inc");
if (description)
{
script_id(95439);
script_version("1.7");
script_cvs_date("Date: 2019/11/13");
script_cve_id("CVE-2016-7541");
script_bugtraq_id(94477);
script_name(english:"Fortinet FortiOS 5.x < 5.4.2 Flow-mode Detection Bypass");
script_summary(english:"Checks the version of FortiOS.");
script_set_attribute(attribute:"synopsis", value:
"The remote host is affected by a security bypass vulnerability.");
script_set_attribute(attribute:"description", value:
"The remote FortiGate device is running a version of FortiOS that is
5.x prior to 5.4.2. It is, therefore, affected by a security bypass
vulnerability when reloading the scanning engine after an update that
results in active network sessions no longer being monitored by
flow-mode detection. An unauthenticated, remote attacker can exploit
this vulnerability to bypass security protection.");
# http://fortiguard.com/advisory/fortios-flow-mode-detection-bypass-under-certain-conditions
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?79976042");
script_set_attribute(attribute:"solution", value:
"Upgrade to Fortinet FortiOS version 5.4.2 or later.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:P/A:N");
script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N");
script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
script_set_attribute(attribute:"cvss_score_source", value:"CVE-2016-7541");
script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
script_set_attribute(attribute:"exploit_available", value:"false");
script_set_attribute(attribute:"vuln_publication_date", value:"2016/11/22");
script_set_attribute(attribute:"patch_publication_date", value:"2016/11/22");
script_set_attribute(attribute:"plugin_publication_date", value:"2016/12/01");
script_set_attribute(attribute:"potential_vulnerability", value:"true");
script_set_attribute(attribute:"plugin_type", value:"local");
script_set_attribute(attribute:"cpe", value:"cpe:/o:fortinet:fortios");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Firewalls");
script_copyright(english:"This script is Copyright (C) 2016-2019 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("fortinet_version.nbin");
script_require_keys("Host/Fortigate/model", "Host/Fortigate/version", "Settings/ParanoidReport");
exit(0);
}
include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");
if (report_paranoia < 2) audit(AUDIT_PARANOID);
app_name = "FortiOS";
version = get_kb_item_or_exit("Host/Fortigate/version");
model = get_kb_item_or_exit("Host/Fortigate/model");
# Make sure device is FortiGate
if (!preg(string:model, pattern:"fortigate", icase:TRUE)) audit(AUDIT_HOST_NOT, "a FortiGate");
if (version =~ "^5\.[024]\.") fix = "5.4.2";
else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);
if (ver_compare(ver:version, fix:fix, strict:FALSE) == -1)
{
report =
'\n Model : ' + model +
'\n Installed version : ' + version +
'\n Fixed version : ' + fix +
'\n';
security_report_v4(severity:SECURITY_WARNING, extra:report, port:0);
}
else audit(AUDIT_INST_VER_NOT_VULN, app_name, version);
|