Lexmark Printer Shortcut Integrity Vulnerability (CVE-2019-6489)

2019-02-15T00:00:00
ID OPENVAS:1361412562310142001
Type openvas
Reporter This script is Copyright (C) 2019 Greenbone Networks GmbH
Modified 2019-09-04T00:00:00

Description

Certain Lexmark CX, MX, X, XC, XM, XS, and 6500e devices allow remote attackers to erase stored shortcuts.

                                        
                                            # Copyright (C) 2019 Greenbone Networks GmbH
# Text descriptions are largely excerpted from the referenced
# advisory, and are Copyright (C) of the respective author(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.

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.142001");
  script_version("2019-09-04T08:55:10+0000");
  script_tag(name:"last_modification", value:"2019-09-04 08:55:10 +0000 (Wed, 04 Sep 2019)");
  script_tag(name:"creation_date", value:"2019-02-15 15:35:14 +0700 (Fri, 15 Feb 2019)");
  script_tag(name:"cvss_base", value:"6.4");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:P/A:P");

  script_cve_id("CVE-2019-6489");

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

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

  script_name("Lexmark Printer Shortcut Integrity Vulnerability (CVE-2019-6489)");

  script_category(ACT_GATHER_INFO);

  script_copyright("This script is Copyright (C) 2019 Greenbone Networks GmbH");
  script_family("General");
  script_dependencies("gb_lexmark_printer_consolidation.nasl");
  script_mandatory_keys("lexmark_printer/detected", "lexmark_printer/model");

  script_tag(name:"summary", value:"Certain Lexmark CX, MX, X, XC, XM, XS, and 6500e devices allow remote
  attackers to erase stored shortcuts.");

  script_tag(name:"vuldetect", value:"Checks if a vulnerable firmware version is present on the target host.");

  script_tag(name:"insight", value:"A vulnerability has been identified in the embedded web server used in older
  generation Lexmark devices. The vulnerability allows an unauthenticated user to purge/erase shortcuts stored on
  the device.");

  script_tag(name:"impact", value:"Successful exploitation of this vulnerability can lead to the erasure of stored
  shortcuts on the affected device.");

  script_tag(name:"solution", value:"See the referenced vendor advisory for a solution.");

  script_xref(name:"URL", value:"http://support.lexmark.com/index?page=content&id=TE912");

  exit(0);
}

include("host_details.inc");
include("version_func.inc");

if (!model = get_kb_item("lexmark_printer/model"))
  exit(0);

cpe = 'cpe:/o:lexmark:' + tolower(model) + "_firmware";
if (!version = get_app_version(cpe: cpe, nofork: TRUE))
  exit(0);

if (model =~ "^CX310") {
  if (version_is_less_equal(version: version, test_version: "lw71.gm2.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.vy4.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^CX410") {
  if (version_is_less_equal(version: version, test_version: "lw71.gm4.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.gm4.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^(CX510|XC2132)") {
  if (version_is_less_equal(version: version, test_version: "lw71.gm7.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.gm7.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^MX31") {
  if (version_is_less_equal(version: version, test_version: "lw71.sb2.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.sb2.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^(MX41|MX51)") {
  if (version_is_less_equal(version: version, test_version: "lw71.sb4.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.sb4.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^(XM1145)") {
  if (version_is_less_equal(version: version, test_version: "lw71.sb4.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.sb4.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^MX61") {
  if (version_is_less_equal(version: version, test_version: "lw71.sb7.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.sb7.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^XM3150") {
  if (version_is_less_equal(version: version, test_version: "lw71.sb7.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.sb7.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^(MX71|MX81|XM51|XM71)") {
  if (version_is_less_equal(version: version, test_version: "lw71.tu.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.tu.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^(MX91|XM91)") {
  if (version_is_less_equal(version: version, test_version: "lw71.mg.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.mg.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^MX6500") {
  if (version_is_less(version: version, test_version: "lw71.jd.p216")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lw71.jd.p217");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X(S)?54") {
  if (version_is_less_equal(version: version, test_version: "lhs60.vk.p682")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.vk.p683");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X(S)?74") {
  if (version_is_less_equal(version: version, test_version: "lhs60.ny.p682")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.ny.p683");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X(S)?79") {
  if (version_is_less_equal(version: version, test_version: "lhs60.mr.p682")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.mr.p682");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X(S)?925") {
  if (version_is_less_equal(version: version, test_version: "lhs60.hk.p682")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.hk.p683");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X(S)?95") {
  if (version_is_less_equal(version: version, test_version: "lhs60.tq.p682")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.tq.p683");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^6500") {
  if (version_is_less_equal(version: version, test_version: "lhs60.jr.p809")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lhs60.jr.p810");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X46") {
  if (version_is_less_equal(version: version, test_version: "lr.bs.p809")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lr.bs.p810");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X65") {
  if (version_is_less_equal(version: version, test_version: "lr.mn.p809")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lr.mn.p810");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X73") {
  if (version_is_less_equal(version: version, test_version: "lr.fl.p809")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lr.fl.p810");
    security_message(port: 0, data: report);
    exit(0);
  }
}
else if (model =~ "^X86") {
  if (version_is_less_equal(version: version, test_version: "lp.sp.p809")) {
    report = report_fixed_ver(installed_version: version, fixed_version: "lp.sp.p810");
    security_message(port: 0, data: report);
    exit(0);
  }
}

exit(99);