Lucene search

K
nessusThis script is Copyright (C) 2008-2018 Tenable Network Security, Inc.XEROX_XRX08_001.NASL
HistoryJan 14, 2008 - 12:00 a.m.

Xerox WorkCentre Multiple Samba Vulnerabilities (XRX08-001)

2008-01-1400:00:00
This script is Copyright (C) 2008-2018 Tenable Network Security, Inc.
www.tenable.com
40

According to its model number and software version, the remote host is a Xerox WorkCentre device that reportedly is affected by multiple buffer overflow and remote command injection issues. Using specially- crafted RPC requests, an unauthenticated attacker could leverage these issues to run arbitrary code on the affected device or make unauthorized changes to its system configuration.

#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(29965);
  script_version("1.17");
  script_cvs_date("Date: 2018/11/15 20:50:24");

  script_cve_id("CVE-2007-2446", "CVE-2007-2447");
  script_bugtraq_id(
    23972,
    23973,
    24195,
    24196,
    24197,
    24198
  );

  script_name(english:"Xerox WorkCentre Multiple Samba Vulnerabilities (XRX08-001)");
  script_summary(english:"Checks Net Controller Software version of Xerox WorkCentre devices");

  script_set_attribute(attribute:"synopsis", value:
"The remote multi-function device is affected by multiple issues.");
  script_set_attribute(
    attribute:"description",
    value:
"According to its model number and software version, the remote host
is a Xerox WorkCentre device that reportedly is affected by multiple
buffer overflow and remote command injection issues.  Using specially-
crafted RPC requests, an unauthenticated attacker could leverage these
issues to run arbitrary code on the affected device or make
unauthorized changes to its system configuration."
  );
  script_set_attribute(attribute:"see_also", value:"https://www.xerox.com/downloads/usa/en/c/cert_XRX08_001.pdf");
  script_set_attribute(
    attribute:"solution",
    value:
"Apply the P32 patch as described in the Xerox security bulletin
referenced above."
  );
  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_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'Samba "username map script" Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"exploit_framework_canvas", value:"true");
  script_set_attribute(attribute:"canvas_package", value:'CANVAS');

  script_set_attribute(attribute:"vuln_publication_date", value:"2007/05/14");
  script_set_attribute(attribute:"patch_publication_date", value:"2007/07/11");
  script_set_attribute(attribute:"plugin_publication_date", value:"2008/01/14");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/h:xerox:workcentre");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Misc.");

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

  script_dependencies("xerox_workcentre_detect.nasl");
  script_require_keys("www/xerox_workcentre");

  exit(0);
}

include("audit.inc");
include("global_settings.inc");
include("misc_func.inc");

# This function returns TRUE if the version string ver lies in
# the range [low, high].
function ver_inrange(ver, low, high)
{
  local_var ver_parts, low_parts, high_parts, i, p, low_p, high_p;

  if (isnull(ver) || isnull(low) || isnull(high)) return FALSE;

  # Split levels into parts.
  ver_parts = split(ver, sep:".", keep:0);
  low_parts = split(low, sep:".", keep:0);
  high_parts = split(high, sep:".", keep:0);

  # Compare each part.
  i = 0;
  while (ver_parts[i] != NULL)
  {
    p = int(ver_parts[i]);
    low_p = int(low_parts[i]);
    if (low_p == NULL) low_p = 0;
    high_p = int(high_parts[i]);
    if (high_p == NULL) high_p = 0;

    if (p > low_p && p < high_p) return TRUE;
    if (p < low_p || p > high_p) return FALSE;
    ++i;
  }
  return TRUE;
}


# Check whether the device is vulnerable.
if (get_kb_item("www/xerox_workcentre"))
{
  model = get_kb_item_or_exit("www/xerox_workcentre/model");
  ess = get_kb_item_or_exit("www/xerox_workcentre/ess");

  # No need to check further if ESS has ".P32" since that
  # indicates the patch has already been applied.
  if (ess && ess =~ "\.P32") audit(AUDIT_HOST_NOT, "affected");

  # Test model number and software version against those in Xerox's security bulletin.
  if (
    (
      # nb: models 232/238/245/255/265/275 with ESS in [0, 040.022.1110).
      (model =~ "^2(3[28]|[4-7]5)" || model =~ "Pro 2(3[28]|[4-7]5)") &&
      ver_inrange(ver:ess, low:"0.0.0", high:"040.022.1109")
    ) ||
    (
      # nb: models 7655/7665 with ESS in [0, 040.032.55080).
      (model =~ "^76[56]5") &&
      ver_inrange(ver:ess, low:"0.0.0", high:"040.032.55079")
    )
  )
  security_hole(0);
  exit(0);
}
audit(AUDIT_HOST_NOT, "affected");
VendorProductVersionCPE
xeroxworkcentrecpe:/h:xerox:workcentre